aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog22
-rw-r--r--gdb/Makefile.in31
-rw-r--r--gdb/config/pa/hppa64.mt2
-rw-r--r--gdb/config/pa/hppahpux.mt2
-rw-r--r--gdb/config/pa/hpux.mh2
-rw-r--r--gdb/config/pa/tm-hppah.h12
-rw-r--r--gdb/hppa-hpux-tdep.c7
-rw-r--r--gdb/hppa-tdep.c4
-rw-r--r--gdb/hppa-tdep.h8
-rw-r--r--gdb/hpread.c12
10 files changed, 61 insertions, 41 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f0e245e..abed469 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,27 @@
2004-12-13 Randolph Chung <tausq@debian.org>
+ * Makefile.in (pa64solib_h, somsolib_h): Delete.
+ (solib_pa64_h, solib_som_h): New.
+ (HFILES_NO_SRCDIR, ALLDEPFILES): Replace somsolib.h with solib-som.h.
+ (hppa-hpux-tdep.o, hpread.o): Update dependencies.
+ (pa64solib.o, somsolib.o): Delete.
+ (solib-pa64.o, solib-som.o): New.
+ * hppa-hpux-tdep.c: Include new solib interfaces.
+ (hppa_hpux_som_init_abi): Attach to SOM solib interface.
+ (hppa_hpux_elf_init_abi): Attach to PA64 ELF solib interface.
+ * hppa-tdep.c (internalize_unwinds): If solib_get_text_base method
+ is available, use it to determine the base of unwind records.
+ * hppa-tdep.h (gdbarch_tdep): Add new solib methods.
+ * hpread.c: Replace somsolib.h with solib-som.h.
+ (hpread_process_one_debug_symbol): Use target vector to get thread
+ start address.
+ * config/pa/hppa64.mt (TDEPFILES): Use new solib interface.
+ * config/pa/hppahpux.mt (TDEPFILES): Likewise.
+ * config/pa/hpux.mh (NATDEPFILES): Delete references to target objects.
+ * config/pa/tm-hppah.h: Use new solib interface.
+
+2004-12-13 Randolph Chung <tausq@debian.org>
+
* tramp-frame.c (tramp_frame_sniffer): Allow frames with names or
sections to be trampolines too.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 6a15ef5..c000b80 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -741,7 +741,7 @@ objc_lang_h = objc-lang.h
objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
ocd_h = ocd.h
osabi_h = osabi.h
-pa64solib_h = pa64solib.h
+solib_pa64_h = solib-pa64.h
parser_defs_h = parser-defs.h $(doublest_h)
p_lang_h = p-lang.h
ppcnbsd_tdep_h = ppcnbsd-tdep.h
@@ -766,7 +766,7 @@ sim_regno_h = sim-regno.h
solib_h = solib.h
solib_svr4_h = solib-svr4.h
solist_h = solist.h
-somsolib_h = somsolib.h
+solib_som_h = solib-som.h
source_h = source.h
sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h)
sparc_nat_h = sparc-nat.h
@@ -856,7 +856,7 @@ HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
m2-lang.h p-lang.h \
complaints.h valprint.h \
gdbthread.h \
- dcache.h remote-utils.h top.h somsolib.h
+ dcache.h remote-utils.h top.h solib-som.h
# Header files that already have srcdir in them, or which are in objdir.
@@ -1402,7 +1402,7 @@ ALLDEPFILES = \
mips64obsd-nat.c mips64obsd-tdep.c \
nbsd-tdep.c \
ns32k-tdep.c solib-osf.c \
- somread.c somsolib.c $(HPREAD_SOURCE) \
+ somread.c solib-som.c $(HPREAD_SOURCE) \
ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c \
ppcnbsd-nat.c ppcnbsd-tdep.c \
ppcobsd-nat.c ppcobsd-tdep.c \
@@ -1975,9 +1975,10 @@ hppa-hpux-nat.o: hppa-hpux-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(target_h) $(gdb_assert_h) $(hppa_tdep_h) $(inf_ptrace_h) \
$(inf_ttrace_h)
hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(osabi_h) $(frame_h) $(frame_unwind_h) $(trad_frame_h) $(symtab_h) \
- $(objfiles_h) $(inferior_h) $(infcall_h) $(observer_h) $(regset_h) \
- $(gdb_string_h) $(hppa_tdep_h)
+ $(osabi_h) $(gdb_string_h) $(frame_h) $(frame_unwind_h) \
+ $(trad_frame_h) $(tramp_frame_h) $(symtab_h) $(objfiles_h) \
+ $(inferior_h) $(infcall_h) $(observer_h) $(hppa_tdep_h) $(solib_som_h) \
+ $(solib_pa64_h) $(regset_h)
hppa-linux-nat.o: hppa-linux-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
$(gdb_string_h) $(inferior_h) $(hppa_tdep_h) $(gregset_h)
hppa-linux-tdep.o: hppa-linux-tdep.c $(defs_h) $(gdbcore_h) $(osabi_h) \
@@ -1992,7 +1993,7 @@ hppa-tdep.o: hppa-tdep.c $(defs_h) $(bfd_h) $(inferior_h) $(regcache_h) \
hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
$(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
$(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
- $(somsolib_h) $(gdb_assert_h) $(hppa_tdep_h) $(gdb_string_h)
+ $(solib_som_h) $(gdb_assert_h) $(hppa_tdep_h)
hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
$(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h)
i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
@@ -2313,10 +2314,9 @@ ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h)
osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \
$(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h)
-pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \
- $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
- $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
- $(regcache_h) $(exec_h) $(hppa_tdep_h)
+solib-pa64.o: solib-pa64.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(hppa_tdep_h) \
+ $(solist_h) $(solib_pa64_h)
parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \
$(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \
@@ -2516,10 +2516,9 @@ sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \
$(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h)
-somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \
- $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
- $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
- $(regcache_h) $(gdb_assert_h) $(exec_h) $(hppa_tdep_h)
+solib-som.o: solib-som.c $(defs_h) $(som_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+ $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(hppa_tdep_h) \
+ $(solist_h)
source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \
$(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \
$(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \
diff --git a/gdb/config/pa/hppa64.mt b/gdb/config/pa/hppa64.mt
index c0942b5..ad93375 100644
--- a/gdb/config/pa/hppa64.mt
+++ b/gdb/config/pa/hppa64.mt
@@ -1,3 +1,3 @@
# Target: HP PA-RISC 2.0 running HPUX 11.00 in wide mode
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o pa64solib.o somsolib.o somread.o hpread.o solib.o
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o somread.o hpread.o solib.o
DEPRECATED_TM_FILE= tm-hppa64.h
diff --git a/gdb/config/pa/hppahpux.mt b/gdb/config/pa/hppahpux.mt
index b4e9ba0..6787c6f 100644
--- a/gdb/config/pa/hppahpux.mt
+++ b/gdb/config/pa/hppahpux.mt
@@ -1,4 +1,4 @@
# Target: HP PA-RISC running hpux
MT_CFLAGS = -DPA_SOM_ONLY=1
-TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o somread.o hpread.o somsolib.o
+TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o somread.o hpread.o solib-som.o solib-pa64.o solib.o
DEPRECATED_TM_FILE= tm-hppah.h
diff --git a/gdb/config/pa/hpux.mh b/gdb/config/pa/hpux.mh
index 30d349e..3151120 100644
--- a/gdb/config/pa/hpux.mh
+++ b/gdb/config/pa/hpux.mh
@@ -1,3 +1,3 @@
# Host: PA-RISC HP-UX
NATDEPFILES= fork-child.o inf-ptrace.o inf-ttrace.o \
- hppa-hpux-nat.o hpread.o somread.o somsolib.o
+ hppa-hpux-nat.o
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index 43f447c..8d2f518 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -24,17 +24,7 @@
struct frame_info;
-/* The solib hooks are not really designed to have a list of hook
- and handler routines. So until we clean up those interfaces you
- either get SOM shared libraries or HP's unusual PA64 ELF shared
- libraries, but not both. */
-#ifdef GDB_TARGET_IS_HPPA_20W
-#include "pa64solib.h"
-#endif
-
-#ifndef GDB_TARGET_IS_HPPA_20W
-#include "somsolib.h"
-#endif
+#include "solib.h" /* Support for shared libraries. */
/* For HP-UX on PA-RISC we have an implementation
for the exception handling target op (in hppa-tdep.c) */
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 830dd5a..a44e923 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -31,6 +31,9 @@
#include "inferior.h"
#include "infcall.h"
#include "observer.h"
+#include "hppa-tdep.h"
+#include "solib-som.h"
+#include "solib-pa64.h"
#include "regset.h"
#include "gdb_string.h"
@@ -38,8 +41,6 @@
#include <dl.h>
#include <machine/save_state.h>
-#include "hppa-tdep.h"
-
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
#endif
@@ -1690,6 +1691,7 @@ hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->find_global_pointer = hppa_hpux_som_find_global_pointer;
hppa_hpux_init_abi (info, gdbarch);
+ som_solib_select (tdep);
}
static void
@@ -1699,6 +1701,7 @@ hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->is_elf = 1;
hppa_hpux_init_abi (info, gdbarch);
+ pa64_solib_select (tdep);
}
static enum gdb_osabi
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 58fe249..c17965b 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -338,6 +338,10 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
text_offset = low_text_segment_address;
}
+ else if (gdbarch_tdep (current_gdbarch)->solib_get_text_base)
+ {
+ text_offset = gdbarch_tdep (current_gdbarch)->solib_get_text_base (objfile);
+ }
bfd_get_section_contents (objfile->obfd, section, buf, 0, size);
diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h
index 0b4185a..548c21b 100644
--- a/gdb/hppa-tdep.h
+++ b/gdb/hppa-tdep.h
@@ -22,6 +22,8 @@
#define HPPA_TDEP_H
struct trad_frame_saved_reg;
+struct objfile;
+struct so_list;
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
@@ -97,6 +99,12 @@ struct gdbarch_tdep
void (*unwind_adjust_stub) (struct frame_info *next_frame, CORE_ADDR base,
struct trad_frame_saved_reg *saved_regs);
+ /* These are solib-dependent methods. They are really HPUX only, but
+ we don't have a HPUX-specific tdep vector at the moment. */
+ CORE_ADDR (*solib_thread_start_addr) (struct so_list *so);
+ CORE_ADDR (*solib_get_got_by_pc) (CORE_ADDR addr);
+ CORE_ADDR (*solib_get_solib_by_pc) (CORE_ADDR addr);
+ CORE_ADDR (*solib_get_text_base) (struct objfile *objfile);
};
/*
diff --git a/gdb/hpread.c b/gdb/hpread.c
index a9287c0..1103b36 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -35,7 +35,7 @@
#include "gdb-stabs.h"
#include "gdbtypes.h"
#include "demangle.h"
-#include "somsolib.h"
+#include "solib-som.h"
#include "gdb_assert.h"
#include "hppa-tdep.h"
@@ -5779,14 +5779,8 @@ hpread_process_one_debug_symbol (union dnttentry *dn_bufp, char *name,
* where to look for this variable, using a call-back
* to interpret the private shared-library data.
*/
- if (bfd_get_flavour(objfile->obfd) == bfd_target_som_flavour)
- SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location +
- som_solib_thread_start_addr (so);
-#ifndef PA_SOM_ONLY
- else
- SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location +
- pa64_solib_thread_start_addr (so);
-#endif
+ SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location +
+ gdbarch_tdep (current_gdbarch)->solib_thread_start_addr (so);
}
}
break;