summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/binutils')
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.in2
-rw-r--r--gnu/usr.bin/binutils/gdb/obsd-tdep.c38
-rw-r--r--gnu/usr.bin/binutils/gdb/obsd-tdep.h29
3 files changed, 69 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.in b/gnu/usr.bin/binutils/gdb/Makefile.in
index 0092897d13e..080335fcbf2 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile.in
+++ b/gnu/usr.bin/binutils/gdb/Makefile.in
@@ -739,6 +739,7 @@ ns32k_tdep_h = ns32k-tdep.h
nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h)
objc_lang_h = objc-lang.h
objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
+obsd_tdep_h = obsd-tdep.h
ocd_h = ocd.h
osabi_h = osabi.h
pa64solib_h = pa64solib.h
@@ -2289,6 +2290,7 @@ objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(breakpoint_h) $(block_h) $(dictionary_h)
observer.o: observer.c $(defs_h) $(observer_h) $(command_h) $(gdbcmd_h) \
$(observer_inc)
+obsd-tdep.o: obsd-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(obsd_tdep_h)
ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
$(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h)
diff --git a/gnu/usr.bin/binutils/gdb/obsd-tdep.c b/gnu/usr.bin/binutils/gdb/obsd-tdep.c
new file mode 100644
index 00000000000..5e6dacc0d22
--- /dev/null
+++ b/gnu/usr.bin/binutils/gdb/obsd-tdep.c
@@ -0,0 +1,38 @@
+/* Target-dependent code for OpenBSD.
+
+ Copyright (C) 2005 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 "frame.h"
+#include "symtab.h"
+
+#include "obsd-tdep.h"
+
+CORE_ADDR
+obsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+ struct minimal_symbol *msym;
+
+ msym = lookup_minimal_symbol("_dl_bind", NULL, NULL);
+ if (msym && SYMBOL_VALUE_ADDRESS (msym) == pc)
+ return frame_pc_unwind (get_current_frame ());
+ else
+ return find_solib_trampoline_target (pc);
+}
diff --git a/gnu/usr.bin/binutils/gdb/obsd-tdep.h b/gnu/usr.bin/binutils/gdb/obsd-tdep.h
new file mode 100644
index 00000000000..7b968c5e894
--- /dev/null
+++ b/gnu/usr.bin/binutils/gdb/obsd-tdep.h
@@ -0,0 +1,29 @@
+/* Target-dependent code for OpenBSD.
+
+ Copyright (C) 2005 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. */
+
+#ifndef OBSD_TDEP_H
+#define OBSD_TDEP_H 1
+
+struct gdbarch;
+
+CORE_ADDR obsd_skip_solib_resolver (struct gdbarch *, CORE_ADDR);
+
+#endif /* obsd-tdep.h */