summaryrefslogtreecommitdiff
path: root/gdb/tramp-frame.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-04-02 19:44:25 +0000
committerAndrew Cagney <cagney@redhat.com>2004-04-02 19:44:25 +0000
commit8cada5b48145f9c4a62dc04695b8410e277424f0 (patch)
tree66378157dc56d18f0035f881b6090cc764f5aca0 /gdb/tramp-frame.c
parent9b330147e31047e67698e2889fc9387f32911866 (diff)
downloadgdb-8cada5b48145f9c4a62dc04695b8410e277424f0.tar.gz
2004-04-02 Andrew Cagney <cagney@redhat.com>
* frame.c (safe_frame_unwind_memory): New function. * frame.h (safe_frame_unwind_memory): Declare. Update description of /safe_/ methods. * tramp-frame.c (tramp_frame_start): Re-order parmeters, add "next_frame". Use safe_frame_unwind_memory. (tramp_frame_sniffer): Update call to tramp_frame_start.
Diffstat (limited to 'gdb/tramp-frame.c')
-rw-r--r--gdb/tramp-frame.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c
index ee3635f743b..528603c7452 100644
--- a/gdb/tramp-frame.c
+++ b/gdb/tramp-frame.c
@@ -85,7 +85,8 @@ tramp_frame_prev_register (struct frame_info *next_frame,
}
static CORE_ADDR
-tramp_frame_start (CORE_ADDR pc, const struct tramp_frame *tramp)
+tramp_frame_start (const struct tramp_frame *tramp,
+ struct frame_info *next_frame, CORE_ADDR pc)
{
int ti;
/* Search through the trampoline for one that matches the
@@ -100,8 +101,9 @@ tramp_frame_start (CORE_ADDR pc, const struct tramp_frame *tramp)
ULONGEST insn;
if (tramp->insn[i] == TRAMP_SENTINEL_INSN)
return func;
- if (target_read_memory (func + i * tramp->insn_size, buf,
- tramp->insn_size) != 0)
+ if (!safe_frame_unwind_memory (next_frame,
+ func + i * tramp->insn_size,
+ buf, tramp->insn_size))
break;
insn = extract_unsigned_integer (buf, tramp->insn_size);
if (tramp->insn[i] != insn)
@@ -133,7 +135,7 @@ tramp_frame_sniffer (const struct frame_unwind *self,
if (find_pc_section (pc) != NULL)
return 0;
/* Finally, check that the trampoline matches at PC. */
- func = tramp_frame_start (pc, tramp);
+ func = tramp_frame_start (tramp, next_frame, pc);
if (func == 0)
return 0;
tramp_cache = FRAME_OBSTACK_ZALLOC (struct tramp_frame_cache);