diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-24 21:58:34 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-24 21:58:34 +0000 |
commit | d691f66983c0b36689400e9e9137d72bd3be8e72 (patch) | |
tree | bf7422162d5f435af122b0a531a7eb03c6f60424 /tests/testsig.c | |
parent | 386405f78661e0a4f82087196c7b084b8c612b48 (diff) |
glibc2.2 fixes - more command line options - misc doc fixesv0.1.1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@46 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tests/testsig.c')
-rw-r--r-- | tests/testsig.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/tests/testsig.c b/tests/testsig.c index d93f42806a..27ea78c6a9 100644 --- a/tests/testsig.c +++ b/tests/testsig.c @@ -15,21 +15,34 @@ void alarm_handler(int sig) alarm(1); } +#ifndef REG_EAX +#define REG_EAX EAX +#define REG_EBX EBX +#define REG_ECX ECX +#define REG_EDX EDX +#define REG_ESI ESI +#define REG_EDI EDI +#define REG_EBP EBP +#define REG_ESP ESP +#define REG_EIP EIP +#define REG_EFL EFL +#endif + void dump_regs(struct ucontext *uc) { printf("EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n" "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n" "EFL=%08x EIP=%08x\n", - uc->uc_mcontext.gregs[EAX], - uc->uc_mcontext.gregs[EBX], - uc->uc_mcontext.gregs[ECX], - uc->uc_mcontext.gregs[EDX], - uc->uc_mcontext.gregs[ESI], - uc->uc_mcontext.gregs[EDI], - uc->uc_mcontext.gregs[EBP], - uc->uc_mcontext.gregs[ESP], - uc->uc_mcontext.gregs[EFL], - uc->uc_mcontext.gregs[EIP]); + uc->uc_mcontext.gregs[REG_EAX], + uc->uc_mcontext.gregs[REG_EBX], + uc->uc_mcontext.gregs[REG_ECX], + uc->uc_mcontext.gregs[REG_EDX], + uc->uc_mcontext.gregs[REG_ESI], + uc->uc_mcontext.gregs[REG_EDI], + uc->uc_mcontext.gregs[REG_EBP], + uc->uc_mcontext.gregs[REG_ESP], + uc->uc_mcontext.gregs[REG_EFL], + uc->uc_mcontext.gregs[REG_EIP]); } void sig_handler(int sig, siginfo_t *info, void *puc) |