From: Kevin Buettner <kevinb@redhat.com>
To: gdb@sources.redhat.com
Subject: Re: RFC : Handling breakpoints on archs. with imprecise exceptions.
Date: Thu, 24 Mar 2005 21:30:00 -0000 [thread overview]
Message-ID: <20050324143025.45e7d57d@ironwood.lan> (raw)
In-Reply-To: <42431904.7010708@codito.com>
On Fri, 25 Mar 2005 01:16:12 +0530
Ramana Radhakrishnan <ramana.radhakrishnan@codito.com> wrote:
> While looking at a GDB port to a processor that has
> imprecise exceptions/ interrupts i.e. the equivalent of a
> software breakpoint would require 4 instructions to stop.
> With my research I was unable to find any GDB port that
> needed to handle such a case.
Another approach, different from the one you outlined, is to use a
branch-to-self as the breakpoint instruction. The stub needs to
periodically check to see if the task being debugged is stopped at one
of these infinite loop instructions upon which a breakpoint has been
placed. If so, it interrupts the task and reports a SIGTRAP to GDB.
I know of at least one case where this was done - though, as I recall,
it was done because the processor provided no other suitable breakpoint
instruction.
This approach makes the stub somewhat more complicated, but has the
virtue of keeping the GDB implementation relatively simple.
Kevin
next prev parent reply other threads:[~2005-03-24 21:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-24 19:46 Ramana Radhakrishnan
2005-03-24 19:57 ` Paul Gilliam
2005-03-24 20:23 ` Ramana Radhakrishnan
2005-03-24 21:46 ` Paul Gilliam
2005-03-24 20:37 ` Daniel Jacobowitz
2005-03-24 22:46 ` Ramana Radhakrishnan
2005-03-24 21:30 ` Kevin Buettner [this message]
2005-03-24 23:31 Decker, Paul
2005-03-24 23:32 ` Daniel Jacobowitz
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=20050324143025.45e7d57d@ironwood.lan \
--to=kevinb@redhat.com \
--cc=gdb@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