* armobsd-tdep.c: New file.
authorMark Kettenis <kettenis@gnu.org>
Sun, 16 Jul 2006 15:29:09 +0000 (15:29 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sun, 16 Jul 2006 15:29:09 +0000 (15:29 +0000)
* Makefile.in (ALLDEPFILES): Add armobsd-tdep.c.
(armobsd-tdep.o): New dependency.
* config/arm/obsd.mt: New file.
* configure.tgt: (arm*-*-openbsd*): Set gdb_target to obsd.

gdb/ChangeLog
gdb/Makefile.in
gdb/armobsd-tdep.c [new file with mode: 0644]
gdb/config/arm/obsd.mt [new file with mode: 0644]
gdb/configure.tgt

index 74149e1ebec9c9b862b6cbffe2662f74e2543307..584d512b4e88b4caa63a96f6b78b9c53c31b5677 100644 (file)
@@ -1,5 +1,11 @@
 2006-07-16  Mark Kettenis  <kettenis@gnu.org>
 
+       * armobsd-tdep.c: New file.
+       * Makefile.in (ALLDEPFILES): Add armobsd-tdep.c.
+       (armobsd-tdep.o): New dependency.
+       * config/arm/obsd.mt: New file.
+       * configure.tgt: (arm*-*-openbsd*): Set gdb_target to obsd.
+
        * gdbarch.sh (deprecated_saved_pc_after_call): Delete.
        * gdbarch.h, gdbarch.c: Re-generate.
 
index 5aab98fcb40427bd8f9ed4589ecee263d987bc15..0359897cc20cac118fb424c9aae2dcfe4668cfc8 100644 (file)
@@ -1418,7 +1418,7 @@ ALLDEPFILES = \
        amd64-linux-nat.c amd64-linux-tdep.c \
        amd64-sol2-tdep.c \
        arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \
-       armnbsd-nat.c armnbsd-tdep.c \
+       armnbsd-nat.c armnbsd-tdep.c armobsd-tdep.c \
        avr-tdep.c \
        bsd-uthread.c bsd-kvm.c \
        coff-solib.c \
@@ -1783,6 +1783,8 @@ armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
        $(regcache_h) $(target_h) $(gdb_string_h) $(arm_tdep_h) $(inf_ptrace_h)
 armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
        $(arm_tdep_h) $(solib_svr4_h)
+armobsd-tdep.o: armobsd-tdep.c $(defs_h) $(osabi_h) \
+       $(arm_tdep_h) $(solib_svr4_h)
 arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
        $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
        $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \
diff --git a/gdb/armobsd-tdep.c b/gdb/armobsd-tdep.c
new file mode 100644 (file)
index 0000000..6b64b28
--- /dev/null
@@ -0,0 +1,50 @@
+/* Target-dependent code for OpenBSD/arm.
+
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+#include "defs.h"
+#include "osabi.h"
+
+#include "arm-tdep.h"
+#include "solib-svr4.h"
+
+static void
+armobsd_init_abi (struct gdbarch_info info,
+                 struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  if (tdep->fp_model == ARM_FLOAT_AUTO)
+    tdep->fp_model = ARM_FLOAT_SOFT_VFP;
+
+  /* OpenBSD/arm uses SVR4-style shared libraries.  */
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+  tdep->jb_pc = 24;
+  tdep->jb_elt_size = 4;
+}
+
+void
+_initialize_armobsd_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_arm, 0, GDB_OSABI_OPENBSD_ELF,
+                         armobsd_init_abi);
+}
diff --git a/gdb/config/arm/obsd.mt b/gdb/config/arm/obsd.mt
new file mode 100644 (file)
index 0000000..88b0969
--- /dev/null
@@ -0,0 +1,2 @@
+# Target: OpenBSD/arm
+TDEPFILES= arm-tdep.o armobsd-tdep.o solib.o solib-svr4.o
index c496694186554298e07f19cad053b608a1d2e0ab..6ddc5813ffa3efe19c34697e4587b93673b7c2b5 100644 (file)
@@ -58,7 +58,7 @@ arm*-*-linux*)                gdb_target=linux
 arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
                        gdb_target=nbsd ;;
 arm-*-nto*)            gdb_target=nto ;;
-arm*-*-openbsd*)       gdb_target=nbsd ;;
+arm*-*-openbsd*)       gdb_target=obsd ;;
 arm*-*-* | thumb*-*-* | strongarm*-*-*)
                        gdb_target=embed
                        build_rdi_share=yes
This page took 0.031817 seconds and 4 git commands to generate.