aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2002-06-30 14:43:24 +0000
committerMark Kettenis <kettenis@gnu.org>2002-06-30 14:43:24 +0000
commit9c5045b55215d45e352d593993892da54df718f8 (patch)
tree5b5a72104405129ad51122f8531fc4cfe96df4f5
parent99c847f2174738e4155fbd06598051dde97d70b4 (diff)
downloadgdb-9c5045b55215d45e352d593993892da54df718f8.zip
gdb-9c5045b55215d45e352d593993892da54df718f8.tar.gz
gdb-9c5045b55215d45e352d593993892da54df718f8.tar.bz2
* config/i386/tm-fbsd.h [!SVR4_SHARED_LIBS]
(IN_SOLIB_CALL_TRAMPOLINE): Remove define. * config/i386/tm-nbsdaout.h (IN_SOLIB_CALL_TRAMPOLINE): Remove define. * i386bsd-tdep.c: Include "arch-utils.h". (i386bsd_aout_in_solib_call_trampoline): New function. (i386bsd_init_abi): Set in_solib_call_trampoline to i386bsd_aout_in_solib_call_trampoline. (i386nbsdelf_init_abi, i386fbsd_init_abi): Set in_solib_call_trampoline to generic_in_solib_call_trampoline.
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/config/i386/tm-fbsd.h11
-rw-r--r--gdb/config/i386/tm-nbsdaout.h4
-rw-r--r--gdb/i386bsd-tdep.c23
4 files changed, 36 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0034e77..029b484 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+2002-06-30 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-fbsd.h [!SVR4_SHARED_LIBS]
+ (IN_SOLIB_CALL_TRAMPOLINE): Remove define.
+ * config/i386/tm-nbsdaout.h (IN_SOLIB_CALL_TRAMPOLINE): Remove
+ define.
+ * i386bsd-tdep.c: Include "arch-utils.h".
+ (i386bsd_aout_in_solib_call_trampoline): New function.
+ (i386bsd_init_abi): Set in_solib_call_trampoline to
+ i386bsd_aout_in_solib_call_trampoline.
+ (i386nbsdelf_init_abi, i386fbsd_init_abi): Set
+ in_solib_call_trampoline to generic_in_solib_call_trampoline.
+
2002-06-28 Andrew Cagney <ac131313@redhat.com>
* macrotab.h: Do not include "obstack.h" or "bcache.h".
diff --git a/gdb/config/i386/tm-fbsd.h b/gdb/config/i386/tm-fbsd.h
index 7d90c2e..1975a9b 100644
--- a/gdb/config/i386/tm-fbsd.h
+++ b/gdb/config/i386/tm-fbsd.h
@@ -39,15 +39,4 @@
extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
-/* Shared library support. */
-
-#ifndef SVR4_SHARED_LIBS
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- (name && !strcmp(name, "_DYNAMIC"))
-
-#endif /* !SVR4_SHARED_LIBS */
-
#endif /* TM_FBSD_H */
diff --git a/gdb/config/i386/tm-nbsdaout.h b/gdb/config/i386/tm-nbsdaout.h
index 8dde114..25325e1 100644
--- a/gdb/config/i386/tm-nbsdaout.h
+++ b/gdb/config/i386/tm-nbsdaout.h
@@ -23,8 +23,4 @@
#include "i386/tm-nbsd.h"
-/* Return non-zero if we are in a shared library trampoline code stub. */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- (name && !strcmp(name, "_DYNAMIC"))
-
#endif /* TM_NBSDAOUT_H */
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index e6427b3..940f2ec 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "arch-utils.h"
#include "frame.h"
#include "gdbcore.h"
#include "regcache.h"
@@ -98,6 +99,16 @@ i386bsd_sigtramp_end (CORE_ADDR pc)
}
+/* Support for shared libraries. */
+
+/* Return non-zero if we are in a shared library trampoline code stub. */
+
+int
+i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ return (name && !strcmp (name, "_DYNAMIC"));
+}
+
/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD). */
/* From <machine/signal.h>. */
@@ -110,6 +121,10 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp);
+ /* Assume SunOS-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ i386bsd_aout_in_solib_call_trampoline);
+
tdep->jb_pc_offset = 0;
tdep->sigtramp_saved_pc = i386bsd_sigtramp_saved_pc;
@@ -155,6 +170,10 @@ i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* But ELF-based. */
i386_elf_init_abi (info, gdbarch);
+ /* NetBSD ELF uses SVR4-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ generic_in_solib_call_trampoline);
+
/* NetBSD ELF uses -fpcc-struct-return by default. */
tdep->struct_return = pcc_struct_return;
@@ -193,6 +212,10 @@ i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Except that it uses ELF. */
i386_elf_init_abi (info, gdbarch);
+
+ /* FreeBSD ELF uses SVR4-style shared libraries. */
+ set_gdbarch_in_solib_call_trampoline (gdbarch,
+ generic_in_solib_call_trampoline);
}
/* FreeBSD 4.0-RELEASE or later. */