Add support for target specific command line switches to old-style simualtors.
[deliverable/binutils-gdb.git] / gdb / x86-64-linux-tdep.c
index 14e78cda484a43ee5ed96b8255bd61c2e362d3df..171ec9c49750e3d02b33e5214a264ed157dd445d 100644 (file)
@@ -1,6 +1,7 @@
-/* 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.
@@ -66,11 +67,13 @@ x86_64_linux_sigtramp_start (CORE_ADDR pc)
   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)
 {
@@ -83,12 +86,12 @@ 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;
 
     }
@@ -100,8 +103,8 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
 /* 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)
This page took 0.025121 seconds and 4 git commands to generate.