aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog22
-rw-r--r--gdb/Makefile.in5
-rw-r--r--gdb/alphanbsd-tdep.c3
-rw-r--r--gdb/config/mips/nbsd.mt3
-rw-r--r--gdb/mipsnbsd-tdep.c4
-rw-r--r--gdb/nbsd-tdep.c11
-rw-r--r--gdb/nbsd-tdep.h2
-rw-r--r--gdb/ppcnbsd-tdep.c9
-rw-r--r--gdb/shnbsd-tdep.c9
-rw-r--r--gdb/sparcnbsd-tdep.c2
10 files changed, 65 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index aea6c45..cbb7355 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,25 @@
+2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (mipsnbsd-tdep.o): Add nbsd-tdep.h to dependency
+ list.
+ (nbsd-tdep.o): Add $(gdb_string_h) to dependency list.
+ * alphanbsd-tdep.c (alphanbsd_pc_in_sigtramp): Use
+ nbsd_pc_in_sigtramp.
+ * mipsnbsd-tdep.c: Include nbsd-tdep.h.
+ (mipsnbsd_pc_in_sigtramp): Use nbsd_pc_in_sigtramp.
+ * nbsd-tdep.c: Include gdb_string.h.
+ (nbsd_pc_in_sigtramp): New function.
+ * nbsd-tdep.h (nbsd_pc_in_sigtramp): New prototype.
+ * ppcnbsd-tdep.c (ppcnbsd_pc_in_sigtramp): New function.
+ (ppcnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ ppcnbsd_pc_in_sigtramp.
+ * shnbsd-tdep.c (shnbsd_pc_in_sigtramp): New function.
+ (shnbsd_init_abi): Set gdbarch_pc_in_sigtramp to
+ shnbsd_pc_in_sigtramp.
+ * sparcnbsd-tdep.c (sparcnbsd_init_abi_elf): Set
+ gdbarch_pc_in_sigtramp to nbsd_pc_in_sigtramp.
+ * config/mips/nbsd.mt (TDEPFILES): Add nbsd-tdep.o.
+
2002-08-30 Pierre Muller <muller@ics.u-strasbg.fr>
* breakpoint.c (breakpoint_init_inferior): Reset the val field of
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index fdaaa8d..1c9a327 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1905,7 +1905,8 @@ mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(mipsnbsd_tdep_h)
mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(value_h) $(osabi_h) $(mipsnbsd_tdep_h) $(solib_svr4_h)
+ $(target_h) $(value_h) $(osabi_h) $(mipsnbsd_tdep_h) $(solib_svr4_h) \
+ nbsd-tdep.h
mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
$(coff_sym_h) $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) \
@@ -1924,7 +1925,7 @@ mon960-rom.o: mon960-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
$(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_regex_h) $(srec_h) $(regcache_h)
-nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(solib_svr4_h)
+nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h)
nindy-tdep.o: nindy-tdep.c $(defs_h) $(symtab_h) $(frame_h) $(gdbcore_h)
nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(buildsym_h) $(stabsread_h)
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 519d816..a3a1f53 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -178,7 +178,8 @@ alphanbsd_sigtramp_offset (CORE_ADDR pc)
static int
alphanbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (alphanbsd_sigtramp_offset (pc) >= 0);
+ return (nbsd_pc_in_sigtramp (pc, func_name)
+ || alphanbsd_sigtramp_offset (pc) >= 0);
}
static void
diff --git a/gdb/config/mips/nbsd.mt b/gdb/config/mips/nbsd.mt
index de52916..eb5d887 100644
--- a/gdb/config/mips/nbsd.mt
+++ b/gdb/config/mips/nbsd.mt
@@ -1,5 +1,6 @@
# Target: MIPS running NetBSD
-TDEPFILES= mips-tdep.o mipsnbsd-tdep.o corelow.o solib.o solib-svr4.o
+TDEPFILES= mips-tdep.o mipsnbsd-tdep.o corelow.o solib.o solib-svr4.o \
+ nbsd-tdep.o
TM_FILE= tm-nbsd.h
SIM_OBS = remote-sim.o
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 029ae6f..3367e36 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -26,6 +26,7 @@
#include "value.h"
#include "osabi.h"
+#include "nbsd-tdep.h"
#include "mipsnbsd-tdep.h"
#include "solib-svr4.h"
@@ -219,7 +220,8 @@ mipsnbsd_sigtramp_offset (CORE_ADDR pc)
static int
mipsnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (mipsnbsd_sigtramp_offset (pc) >= 0);
+ return (nbsd_pc_in_sigtramp (pc, func_name)
+ || mipsnbsd_sigtramp_offset (pc) >= 0);
}
/* Figure out where the longjmp will land. We expect that we have
diff --git a/gdb/nbsd-tdep.c b/gdb/nbsd-tdep.c
index 71e229d..a2d8f7d 100644
--- a/gdb/nbsd-tdep.c
+++ b/gdb/nbsd-tdep.c
@@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "gdb_string.h"
#include "solib-svr4.h"
/* Fetch (and possibly build) an appropriate link_map_offsets
@@ -96,3 +97,13 @@ nbsd_lp64_solib_svr4_fetch_link_map_offsets (void)
return lmp;
}
+
+int
+nbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
+{
+ /* Check for libc-provided signal trampoline. All such trampolines
+ have function names which begin with "__sigtramp". */
+
+ return (func_name != NULL
+ && strncmp (func_name, "__sigtramp", 10) == 0);
+}
diff --git a/gdb/nbsd-tdep.h b/gdb/nbsd-tdep.h
index ca40965..9d26ae9 100644
--- a/gdb/nbsd-tdep.h
+++ b/gdb/nbsd-tdep.h
@@ -25,4 +25,6 @@
struct link_map_offsets *nbsd_ilp32_solib_svr4_fetch_link_map_offsets (void);
struct link_map_offsets *nbsd_lp64_solib_svr4_fetch_link_map_offsets (void);
+int nbsd_pc_in_sigtramp (CORE_ADDR, char *);
+
#endif /* NBSD_TDEP_H */
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 6fabab7..3d052a8 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -196,6 +196,13 @@ static struct core_fns ppcnbsd_elfcore_fns =
NULL /* next */
};
+static int
+ppcnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
+{
+ /* FIXME: Need to add support for kernel-provided signal trampolines. */
+ return (nbsd_pc_in_sigtramp (pc, func_name));
+}
+
static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
@@ -203,6 +210,8 @@ ppcnbsd_init_abi (struct gdbarch_info info,
/* Stop at main. */
set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+ set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp);
+
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
}
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index 0298226..b67884d 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -165,10 +165,19 @@ static struct core_fns shnbsd_elfcore_fns =
NULL /* next */
};
+static int
+shnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
+{
+ /* FIXME: Need to add support for kernel-provided signal trampolines. */
+ return (nbsd_pc_in_sigtramp (pc, func_name));
+}
+
static void
shnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
+ set_gdbarch_pc_in_sigtramp (gdbarch, shnbsd_pc_in_sigtramp);
+
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
}
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index ea70e51..1103eaa 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -500,6 +500,8 @@ sparcnbsd_init_abi_elf (struct gdbarch_info info,
{
sparcnbsd_init_abi_common (info, gdbarch);
+ set_gdbarch_pc_in_sigtramp (gdbarch, nbsd_pc_in_sigtramp);
+
set_solib_svr4_fetch_link_map_offsets (gdbarch,
gdbarch_ptr_bit (gdbarch) == 32 ?
nbsd_ilp32_solib_svr4_fetch_link_map_offsets :