Start working through proper handling of pthreads when
debugging Linux core dumps. Pthreads for active processes is still not supported, nor are other systems.
This commit is contained in:
parent
a0e8d02d09
commit
dd944ec72a
14 changed files with 528 additions and 415 deletions
|
|
@ -1,18 +1,11 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include <mach.h>
|
||||
#include <elf.h>
|
||||
#include "ureg386.h"
|
||||
|
||||
|
||||
Ureg*
|
||||
_linux2ureg386(UregLinux386 *l)
|
||||
void
|
||||
linux2ureg386(UregLinux386 *l, Ureg *u)
|
||||
{
|
||||
Ureg *u;
|
||||
|
||||
u = malloc(sizeof(Ureg));
|
||||
if(u == nil)
|
||||
return nil;
|
||||
u->di = l->edi;
|
||||
u->si = l->esi;
|
||||
u->bp = l->ebp;
|
||||
|
|
@ -32,5 +25,27 @@ _linux2ureg386(UregLinux386 *l)
|
|||
u->flags = l->eflags;
|
||||
u->sp = l->esp;
|
||||
u->ss = l->xss;
|
||||
return u;
|
||||
}
|
||||
|
||||
void
|
||||
ureg2linux386(Ureg *u, UregLinux386 *l)
|
||||
{
|
||||
l->edi = u->di;
|
||||
l->esi = u->si;
|
||||
l->ebp = u->bp;
|
||||
l->esp = u->nsp;
|
||||
l->ebx = u->bx;
|
||||
l->edx = u->dx;
|
||||
l->ecx = u->cx;
|
||||
l->eax = u->ax;
|
||||
l->xgs = u->gs;
|
||||
l->xfs = u->fs;
|
||||
l->xes = u->es;
|
||||
l->xds = u->ds;
|
||||
l->eip = u->pc;
|
||||
l->xcs = u->cs;
|
||||
l->eflags = u->flags;
|
||||
l->esp = u->sp;
|
||||
l->xss = u->ss;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue