]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* sol2-tdep.h. sol2-tdep.c: New files.
authorMark Kettenis <kettenis@gnu.org>
Sun, 15 Jan 2006 00:22:50 +0000 (00:22 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sun, 15 Jan 2006 00:22:50 +0000 (00:22 +0000)
* amd64-sol2-tdep.c: Include "sol2-tdep.h".
(amd64_sol2_init_abi): Set skip_solib_resolver.
* i386-sol2-tdep.c: Include "sol2-tdep.h".
(i386_sol2_init_abi): Set skip_solib_resolver.
* sparc-sol2-tdep.c: Include "sol2-tdep.h".
(sparc32_sol2_init_abi): Set skip_solib_resolver.
* sparc64-sol2-tdep.c: Include "sol2-tdep.h".
(sparc64_sol2_init_abi): Set skip_solib_resolver.
* Makefile.in (sol2_tdep_h): New variable.
(ALLDEPFILES): Add sol2-tdep.c.
(sol2-tdep.o): New target.
(amd64-sol2-tdep.o, i386-sol2-tdep.o, sparc-sol2-tdep.o)
(sparc64-sol2-tdep.o): Update dependencies
* config/i386/i386sol2.mt (TDEPFILES): Add sol2-tdep.o.
* config/i386/sol2-64.mt (TDEPFILES): Add sol2-tdep.o.
* config/sparc/sol2.mt (TDEPFILES): Add sol2-tdep.o.
* config/sparc/sol2-64.mt (TDEPFILES): Add sol2-tdep.o.

12 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/amd64-sol2-tdep.c
gdb/config/i386/i386sol2.mt
gdb/config/i386/sol2-64.mt
gdb/config/sparc/sol2-64.mt
gdb/config/sparc/sol2.mt
gdb/i386-sol2-tdep.c
gdb/sol2-tdep.c [new file with mode: 0644]
gdb/sol2-tdep.h [new file with mode: 0644]
gdb/sparc-sol2-tdep.c
gdb/sparc64-sol2-tdep.c

index 74b7e234dc6484954952798cd7273dafa1153112..449d99f11b317a3b3229cb62062fc4a5291eba61 100644 (file)
@@ -1,5 +1,24 @@
 2006-01-14  Mark Kettenis  <kettenis@gnu.org>
 
+       * sol2-tdep.h. sol2-tdep.c: New files.
+       * amd64-sol2-tdep.c: Include "sol2-tdep.h".
+       (amd64_sol2_init_abi): Set skip_solib_resolver.
+       * i386-sol2-tdep.c: Include "sol2-tdep.h".
+       (i386_sol2_init_abi): Set skip_solib_resolver.
+       * sparc-sol2-tdep.c: Include "sol2-tdep.h".
+       (sparc32_sol2_init_abi): Set skip_solib_resolver.
+       * sparc64-sol2-tdep.c: Include "sol2-tdep.h".
+       (sparc64_sol2_init_abi): Set skip_solib_resolver.
+       * Makefile.in (sol2_tdep_h): New variable.
+       (ALLDEPFILES): Add sol2-tdep.c.
+       (sol2-tdep.o): New target.
+       (amd64-sol2-tdep.o, i386-sol2-tdep.o, sparc-sol2-tdep.o)
+       (sparc64-sol2-tdep.o): Update dependencies
+       * config/i386/i386sol2.mt (TDEPFILES): Add sol2-tdep.o.
+       * config/i386/sol2-64.mt (TDEPFILES): Add sol2-tdep.o.
+       * config/sparc/sol2.mt (TDEPFILES): Add sol2-tdep.o.
+       * config/sparc/sol2-64.mt (TDEPFILES): Add sol2-tdep.o.
+
        * hppa-linux-tdep.c: Fix copyright indentation.
 
        * hppa-tdep.h (enum hppa_regnum): Add HPPA_FP31R_REGNUM.
index 8a52f743f53f38d4de06c9667c327ac44a1097bd..b6f0c98e47f76ac6f00c0b380d509436b1394c18 100644 (file)
@@ -768,6 +768,7 @@ ser_unix_h = ser-unix.h
 shnbsd_tdep_h = shnbsd-tdep.h
 sh_tdep_h = sh-tdep.h
 sim_regno_h = sim-regno.h
+sol2_tdep_h = sol2-tdep.h
 solib_h = solib.h
 solib_pa64_h = solib-pa64.h
 solib_som_h = solib-som.h
@@ -1441,6 +1442,7 @@ ALLDEPFILES = \
        s390-tdep.c s390-nat.c \
        ser-go32.c ser-pipe.c ser-tcp.c \
        sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
+       sol2-tdep.c \
        solib-irix.c solib-svr4.c solib-sunos.c \
        sparc-linux-nat.c \
        sparc-linux-tdep.c sparc-nat.c sparc-sol2-nat.c sparc-sol2-tdep.c \
@@ -1723,8 +1725,8 @@ amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
        $(gdb_string_h) $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h) \
        $(bsd_uthread_h)
 amd64-sol2-tdep.o: amd64-sol2-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
