summaryrefslogtreecommitdiff
path: root/libhurd-mm
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2009-01-16 20:29:53 +0100
committerNeal H. Walfield <neal@gnu.org>2009-01-16 20:29:53 +0100
commit992370c0219936911f3bba6c62b00c886ecae392 (patch)
tree8af49a492e8bb5c6ef3c9c0bf83598c47219d76a /libhurd-mm
parent2de1c73d703c75a9f820b1134ca72b3c67f1083c (diff)
Add macros to print the register file. Use them.
hurd/ 2009-01-16 Neal H. Walfield <neal@gnu.org> * thread.h (AF_REGS_FMT): New macro. (AF_REGS_PRINTF): Likewise. libhurd-mm/ 2009-01-16 Neal H. Walfield <neal@gnu.org> * exceptions.c (hurd_activation_stack_dump): Use AF_REGS_FMT and AF_REGS_PRINTF rather than naming the registers explicitly. (hurd_activation_handler_normal): Likewise.
Diffstat (limited to 'libhurd-mm')
-rw-r--r--libhurd-mm/ChangeLog6
-rw-r--r--libhurd-mm/exceptions.c44
2 files changed, 12 insertions, 38 deletions
diff --git a/libhurd-mm/ChangeLog b/libhurd-mm/ChangeLog
index e72d016..121e73c 100644
--- a/libhurd-mm/ChangeLog
+++ b/libhurd-mm/ChangeLog
@@ -1,5 +1,11 @@
2009-01-16 Neal H. Walfield <neal@gnu.org>
+ * exceptions.c (hurd_activation_stack_dump): Use AF_REGS_FMT and
+ AF_REGS_PRINTF rather than naming the registers explicitly.
+ (hurd_activation_handler_normal): Likewise.
+
+2009-01-16 Neal H. Walfield <neal@gnu.org>
+
* mm-init.c (mm_init) [!NDEBUG && i386]: Clear STORAGE and assert
that it is not VG_ADDR_VOID before freeing the associated storage.
Assert that the fault callback was called.
diff --git a/libhurd-mm/exceptions.c b/libhurd-mm/exceptions.c
index 1a855b9..6ad928a 100644
--- a/libhurd-mm/exceptions.c
+++ b/libhurd-mm/exceptions.c
@@ -280,20 +280,8 @@ hurd_activation_stack_dump (void)
activation_frame = activation_frame->next)
{
depth ++;
- debug (0, "%d (%p): ip: %p, sp: %p, eax: %p, ebx: %p, ecx: %p, "
- "edx: %p, edi: %p, esi: %p, ebp: %p, eflags: %p",
- depth, activation_frame,
- (void *) activation_frame->eip,
- (void *) activation_frame->esp,
- (void *) activation_frame->eax,
- (void *) activation_frame->ebx,
- (void *) activation_frame->ecx,
- (void *) activation_frame->edx,
- (void *) activation_frame->edi,
- (void *) activation_frame->esi,
- (void *) activation_frame->ebp,
- (void *) activation_frame->eflags);
-
+ debug (0, "%d (%p): " AF_REGS_FMT,
+ depth, activation_frame, AF_REGS_PRINTF (activation_frame));
}
}
@@ -353,19 +341,9 @@ hurd_activation_handler_normal (struct activation_frame *activation_frame,
if (err)
panic ("Failed to unmarshal exception: %d", err);
- debug (5, "Fault at " VG_ADDR_FMT " (ip: %p, sp: %p, eax: %p, "
- "ebx: %p, ecx: %p, edx: %p, edi: %p, esi: %p, ebp: %p, "
- "eflags: %p)",
+ debug (5, "Fault at " VG_ADDR_FMT " " AF_REGS_FMT,
VG_ADDR_PRINTF (fault),
- (void *) ip, (void *) sp,
- (void *) activation_frame->eax,
- (void *) activation_frame->ebx,
- (void *) activation_frame->ecx,
- (void *) activation_frame->edx,
- (void *) activation_frame->edi,
- (void *) activation_frame->esi,
- (void *) activation_frame->ebp,
- (void *) activation_frame->eflags);
+ AF_REGS_PRINTF (activation_frame));
extern l4_thread_id_t as_rwlock_owner;
@@ -403,19 +381,9 @@ hurd_activation_handler_normal (struct activation_frame *activation_frame,
if (as_rwlock_owner == l4_myself ())
debug (0, "I hold as_rwlock!");
- debug (0, "SIGSEGV at " VG_ADDR_FMT " "
- "(ip: %p, sp: %p, eax: %p, ebx: %p, ecx: %p, "
- "edx: %p, edi: %p, esi: %p, ebp: %p, eflags: %p)",
+ debug (0, "SIGSEGV at " VG_ADDR_FMT " " AF_REGS_FMT,
VG_ADDR_PRINTF (fault),
- (void *) ip, (void *) sp,
- (void *) activation_frame->eax,
- (void *) activation_frame->ebx,
- (void *) activation_frame->ecx,
- (void *) activation_frame->edx,
- (void *) activation_frame->edi,
- (void *) activation_frame->esi,
- (void *) activation_frame->ebp,
- (void *) activation_frame->eflags);
+ AF_REGS_PRINTF (activation_frame));
backtrace_print ();