]> granicus.if.org Git - strace/commitdiff
2003-01-10 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Fri, 10 Jan 2003 20:51:00 +0000 (20:51 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 10 Jan 2003 20:51:00 +0000 (20:51 +0000)
* util.c [LINUX && X86_64] (arg0_offset, arg1_offset): Use correct
values for x86-64, conditional on current_personality.

util.c

diff --git a/util.c b/util.c
index 16bff2bcb66acfddeb770ea9c89535ff235bfc2f..9c4a9e527623f1b1fade1d379df831186410dafb 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1205,6 +1205,9 @@ typedef struct regs arg_setup_state;
 # elif defined (HPPA)
 #  define arg0_offset   PT_GR26
 #  define arg1_offset   (PT_GR26-4)
+# elif defined (X86_64)
+#  define arg0_offset  ((long)(8*(current_personality ? RBX : RDI)))
+#  define arg1_offset  ((long)(8*(current_personality ? RCX : RSI)))
 # else
 #  define arg0_offset  0
 #  define arg1_offset  4