diff options
author | rsc <devnull@localhost> | 2005-01-23 22:33:04 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-23 22:33:04 +0000 |
commit | dd944ec72a26d0b380ba2af5f6c00310f2f1651e (patch) | |
tree | 2f40332ca2fcf189d347cf4f577cf613af21108f /src/libmach/ureg386.c | |
parent | a0e8d02d093e01fdadf8a16bc86fe18b0c4e82c3 (diff) | |
download | plan9port-dd944ec72a26d0b380ba2af5f6c00310f2f1651e.tar.gz plan9port-dd944ec72a26d0b380ba2af5f6c00310f2f1651e.tar.bz2 plan9port-dd944ec72a26d0b380ba2af5f6c00310f2f1651e.zip |
Start working through proper handling of pthreads when
debugging Linux core dumps. Pthreads for active processes
is still not supported, nor are other systems.
Diffstat (limited to 'src/libmach/ureg386.c')
-rw-r--r-- | src/libmach/ureg386.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/libmach/ureg386.c b/src/libmach/ureg386.c index 09ef095d..76945030 100644 --- a/src/libmach/ureg386.c +++ b/src/libmach/ureg386.c @@ -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; +} + |