aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-08-31 22:43:38 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-08-31 22:43:38 +0000
commit2ca8ae213fae4c0525535b7ecc9747764a5489d1 (patch)
treebf9f4a06f2a58cf67e6753254e10ad41e40047a8
parent3d9b49b09003d8b0cba6ca18d1b6240f984d3e8f (diff)
downloadgdb-2ca8ae213fae4c0525535b7ecc9747764a5489d1.zip
gdb-2ca8ae213fae4c0525535b7ecc9747764a5489d1.tar.gz
gdb-2ca8ae213fae4c0525535b7ecc9747764a5489d1.tar.bz2
* Makefile.in (alphanbsd-tdep.o): Add $(frame_h) to dependency
list. * alphanbsd-tdep.c (alphanbsd_sigcontext_addr) (alphanbsd_skip_sigtramp_frame): New functions. (alphanbsd_init_abi): Set tdep->skip_sigtramp_frame to alphanbsd_skip_sigtramp_frame. Set tdep->sigcontext_addr to alphanbsd_sigcontext_addr.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/Makefile.in6
-rw-r--r--gdb/alphanbsd-tdep.c26
3 files changed, 39 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cbb7355..78b73c8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2002-08-31 Jason Thorpe <thorpej@wasabisystems.com>
+ * Makefile.in (alphanbsd-tdep.o): Add $(frame_h) to dependency
+ list.
+ * alphanbsd-tdep.c (alphanbsd_sigcontext_addr)
+ (alphanbsd_skip_sigtramp_frame): New functions.
+ (alphanbsd_init_abi): Set tdep->skip_sigtramp_frame to
+ alphanbsd_skip_sigtramp_frame. Set tdep->sigcontext_addr
+ to alphanbsd_sigcontext_addr.
+
+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.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 1c9a327..55838c6 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1500,9 +1500,9 @@ alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
$(alphabsd_tdep_h)
alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h)
-alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(value_h) $(solib_svr4_h) $(alpha_tdep_h) $(alphabsd_tdep_h) \
- $(nbsd_tdep_h)
+alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
+ $(regcache_h) $(value_h) $(solib_svr4_h) $(alpha_tdep_h) \
+ $(alphabsd_tdep_h) $(nbsd_tdep_h)
annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
$(gdbtypes_h) $(breakpoint_h)
# OBSOLETE arc-tdep.o: arc-tdep.c
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index a3a1f53..bc7b1a4 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "gdbcore.h"
+#include "frame.h"
#include "regcache.h"
#include "value.h"
@@ -182,6 +183,29 @@ alphanbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
|| alphanbsd_sigtramp_offset (pc) >= 0);
}
+static CORE_ADDR
+alphanbsd_sigcontext_addr (struct frame_info *frame)
+{
+ /* FIXME: This is not correct for all versions of NetBSD/alpha.
+ We will probably need to disassemble the trampoline to figure
+ out which trampoline frame type we have. */
+ return frame->frame;
+}
+
+static CORE_ADDR
+alphanbsd_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
+{
+ char *name;
+
+ /* FIXME: This is not correct for all versions of NetBSD/alpha.
+ We will probably need to disassemble the trampoline to figure
+ out which trampoline frame type we have. */
+ find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return frame->frame;
+ return 0;
+}
+
static void
alphanbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
@@ -197,7 +221,9 @@ alphanbsd_init_abi (struct gdbarch_info info,
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_lp64_solib_svr4_fetch_link_map_offsets);
+ tdep->skip_sigtramp_frame = alphanbsd_skip_sigtramp_frame;
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
+ tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;