* gdbarch.sh (fetch_tls_load_module_address): New architecture method.
[deliverable/binutils-gdb.git] / gdb / amd64-linux-tdep.c
index 2bca2e02f8f28f0c828479d334b88a542c517169..fd90d53e1fbe1b67e442ae8ef74a8b6793b2887b 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux x86-64.
 
-   Copyright 2001, 2003, 2004 Free Software Foundation, Inc.
+   Copyright 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
    Contributed by Jiri Smid, SuSE Labs.
 
    This file is part of GDB.
@@ -98,7 +98,7 @@ amd64_linux_sigtramp_start (struct frame_info *next_frame)
      PC is not at the start of the instruction sequence, there will be
      a few trailing readable bytes on the stack.  */
 
-  if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
+  if (!safe_frame_unwind_memory (next_frame, pc, buf, sizeof buf))
     return 0;
 
   if (buf[0] != LINUX_SIGTRAMP_INSN0)
@@ -107,8 +107,7 @@ amd64_linux_sigtramp_start (struct frame_info *next_frame)
        return 0;
 
       pc -= LINUX_SIGTRAMP_OFFSET1;
-
-      if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
+      if (!safe_frame_unwind_memory (next_frame, pc, buf, sizeof buf))
        return 0;
     }
 
@@ -219,6 +218,10 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   /* GNU/Linux uses SVR4-style shared libraries.  */
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_lp64_fetch_link_map_offsets);
+
+  /* Enable TLS support.  */
+  set_gdbarch_fetch_tls_load_module_address (gdbarch,
+                                             svr4_fetch_objfile_link_map);
 }
 \f
 
This page took 0.024701 seconds and 4 git commands to generate.