From: Jim Blandy <jimb@codesourcery.com>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: GDB List <gdb@sourceware.org>
Subject: Re: Breakpoints in delay slots
Date: Fri, 20 Oct 2006 21:18:00 -0000 [thread overview]
Message-ID: <m3fydik7p0.fsf@codesourcery.com> (raw)
In-Reply-To: <453608FC.2040201@st.com> (Andrew STUBBS's message of "Wed, 18 Oct 2006 11:59:08 +0100")
Andrew STUBBS <andrew.stubbs@st.com> writes:
> The problem occurs when a breakpoint is placed on the delay slot
> instruction. This can happen when this instruction happens to be the
> first instruction of a source line, or when the user sets the
> breakpoint on a specific address.
Yeah. As others have said, this is a pain.
The important thing to note here is that there's a bit of processor
state that I gather you don't have access to on the SH4 --- the 'next
PC', to which control will go after the current instruction. If the
SH4 doesn't provide GDB enough information to predict where
non-exceptional flow should go on resumption, or if it exists but the
kernel doesn't make it available to GDB, then that's the fundamental
bug.
The SPARC (or am I thinking of the HPPA?) actually makes this
explicit, with an NPC ("next pc") register. In a delay slot, PC will
point at the instruction in the delay slot, and NPC points to the
target of the branch.
MIPS effectively provides the same information with the bit in the
cause register.
prev parent reply other threads:[~2006-10-20 21:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 10:59 Andrew STUBBS
2006-10-18 14:04 ` Daniel Jacobowitz
2006-10-18 18:51 ` Michael Snyder
2006-10-19 9:52 ` Andrew STUBBS
2006-10-19 23:20 ` Michael Snyder
2006-10-19 19:51 ` Mark Kettenis
2006-10-20 8:42 ` Andrew STUBBS
2006-10-22 19:47 ` Mark Kettenis
2006-10-20 8:51 ` Andrew STUBBS
2006-10-20 14:26 ` Daniel Jacobowitz
2006-10-20 21:18 ` Jim Blandy [this message]
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=m3fydik7p0.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--cc=andrew.stubbs@st.com \
--cc=gdb@sourceware.org \
/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