* [committed] Use frame memory for code reading
@ 2004-05-08 4:03 Randolph Chung
2004-05-08 4:52 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Randolph Chung @ 2004-05-08 4:03 UTC (permalink / raw)
To: gdb-patches
Ignore breakpoints when doing code reading during unwind, as suggested
by Andrew. commited. thanks -randolph
2004-05-07 Randolph Chung <tausq@debian.org>
* 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.
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.155
diff -u -p -r1.155 hppa-tdep.c
--- hppa-tdep.c 8 May 2004 03:17:57 -0000 1.155
+++ hppa-tdep.c 8 May 2004 03:53:22 -0000
@@ -1329,7 +1364,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 +1413,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 +1426,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 +1453,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 +1686,7 @@ hppa_frame_cache (struct frame_info *nex
{
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. */
Index: hppa-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-linux-tdep.c,v
retrieving revision 1.3
diff -u -p -r1.3 hppa-linux-tdep.c
--- hppa-linux-tdep.c 8 May 2004 03:17:57 -0000 1.3
+++ hppa-linux-tdep.c 8 May 2004 03:53:23 -0000
@@ -146,7 +148,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
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [committed] Use frame memory for code reading
2004-05-08 4:03 [committed] Use frame memory for code reading Randolph Chung
@ 2004-05-08 4:52 ` Daniel Jacobowitz
2004-05-08 4:55 ` Randolph Chung
2004-05-08 15:23 ` Andrew Cagney
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2004-05-08 4:52 UTC (permalink / raw)
To: Randolph Chung; +Cc: gdb-patches
On Fri, May 07, 2004 at 09:02:58PM -0700, Randolph Chung wrote:
> Ignore breakpoints when doing code reading during unwind, as suggested
> by Andrew. commited. thanks -randolph
>
> 2004-05-07 Randolph Chung <tausq@debian.org>
>
> * 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.
I'm guessing he actually meant get_frame_memory?
I'm really not sure why we have this many memory access functions.
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [committed] Use frame memory for code reading
2004-05-08 4:52 ` Daniel Jacobowitz
@ 2004-05-08 4:55 ` Randolph Chung
2004-05-08 15:23 ` Andrew Cagney
1 sibling, 0 replies; 4+ messages in thread
From: Randolph Chung @ 2004-05-08 4:55 UTC (permalink / raw)
To: gdb-patches
> I'm guessing he actually meant get_frame_memory?
>
> I'm really not sure why we have this many memory access functions.
i don't think so.... but i might be wrong :)
tramp-frame.c uses safe_frame_unwind_memory (), which is what i think
Andrew was talking about. That function calls read_memory_nobpt () after
discarding the frame parameter.
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [committed] Use frame memory for code reading
2004-05-08 4:52 ` Daniel Jacobowitz
2004-05-08 4:55 ` Randolph Chung
@ 2004-05-08 15:23 ` Andrew Cagney
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2004-05-08 15:23 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Randolph Chung, gdb-patches
On Fri, May 07, 2004 at 09:02:58PM -0700, Randolph Chung wrote:
Ignore breakpoints when doing code reading during unwind, as suggested
by Andrew. commited. thanks -randolph
2004-05-07 Randolph Chung <tausq@debian.org>
* 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.
I'm guessing he actually meant get_frame_memory?
Yes, ``frame*memory'' variants as used by tramp-frame.
These are future proof - the assumption is that a frame can find its
inferior which can find its memory.
I'm really not sure why we have this many memory access functions.
forcing parameterisation with flush this out.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-05-08 15:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-08 4:03 [committed] Use frame memory for code reading Randolph Chung
2004-05-08 4:52 ` Daniel Jacobowitz
2004-05-08 4:55 ` Randolph Chung
2004-05-08 15:23 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox