aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-12-26 19:15:11 +0000
committerMark Kettenis <kettenis@gnu.org>2005-12-26 19:15:11 +0000
commitfb08a90b3c7ddfbf5e021983c5f6c52991cacb6a (patch)
tree69b0454950502f79a737d5f591a32641f3bd4ede
parentc65016bd6fe28602a60ce1a8608845115c890ea6 (diff)
downloadgdb-fb08a90b3c7ddfbf5e021983c5f6c52991cacb6a.zip
gdb-fb08a90b3c7ddfbf5e021983c5f6c52991cacb6a.tar.gz
gdb-fb08a90b3c7ddfbf5e021983c5f6c52991cacb6a.tar.bz2
* obsd-tdep.c: New file.
* obsd-tdep.h: New file. * Makefile.in (obsd_tdep_h): New variable. (ALLDEPFILES): Add obsd-tdep.c. (obsd-tdep.o): New target.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/Makefile.in4
-rw-r--r--gdb/obsd-tdep.c38
-rw-r--r--gdb/obsd-tdep.h29
4 files changed, 78 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 010441c..7978e34 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2005-12-26 Mark Kettenis <kettenis@gnu.org>
+
+ * obsd-tdep.c: New file.
+ * obsd-tdep.h: New file.
+ * Makefile.in (obsd_tdep_h): New variable.
+ (ALLDEPFILES): Add obsd-tdep.c.
+ (obsd-tdep.o): New target.
+
2005-12-23 Michael Snyder <msnyder@redhat.com>
* inf-ptrace.c: Spelling correction, comment.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 0b10df4..e2db4a1 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -743,6 +743,7 @@ nbsd_tdep_h = nbsd-tdep.h
nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) $(osabi_h) $(regset_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
parser_defs_h = parser-defs.h $(doublest_h)
@@ -1425,7 +1426,7 @@ ALLDEPFILES = \
mips-tdep.c mipsv4-nat.c \
mipsnbsd-nat.c mipsnbsd-tdep.c \
mips64obsd-nat.c mips64obsd-tdep.c \
- nbsd-tdep.c \
+ nbsd-tdep.c obsd-tdep.c \
solib-osf.c \
somread.c solib-som.c $(HPREAD_SOURCE) \
ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c \
@@ -2338,6 +2339,7 @@ nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(exceptions_h) \
nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \
$(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \
$(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h)
+obsd-tdep.o: obsd-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(obsd_tdep_h)
objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \
$(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \
$(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \
diff --git a/gdb/obsd-tdep.c b/gdb/obsd-tdep.c
new file mode 100644
index 0000000..5e6dacc
--- /dev/null
+++ b/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/gdb/obsd-tdep.h b/gdb/obsd-tdep.h
new file mode 100644
index 0000000..7b968c5
--- /dev/null
+++ b/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 */