-       $(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) $(amd64_tdep_h) \
-       $(solib_svr4_h)
+       $(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) \
+       $(sol2_tdep_h) $(amd64_tdep_h) $(solib_svr4_h)
 amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \
        $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
        $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \
@@ -2081,7 +2083,7 @@ i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
 i386-sol2-nat.o: i386-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \
        $(amd64_nat_h) $(amd64_tdep_h)
 i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \
-       $(gdb_string_h) $(i386_tdep_h) $(solib_svr4_h)
+       $(gdb_string_h) $(sol2_tdep_h) $(i386_tdep_h) $(solib_svr4_h)
 i386-stub.o: i386-stub.c
 i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
        $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \
@@ -2543,6 +2545,7 @@ sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
        $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \
        $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \
        $(elf_sh_h) $(gdb_sim_sh_h)
+sol2-tdep.o: sol2-tdep.c $(defs_h) $(frame_h) $(symtab_h)
 solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \
        $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \
        $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \
index a32cadc52016a30691162f523b907638421f4eb8..416d1118fe6a728505f7a58a37806c23a52d8978 100644 (file)
@@ -1,6 +1,7 @@
 /* Target-dependent code for AMD64 Solaris.
 
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+
    Contributed by Joseph Myers, CodeSourcery, LLC.
 
    This file is part of GDB.
@@ -29,6 +30,7 @@
 
 #include "gdb_string.h"
 
+#include "sol2-tdep.h"
 #include "amd64-tdep.h"
 #include "solib-svr4.h"
 
@@ -109,6 +111,7 @@ amd64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   tdep->sc_num_regs = tdep->gregset_num_regs;
 
   /* Solaris uses SVR4-style shared libraries.  */
+  set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_lp64_fetch_link_map_offsets);
 }
index 800ecbab322bc58a3c59dab9af9a459d8aaed273..30360d2e149b9729dc4fa45ad1fa9f40892ee8ce 100644 (file)
@@ -1,4 +1,4 @@
 # Target: Solaris x86
-TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o \
+TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o sol2-tdep.o \
        corelow.o solib.o solib-svr4.o
 DEPRECATED_TM_FILE= tm-i386sol2.h
index ac5f3a12c2039c2d51af43c54f5ddd9a44c94154..5368d86017b49851ad227a103a223d1f1a9a24e8 100644 (file)
@@ -1,3 +1,3 @@
 # Target: Solaris x86_64
 TDEPFILES= i386-tdep.o i387-tdep.o amd64-tdep.o amd64-sol2-tdep.o \
