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.
This commit is contained in:
Randolph Chung 2004-12-13 04:06:16 +00:00
parent 0efcf9dce5
commit acf86d5407
10 changed files with 61 additions and 41 deletions

View File

@ -1,3 +1,25 @@
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

View File

@ -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) \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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) */

View File

@ -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

View File

@ -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);

View File

@ -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);
};
/*

View File

@ -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;