summaryrefslogtreecommitdiff
path: root/gdb/armobsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2006-07-16 15:29:09 +0000
committerMark Kettenis <kettenis@gnu.org>2006-07-16 15:29:09 +0000
commit60d4d612c5b87f35e516e84b951103ecde0bc5b0 (patch)
tree636f7742267f2b5ae4e1c1b8ff40c2d19d847e4e /gdb/armobsd-tdep.c
parentd183a780518b296f5d145ffbaea1fc751bd99759 (diff)
downloadgdb-60d4d612c5b87f35e516e84b951103ecde0bc5b0.tar.gz
* 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.
Diffstat (limited to 'gdb/armobsd-tdep.c')
-rw-r--r--gdb/armobsd-tdep.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/gdb/armobsd-tdep.c b/gdb/armobsd-tdep.c
new file mode 100644
index 00000000000..6b64b28e117
--- /dev/null
+++ b/gdb/armobsd-tdep.c
@@ -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);
+}