* dwarf2-frame.c (read_reg): Expect this_frame in the baton.
[deliverable/binutils-gdb.git] / gdb / i386-linux-tdep.c
index 8ff4f24a274791eb376e5b61afa41b887a9c8984..31d9238ab66f4f121a6cd33ad06a65325738bb56 100644 (file)
@@ -1,13 +1,13 @@
 /* Target-dependent code for GNU/Linux i386.
 
-   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
    Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "gdbcore.h"
 /* Return the name of register REG.  */
 
 static const char *
-i386_linux_register_name (int reg)
+i386_linux_register_name (struct gdbarch *gdbarch, int reg)
 {
   /* Deal with the extra "orig_eax" pseudo register.  */
   if (reg == I386_LINUX_ORIG_EAX_REGNUM)
     return "orig_eax";
 
-  return i386_register_name (reg);
+  return i386_register_name (gdbarch, reg);
 }
 
 /* Return non-zero, when the register is in the corresponding register
@@ -246,14 +244,14 @@ i386_linux_sigtramp_p (struct frame_info *next_frame)
          || strcmp ("__restore_rt", name) == 0);
 }
 
-/* Return one if the unwound PC from NEXT_FRAME is in a signal trampoline
-   which may have DWARF-2 CFI.  */
+/* Return one if the PC of THIS_FRAME is in a signal trampoline which
+   may have DWARF-2 CFI.  */
 
 static int
 i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch,
-                                struct frame_info *next_frame)
+                                struct frame_info *this_frame)
 {
-  CORE_ADDR pc = frame_pc_unwind (next_frame);
+  CORE_ADDR pc = get_frame_pc (this_frame);
   char *name;
 
   find_pc_partial_function (pc, &name, NULL, NULL);
@@ -431,6 +429,10 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   tdep->sc_reg_offset = i386_linux_sc_reg_offset;
   tdep->sc_num_regs = ARRAY_SIZE (i386_linux_sc_reg_offset);
 
+  /* N_FUN symbols in shared libaries have 0 for their values and need
+     to be relocated. */
+  set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
+
   /* GNU/Linux uses SVR4-style shared libraries.  */
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
   set_solib_svr4_fetch_link_map_offsets
This page took 0.025541 seconds and 4 git commands to generate.