Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
Merge branch 'bsd_support' into kiji-11
Browse files Browse the repository at this point in the history
* bsd_support:
  Support BSD/amd64 register dumps.
  • Loading branch information
Brandon Mitchell committed May 18, 2011
2 parents c2aad7d + e4ea948 commit c947c66
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions signal.c
Expand Up @@ -17,6 +17,11 @@
#include "node.h"
#include <signal.h>
#include <stdio.h>
#include <ucontext.h>

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif

#ifdef __BEOS__
#undef SIGBUS
Expand Down Expand Up @@ -673,6 +678,15 @@ dump_machine_state(uc)
uc->uc_mcontext->__ss.__eip, uc->uc_mcontext->__ss.__cs,
uc->uc_mcontext->__ss.__ds, uc->uc_mcontext->__ss.__es,
uc->uc_mcontext->__ss.__fs, uc->uc_mcontext->__ss.__gs);
#elif defined(__x86_64__) && defined(BSD)
sig_printf(dump64, uc->uc_mcontext.mc_rax, uc->uc_mcontext.mc_rbx,
uc->uc_mcontext.mc_rcx, uc->uc_mcontext.mc_rdx, uc->uc_mcontext.mc_rdi,
uc->uc_mcontext.mc_rsi, uc->uc_mcontext.mc_rbp, uc->uc_mcontext.mc_rsp,
uc->uc_mcontext.mc_r8, uc->uc_mcontext.mc_r9, uc->uc_mcontext.mc_r10,
uc->uc_mcontext.mc_r11, uc->uc_mcontext.mc_r12, uc->uc_mcontext.mc_r13,
uc->uc_mcontext.mc_r14, uc->uc_mcontext.mc_r15, uc->uc_mcontext.mc_rip,
uc->uc_mcontext.mc_rflags, uc->uc_mcontext.mc_cs, uc->uc_mcontext.mc_fs,
uc->uc_mcontext.mc_gs);
#elif defined(__i386__)
sig_printf(dump32, uc->uc_mcontext.gregs[REG_EAX], uc->uc_mcontext.gregs[REG_EBX],
uc->uc_mcontext.gregs[REG_ECX], uc->uc_mcontext.gregs[REG_EDX],
Expand Down

0 comments on commit c947c66

Please sign in to comment.