From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA/sparc] Fix step-bt.exp: backtrace after second instruction step
Date: Thu, 09 Nov 2006 04:57:00 -0000 [thread overview]
Message-ID: <20061109045801.GK3582@adacore.com> (raw)
[-- 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;
next reply other threads:[~2006-11-09 4:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-09 4:57 Joel Brobecker [this message]
2006-11-09 13:00 ` Daniel Jacobowitz
2006-11-09 16:37 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061109045801.GK3582@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox