summaryrefslogtreecommitdiff
path: root/hurd
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 /hurd
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 'hurd')
-rw-r--r--hurd/ChangeLog5
-rw-r--r--hurd/thread.h15
2 files changed, 20 insertions, 0 deletions
diff --git a/hurd/ChangeLog b/hurd/ChangeLog
index 1082520..659488a 100644
--- a/hurd/ChangeLog
+++ b/hurd/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-16 Neal H. Walfield <neal@gnu.org>
+
+ * thread.h (AF_REGS_FMT): New macro.
+ (AF_REGS_PRINTF): Likewise.
+
2008-12-18 Neal H. Walfield <neal@gnu.org>
* thread.h (hurd_myself): Assume UTCB->TID is set correctly.
diff --git a/hurd/thread.h b/hurd/thread.h
index aa292ab..653bbf6 100644
--- a/hurd/thread.h
+++ b/hurd/thread.h
@@ -37,6 +37,21 @@ struct activation_frame
uintptr_t regs[10];
struct
{
+#define AF_REGS_FMT \
+ "ip: %p, sp: %p, eax: %p, ebx: %p, ecx: %p, " \
+ "edx: %p, edi: %p, esi: %p, ebp: %p, eflags: %p"
+#define AF_REGS_PRINTF(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
+
uintptr_t eax;
uintptr_t ecx;
uintptr_t edx;