aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-11-29 15:20:28 +0000
committerMark Kettenis <kettenis@gnu.org>2004-11-29 15:20:28 +0000
commit19671c2bed5867a22fd794843bec11d1c0f8f264 (patch)
tree902ec75fe51816215a9afc6629d09b42201665b5
parenta7498ae6da27216b89836d96a72ce166ef883030 (diff)
downloadgdb-19671c2bed5867a22fd794843bec11d1c0f8f264.zip
gdb-19671c2bed5867a22fd794843bec11d1c0f8f264.tar.gz
gdb-19671c2bed5867a22fd794843bec11d1c0f8f264.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/sparc-tdep.h3
-rw-r--r--gdb/sparcnbsd-tdep.c2
-rw-r--r--gdb/sparcobsd-tdep.c8
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 <kettenis@gnu.org>
+ * 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);
}