From f4ca1d1f2262adfc170c511006ef2d1684cda694 Mon Sep 17 00:00:00 2001 From: Randolph Chung Date: Sat, 8 May 2004 03:59:34 +0000 Subject: 2004-05-07 Randolph Chung * hppa-tdep.c (skip_prologue_hard_way, hppa_frame_cache): Use read_memory_nobpt for code reading when doing frame unwinding. * hppa-linux-tdep.c (insns_match_pattern): Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/hppa-linux-tdep.c | 5 ++++- gdb/hppa-tdep.c | 12 ++++++------ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1d297c8..8d30e98 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2004-05-07 Randolph Chung + * hppa-tdep.c (skip_prologue_hard_way, hppa_frame_cache): Use + read_memory_nobpt for code reading when doing frame unwinding. + * hppa-linux-tdep.c (insns_match_pattern): Likewise. + +2004-05-07 Randolph Chung + * hppa-linux-tdep.c (hppa_linux_sigtramp_find_sigcontext): Pass in pc instead of sp, handle sigaltstack case. (hppa_linux_sigtramp_frame_unwind_cache): Adjust calls to diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c index f57ef50..8f3c632 100644 --- a/gdb/hppa-linux-tdep.c +++ b/gdb/hppa-linux-tdep.c @@ -146,7 +146,10 @@ insns_match_pattern (CORE_ADDR pc, for (i = 0; pattern[i].mask; i++) { - insn[i] = read_memory_unsigned_integer (npc, 4); + char buf[4]; + + read_memory_nobpt (npc, buf, 4); + insn[i] = extract_unsigned_integer (buf, 4); if ((insn[i] & pattern[i].mask) == pattern[i].data) npc += 4; else diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 3e0e0ab..0876ab5 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1329,7 +1329,7 @@ restart: old_save_sp = save_sp; old_stack_remaining = stack_remaining; - status = target_read_memory (pc, buf, 4); + status = read_memory_nobpt (pc, buf, 4); inst = extract_unsigned_integer (buf, 4); /* Yow! */ @@ -1378,7 +1378,7 @@ restart: while (reg_num >= (TARGET_PTR_BIT == 64 ? 19 : 23) && reg_num <= 26) { pc += 4; - status = target_read_memory (pc, buf, 4); + status = read_memory_nobpt (pc, buf, 4); inst = extract_unsigned_integer (buf, 4); if (status != 0) return pc; @@ -1391,7 +1391,7 @@ restart: reg_num = inst_saves_fr (inst); save_fr &= ~(1 << reg_num); - status = target_read_memory (pc + 4, buf, 4); + status = read_memory_nobpt (pc + 4, buf, 4); next_inst = extract_unsigned_integer (buf, 4); /* Yow! */ @@ -1418,13 +1418,13 @@ restart: while (reg_num >= 4 && reg_num <= (TARGET_PTR_BIT == 64 ? 11 : 7)) { pc += 8; - status = target_read_memory (pc, buf, 4); + status = read_memory_nobpt (pc, buf, 4); inst = extract_unsigned_integer (buf, 4); if (status != 0) return pc; if ((inst & 0xfc000000) != 0x34000000) break; - status = target_read_memory (pc + 4, buf, 4); + status = read_memory_nobpt (pc + 4, buf, 4); next_inst = extract_unsigned_integer (buf, 4); if (status != 0) return pc; @@ -1649,7 +1649,7 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache) { int reg; char buf4[4]; - long status = target_read_memory (pc, buf4, sizeof buf4); + long status = read_memory_nobpt (pc, buf4, sizeof buf4); long inst = extract_unsigned_integer (buf4, sizeof buf4); /* Note the interesting effects of this instruction. */ -- cgit v1.1