aboutsummaryrefslogtreecommitdiff
path: root/gdb/a29k-tdep.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-01-13 18:44:06 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-01-13 18:44:06 +0000
commit63dcc380266e80411e37bdb72fd6e0fad8c94072 (patch)
tree053991dec7ff801d443cdfddc8ef7ba2dbb23503 /gdb/a29k-tdep.c
parentd6596eee9fbabb9c37160cf6291f1dc343b5e652 (diff)
downloadgdb-63dcc380266e80411e37bdb72fd6e0fad8c94072.zip
gdb-63dcc380266e80411e37bdb72fd6e0fad8c94072.tar.gz
gdb-63dcc380266e80411e37bdb72fd6e0fad8c94072.tar.bz2
Add search to target vector (#if 0'd until after 4.12):
* target.h (to_search, target_search): Add. * gdbcore.h, core.c (generic_search): Add. * remote.c (remote_search): Add. * a29k-tdep.c (init_frame_info): Use target_search to find traceback tag.
Diffstat (limited to 'gdb/a29k-tdep.c')
-rw-r--r--gdb/a29k-tdep.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/a29k-tdep.c b/gdb/a29k-tdep.c
index a34b189..7d02b8b 100644
--- a/gdb/a29k-tdep.c
+++ b/gdb/a29k-tdep.c
@@ -418,10 +418,20 @@ init_frame_info (innermost_frame, fci)
/* Search backward to find the trace-back tag. However,
do not trace back beyond the start of the text segment
(just as a sanity check to avoid going into never-never land). */
+#if 1
while (p >= text_start
&& ((insn = read_memory_integer (p, 4)) & TAGWORD_ZERO_MASK) != 0)
p -= 4;
-
+#else /* 0 */
+ char pat[4] = {0, 0, 0, 0};
+ char mask[4];
+ char insn_raw[4];
+ store_unsigned_integer (mask, 4, TAGWORD_ZERO_MASK);
+ /* Enable this once target_search is enabled and tested. */
+ target_search (4, pat, mask, p, -4, text_start, p+1, &p, &insn_raw);
+ insn = extract_unsigned_integer (insn_raw, 4);
+#endif /* 0 */
+
if (p < text_start)
{
/* Couldn't find the trace-back tag.