From 3510d1f2fd97b92209998a4ddadadf19ccc0f0c1 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 19 Sep 2004 17:21:29 +0000 Subject: [PATCH] * sparc64nbsd-tdep.c: Include "objfiles.h". (sparc64nbsd_init_abi): Set in_solib_call_trampoline and skip_trampoline_code. Set solib_svr4_fetch_link_map_offsets to svr4_lp64_fetch_link_map_offsets. * sparc64obsd-tdep.c: Include "objfiles.h". Don't include "nbsd-tdep.h". (sparc64obsd_init_abi): Set in_solib_call_trampoline and skip_trampoline_code. Set solib_svr4_fetch_link_map_offsets to svr4_lp64_fetch_link_map_offsets. * Makefile.in (sparc64nbsd-tdep.o, sparc64obsd-tdep.o): Update dependencies. --- gdb/ChangeLog | 12 ++++++++++++ gdb/Makefile.in | 8 ++++---- gdb/sparc64nbsd-tdep.c | 6 +++++- gdb/sparc64obsd-tdep.c | 7 +++++-- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c39d7f8ce2d..5bb6a92e8d6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,17 @@ 2004-09-19 Mark Kettenis + * sparc64nbsd-tdep.c: Include "objfiles.h". + (sparc64nbsd_init_abi): Set in_solib_call_trampoline and + skip_trampoline_code. Set solib_svr4_fetch_link_map_offsets to + svr4_lp64_fetch_link_map_offsets. + * sparc64obsd-tdep.c: Include "objfiles.h". Don't include + "nbsd-tdep.h". + (sparc64obsd_init_abi): Set in_solib_call_trampoline and + skip_trampoline_code. Set solib_svr4_fetch_link_map_offsets to + svr4_lp64_fetch_link_map_offsets. + * Makefile.in (sparc64nbsd-tdep.o, sparc64obsd-tdep.o): Update + dependencies. + * fbsd-nat.c: New files with cleaned up contents of fbsd-proc.c. * fbsd-nat.h: New file. * Makefile.in (ALLDEPFILES): Add fbsd-nat.c. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index d992016e5b2..1bff56692d0 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2515,11 +2515,11 @@ sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(regcache_h) \ $(sparc64_tdep_h) $(sparc_nat_h) $(bsd_kvm_h) sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \ $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ - $(symtab_h) $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) \ - $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h) + $(symtab_h) $(objfiles_h) $(solib_svr4_h) $(trad_frame_h) \ + $(gdb_assert_h) $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h) sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \ - $(frame_unwind_h) $(osabi_h) $(regset_h) $(symtab_h) $(solib_svr4_h) \ - $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(nbsd_tdep_h) + $(frame_unwind_h) $(osabi_h) $(regset_h) $(symtab_h) $(objfiles_h) \ + $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \ $(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(solib_svr4_h) diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c index 35ad2326ff3..aa665da8c5d 100644 --- a/gdb/sparc64nbsd-tdep.c +++ b/gdb/sparc64nbsd-tdep.c @@ -28,6 +28,7 @@ #include "regcache.h" #include "regset.h" #include "symtab.h" +#include "objfiles.h" #include "solib-svr4.h" #include "trad-frame.h" @@ -236,8 +237,11 @@ sparc64nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) sparc64_init_abi (info, gdbarch); + /* NetBSD/sparc64 has SVR4-style shared libraries... */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); set_solib_svr4_fetch_link_map_offsets - (gdbarch, nbsd_lp64_solib_svr4_fetch_link_map_offsets); + (gdbarch, svr4_lp64_fetch_link_map_offsets); } diff --git a/gdb/sparc64obsd-tdep.c b/gdb/sparc64obsd-tdep.c index 5f8cb3bc480..fdd5e8184ce 100644 --- a/gdb/sparc64obsd-tdep.c +++ b/gdb/sparc64obsd-tdep.c @@ -25,13 +25,13 @@ #include "osabi.h" #include "regset.h" #include "symtab.h" +#include "objfiles.h" #include "solib-svr4.h" #include "trad-frame.h" #include "gdb_assert.h" #include "sparc64-tdep.h" -#include "nbsd-tdep.h" /* OpenBSD uses the traditional NetBSD core file format, even for ports that use ELF. The core files don't use multiple register @@ -201,8 +201,11 @@ sparc64obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) sparc64_init_abi (info, gdbarch); + /* OpenBSD/sparc64 has SVR4-style shared libraries... */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); set_solib_svr4_fetch_link_map_offsets - (gdbarch, nbsd_lp64_solib_svr4_fetch_link_map_offsets); + (gdbarch, svr4_lp64_fetch_link_map_offsets); } -- 2.30.2