This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA]: x86-64 - remove `sizeof (struct siginfo)'
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA]: x86-64 - remove `sizeof (struct siginfo)'
- From: Jiri Smid <smid at suse dot cz>
- Date: 25 Sep 2001 08:49:00 +0200
The folowing patch removes `sizeof (struct siginfo)' from x86-64
target file to avoid problems when building a cross-debugger.
OK to commit?
Index: gdb/ChangeLog
from Jiri Smid <smid@naga.suse.cz>
* x86-64-linux-tdep.c (LINUX_SIGINFO_SIZE): Add.
(x86_64_linux_sigcontext_addr): Replace `sizeof (struct siginfo)'
by LINUX_SIGINFO_SIZE.
Index: gdb/x86-64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-linux-tdep.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 x86-64-linux-tdep.c
*** x86-64-linux-tdep.c 2001/09/21 22:57:29 1.2
--- x86-64-linux-tdep.c 2001/09/24 08:39:09
*************** x86_64_linux_sigtramp_start (CORE_ADDR p
*** 66,71 ****
--- 66,73 ----
return pc;
}
+ #define LINUX_SIGINFO_SIZE 128
+
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
*************** x86_64_linux_sigcontext_addr (struct fra
*** 83,94 ****
/* If this isn't the top frame, the next frame must be for the
signal handler itself. The sigcontext structure is part of
the user context. */
! return frame->next->frame + sizeof (struct siginfo) +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
/* This is the top frame. */
! return read_register (SP_REGNUM) + sizeof (struct siginfo) +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
--- 85,96 ----
/* If this isn't the top frame, the next frame must be for the
signal handler itself. The sigcontext structure is part of
the user context. */
! return frame->next->frame + LINUX_SIGINFO_SIZE +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
/* This is the top frame. */
! return read_register (SP_REGNUM) + LINUX_SIGINFO_SIZE +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
--
Jiri Smid
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: smid@suse.cz
Drahobejlova 27 tel:+420 2 96542 373
190 00 Praha 9 fax:+420 2 96542 374
Ceska republika http://www.suse.cz