Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/sparc] Fix step-bt.exp: backtrace after second instruction step
@ 2006-11-09  4:57 Joel Brobecker
  2006-11-09 13:00 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2006-11-09  4:57 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

Hello,

I encountered on sparc the same problem I saw on i386: When scanning
a function prologue, if an instruction is replaced by a breakpoint,
we read the breakpoint instead of reading the original instruction.

Fixed using the same method as in i386...

2006-11-08  Joel Brobecker  <brobecker@adacore.com>

        * sparc-tdep.c (sparc_fetch_instruction): Read instruction
        using read_memory_nobpt.

Tested on sparc-solaris, no regression, and fixes one FAIL in
step-bt.exp.

OK to apply?
-- 
Joel

[-- Attachment #2: sparc-tdep.c.diff --]
[-- Type: text/plain, Size: 544 bytes --]

Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.173
diff -u -p -r1.173 sparc-tdep.c
--- sparc-tdep.c	12 Jul 2006 18:13:45 -0000	1.173
+++ sparc-tdep.c	9 Nov 2006 04:54:05 -0000
@@ -99,7 +99,7 @@ sparc_fetch_instruction (CORE_ADDR pc)
   int i;
 
   /* If we can't read the instruction at PC, return zero.  */
-  if (target_read_memory (pc, buf, sizeof (buf)))
+  if (read_memory_nobpt (pc, buf, sizeof (buf)))
     return 0;
 
   insn = 0;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA/sparc] Fix step-bt.exp: backtrace after second instruction step
  2006-11-09  4:57 [RFA/sparc] Fix step-bt.exp: backtrace after second instruction step Joel Brobecker
@ 2006-11-09 13:00 ` Daniel Jacobowitz
  2006-11-09 16:37   ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-11-09 13:00 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Wed, Nov 08, 2006 at 08:58:01PM -0800, Joel Brobecker wrote:
> Hello,
> 
> I encountered on sparc the same problem I saw on i386: When scanning
> a function prologue, if an instruction is replaced by a breakpoint,
> we read the breakpoint instead of reading the original instruction.
> 
> Fixed using the same method as in i386...

OK.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA/sparc] Fix step-bt.exp: backtrace after second instruction step
  2006-11-09 13:00 ` Daniel Jacobowitz
@ 2006-11-09 16:37   ` Joel Brobecker
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2006-11-09 16:37 UTC (permalink / raw)
  To: gdb-patches

> > I encountered on sparc the same problem I saw on i386: When scanning
> > a function prologue, if an instruction is replaced by a breakpoint,
> > we read the breakpoint instead of reading the original instruction.
> > 
> > Fixed using the same method as in i386...
> 
> OK.

Thank you. Checked in.

-- 
Joel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-09 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-09  4:57 [RFA/sparc] Fix step-bt.exp: backtrace after second instruction step Joel Brobecker
2006-11-09 13:00 ` Daniel Jacobowitz
2006-11-09 16:37   ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox