summaryrefslogtreecommitdiff
path: root/libhurd-mm/exceptions.c
diff options
context:
space:
mode:
authorneal <neal>2008-06-18 19:59:56 +0000
committerneal <neal>2008-06-18 19:59:56 +0000
commit5c281f4aa051bc8c96479fcfe41ca23e23ba788c (patch)
treeb11161799217bf3eeac9d52ac86b1e9cb5a1df5d /libhurd-mm/exceptions.c
parent3e9b30afc08a12f1f9f834e63578252b57bf9bfa (diff)
hurd/
2008-06-18 Neal H. Walfield <neal@gnu.org> * thread.h (struct exception_frame): Make regs elements large. libhurd-mm/ 2008-06-18 Neal H. Walfield <neal@gnu.org> * exceptions.c (exception_handler_normal): If the fault is unhandled, print the register state. (exception_handler_activated): Likewise. * ia32-exception-entry.S (EF_STACK_START): Don't define. (EF_SAVED_EAX): Define with an absolute value. (EF_SAVED_ECX): Likewise. (EF_SAVED_EDX): Likewise. (EF_SAVED_FLAGS): Likewise. (EF_SAVED_IP): Likewise. (EF_NEXT): Likewise. (EF_SAVED_EBX): New define. (EF_SAVED_EDI): New define. (EF_SAVED_ESI): New define. (exception_frame_run): Address the saved register values relative to ESP. Also save EBX, EDI and ESI.
Diffstat (limited to 'libhurd-mm/exceptions.c')
-rw-r--r--libhurd-mm/exceptions.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/libhurd-mm/exceptions.c b/libhurd-mm/exceptions.c
index 2eede5f..9b91442 100644
--- a/libhurd-mm/exceptions.c
+++ b/libhurd-mm/exceptions.c
@@ -193,12 +193,16 @@ exception_handler_normal (struct exception_frame *exception_frame)
bool r = map_fault (fault, ip, info);
if (! r)
{
- debug (0, "SIGSEGV at " ADDR_FMT " (ip: %p, sp: %p, eax: %p, ecx: %p, edx: %p, eflags: %p)",
+ debug (0, "SIGSEGV at " ADDR_FMT " (ip: %p, sp: %p, eax: %p, "
+ "ebx: %p, ecx: %p, edx: %p, edi: %p, esi: %p, eflags: %p)",
ADDR_PRINTF (fault), ip, sp,
exception_frame->regs[0],
+ exception_frame->regs[5],
exception_frame->regs[1],
exception_frame->regs[2],
- exception_frame->regs[3]);
+ exception_frame->regs[3],
+ exception_frame->regs[6],
+ exception_frame->regs[7]);
extern int backtrace (void **array, int size);
@@ -296,8 +300,17 @@ exception_handler_activated (struct exception_page *exception_page)
bool r = map_fault (fault, ip, info);
if (! r)
{
- debug (0, "Fault at " ADDR_FMT " (ip: %p)",
- ADDR_PRINTF (fault), ip);
+ debug (0, "SIGSEGV at " ADDR_FMT " (ip: %p, sp: %p, eax: %p, "
+ "ebx: %p, ecx: %p, edx: %p, edi: %p, esi: %p, "
+ "eflags: %p)",
+ ADDR_PRINTF (fault), ip, sp,
+ exception_frame->regs[0],
+ exception_frame->regs[5],
+ exception_frame->regs[1],
+ exception_frame->regs[2],
+ exception_frame->regs[3],
+ exception_frame->regs[6],
+ exception_frame->regs[7]);
siginfo_t si;
memset (&si, 0, sizeof (si));