aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog19
-rw-r--r--gdb/Makefile.in9
-rw-r--r--gdb/amd64-sol2-tdep.c5
-rw-r--r--gdb/config/i386/i386sol2.mt2
-rw-r--r--gdb/config/i386/sol2-64.mt2
-rw-r--r--gdb/config/sparc/sol2-64.mt2
-rw-r--r--gdb/config/sparc/sol2.mt2
-rw-r--r--gdb/i386-sol2-tdep.c5
-rw-r--r--gdb/sol2-tdep.c38
-rw-r--r--gdb/sol2-tdep.h29
-rw-r--r--gdb/sparc-sol2-tdep.c4
-rw-r--r--gdb/sparc64-sol2-tdep.c4
12 files changed, 110 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 74b7e23..449d99f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 8a52f74..b6f0c98 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -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) \
diff --git a/gdb/amd64-sol2-tdep.c b/gdb/amd64-sol2-tdep.c
index a32cadc..416d111 100644
--- a/gdb/amd64-sol2-tdep.c
+++ b/gdb/amd64-sol2-tdep.c
@@ -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);
}
diff --git a/gdb/config/i386/i386sol2.mt b/gdb/config/i386/i386sol2.mt
index 800ecba..30360d2 100644
--- a/gdb/config/i386/i386sol2.mt
+++ b/gdb/config/i386/i386sol2.mt
@@ -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
diff --git a/gdb/config/i386/sol2-64.mt b/gdb/config/i386/sol2-64.mt
index ac5f3a1..5368d86 100644
--- a/gdb/config/i386/sol2-64.mt
+++ b/gdb/config/i386/sol2-64.mt
@@ -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
diff --git a/gdb/config/sparc/sol2-64.mt b/gdb/config/sparc/sol2-64.mt
index 809fc11..ced0d2c 100644
--- a/gdb/config/sparc/sol2-64.mt
+++ b/gdb/config/sparc/sol2-64.mt
@@ -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
diff --git a/gdb/config/sparc/sol2.mt b/gdb/config/sparc/sol2.mt
index a305d56..b6cd168 100644
--- a/gdb/config/sparc/sol2.mt
+++ b/gdb/config/sparc/sol2.mt
@@ -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
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index b4c0468..dfe6d70 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -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
index 0000000..788a55e
--- /dev/null
+++ b/gdb/sol2-tdep.c
@@ -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
index 0000000..304c8b6
--- /dev/null
+++ b/gdb/sol2-tdep.h
@@ -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 */
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index bbcaa68..6d5533e 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -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);
diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c
index c8be8f5..5e87886 100644
--- a/gdb/sparc64-sol2-tdep.c
+++ b/gdb/sparc64-sol2-tdep.c
@@ -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);