-/* Target-dependent code for Linux running on x86-64, for GDB.
- Copyright 2001
- Free Software Foundation, Inc.
+/* Target-dependent code for GNU/Linux running on x86-64, for GDB.
+
+ Copyright 2001 Free Software Foundation, Inc.
+
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
return pc;
}
+#define LINUX_SIGINFO_SIZE 128
+
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
-/* Assuming FRAME is for a Linux sigtramp routine, return the address
- of the associated sigcontext structure. */
+/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
+ address of the associated sigcontext structure. */
CORE_ADDR
x86_64_linux_sigcontext_addr (struct frame_info *frame)
{
/* 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) +
+ return frame->next->frame + LINUX_SIGINFO_SIZE +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
/* This is the top frame. */
- return read_register (SP_REGNUM) + sizeof (struct siginfo) +
+ return read_register (SP_REGNUM) + LINUX_SIGINFO_SIZE +
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
#define LINUX_SIGCONTEXT_PC_OFFSET (136)
-/* Assuming FRAME is for a Linux sigtramp routine, return the saved
- program counter. */
+/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
+ saved program counter. */
CORE_ADDR
x86_64_linux_sigtramp_saved_pc (struct frame_info *frame)