From: Mark Kettenis Date: Mon, 29 Nov 2004 15:20:28 +0000 (+0000) Subject: * sparc-tdep.h (sparc32nbsd_elf_init_abi): New prototype. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19671c2bed5867a22fd794843bec11d1c0f8f264;p=binutils-gdb.git * sparc-tdep.h (sparc32nbsd_elf_init_abi): New prototype. * sparcnbsd-tdep.c (sparc32nbsd_elf_init_abi): Make global. * sparcobsd-tdep.c (sparc32obsd_init_abi): Call sparc32nbsd_elf_init_abi. Remove duplicate code. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 30b58f23c6f..838b9055bd4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2004-11-29 Mark Kettenis + * sparc-tdep.h (sparc32nbsd_elf_init_abi): New prototype. + * sparcnbsd-tdep.c (sparc32nbsd_elf_init_abi): Make global. + * sparcobsd-tdep.c (sparc32obsd_init_abi): Call + sparc32nbsd_elf_init_abi. Remove duplicate code. + * config/sparc/nbsdaout.mh (NAT_FILE): Set to solib.h. * config/sparc/nbsdelf.mh (NAT_FILE): Remove variable. * config/sparc/nm-nbsd.h: Remove file. diff --git a/gdb/sparc-tdep.h b/gdb/sparc-tdep.h index bbfbb422d9c..9058d063fd1 100644 --- a/gdb/sparc-tdep.h +++ b/gdb/sparc-tdep.h @@ -198,6 +198,9 @@ extern void sparc32_sol2_init_abi (struct gdbarch_info info, /* Register offsets for NetBSD. */ extern const struct sparc_gregset sparc32nbsd_gregset; +extern void sparc32nbsd_elf_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch); + extern struct trad_frame_saved_reg * sparc32nbsd_sigcontext_saved_regs (struct frame_info *next_frame); diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c index bfdb114d232..c033303fa46 100644 --- a/gdb/sparcnbsd-tdep.c +++ b/gdb/sparcnbsd-tdep.c @@ -281,7 +281,7 @@ sparc32nbsd_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) sparc32nbsd_init_abi (info, gdbarch); } -static void +void sparc32nbsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { sparc32nbsd_init_abi (info, gdbarch); diff --git a/gdb/sparcobsd-tdep.c b/gdb/sparcobsd-tdep.c index 47f64bbbbff..7c3bcc91ae7 100644 --- a/gdb/sparcobsd-tdep.c +++ b/gdb/sparcobsd-tdep.c @@ -147,14 +147,10 @@ sparc32obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - /* OpenBSD doesn't support the 128-bit `long double' from the psABI. */ - set_gdbarch_long_double_bit (gdbarch, 64); - set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big); + /* OpenBSD/sparc is very similar to NetBSD/sparc ELF. */ + sparc32nbsd_elf_init_abi (info, gdbarch); frame_unwind_append_sniffer (gdbarch, sparc32obsd_sigtramp_frame_sniffer); - - set_solib_svr4_fetch_link_map_offsets - (gdbarch, svr4_ilp32_fetch_link_map_offsets); }