From 19671c2bed5867a22fd794843bec11d1c0f8f264 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 29 Nov 2004 15:20:28 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 5 +++++ gdb/sparc-tdep.h | 3 +++ gdb/sparcnbsd-tdep.c | 2 +- gdb/sparcobsd-tdep.c | 8 ++------ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 30b58f2..838b905 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 bbfbb42..9058d06 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 bfdb114..c033303 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 47f64bb..7c3bcc9 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); } -- 2.7.4