-       i386-sol2-tdep.o corelow.o solib.o solib-svr4.o
+       i386-sol2-tdep.o sol2-tdep.o corelow.o solib.o solib-svr4.o
index 809fc11b8110124a93c025de4f4863afb8f82d57..ced0d2c76bb9670776d44cc1b4af94e55dc5ff99 100644 (file)
@@ -1,4 +1,4 @@
 # Target: Solaris UltraSPARC
 TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc-tdep.o sparc-sol2-tdep.o \
-       solib.o solib-svr4.o
+       sol2-tdep.o solib.o solib-svr4.o
 DEPRECATED_TM_FILE= tm-sol2.h
index a305d56c10d6b6d7e5e583b58e4daa028f06874f..b6cd168d60b8656ec262f2527f97bc5956fc3525 100644 (file)
@@ -1,3 +1,3 @@
 # Target: Solaris SPARC
-TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o solib.o solib-svr4.o
+TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o sol2-tdep.o solib.o solib-svr4.o
 DEPRECATED_TM_FILE= tm-sol2.h
index b4c04680fd25e1dbc1d24e79584915dc457be452..dfe6d705f1345d170cb7e335fb0b579151c56ac6 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris x86.
 
-   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,7 @@
 
 #include "gdb_string.h"
 
+#include "sol2-tdep.h"
 #include "i386-tdep.h"
 #include "solib-svr4.h"
 
@@ -101,6 +102,8 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   tdep->sc_reg_offset = tdep->gregset_reg_offset;
   tdep->sc_num_regs = tdep->gregset_num_regs;
 
+  /* Solaris has SVR4-style shared libraries.  */
+  set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_ilp32_fetch_link_map_offsets);
 }
diff --git a/gdb/sol2-tdep.c b/gdb/sol2-tdep.c
new file mode 100644 (file)
index 0000000..788a55e
--- /dev/null
@@ -0,0 +1,38 @@
+/* Target-dependent code for Solaris.
+
+   Copyright (C) 2006 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
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   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.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "symtab.h"
+
+#include "sol2-tdep.h"
+
+CORE_ADDR
+sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+  struct minimal_symbol *msym;
+
+  msym = lookup_minimal_symbol("elf_bndr", NULL, NULL);
+  if (msym && SYMBOL_VALUE_ADDRESS (msym) == pc)
+    return frame_pc_unwind (get_current_frame ());
+
+  return 0;
+}
diff --git a/gdb/sol2-tdep.h b/gdb/sol2-tdep.h
new file mode 100644 (file)
index 0000000..304c8b6
--- /dev/null
@@ -0,0 +1,29 @@
+/* Target-dependent code for Solaris.
+
+   Copyright (C) 2006 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
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   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.  */
+
+#ifndef SOL2_TDEP_H
+#define SOL2_TDEP_H 1
+
+struct gdbarch;
+
+CORE_ADDR sol2_skip_solib_resolver (struct gdbarch *, CORE_ADDR);
+
+#endif /* sol2-tdep.h */
index bbcaa689b172447d7ab2cfc5e2629103dc9660fd..6d5533e37d007173bed197d444efa189c5950290 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris SPARC.
 
-   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,6 +33,7 @@
 #include "gdb_assert.h"
 #include "gdb_string.h"
 
+#include "sol2-tdep.h"
 #include "sparc-tdep.h"
 #include "solib-svr4.h"
 
@@ -178,6 +179,7 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   /* Solaris has SVR4-style shared libraries...  */
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_ilp32_fetch_link_map_offsets);
 
index c8be8f5c1641d35f21a31000289c6f4931e9694a..5e878869dfc1bc8f58b565ed0771e906f7a5be3f 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Solaris UltraSPARC.
 
-   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,7 @@
 
 #include "gdb_assert.h"
 
+#include "sol2-tdep.h"
 #include "sparc64-tdep.h"
 #include "solib-svr4.h"
 
@@ -160,6 +161,7 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   /* Solaris has SVR4-style shared libraries...  */
   set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
   set_solib_svr4_fetch_link_map_offsets
     (gdbarch, svr4_lp64_fetch_link_map_offsets);