Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch/ARM] Add support for single-stepping through IF-THEN  blocks
Date: Fri, 29 Jan 2010 04:25:00 -0000	[thread overview]
Message-ID: <20100129042431.GD26827@adacore.com> (raw)
In-Reply-To: <20100128224044.GF2813@caradoc.them.org>

> Here's the patch I was ultimately working on that produced the rest of
> today's cleanups.

This is really interesting! Thanks for taking the time to document
the patches - I try to do the same and I think it's really useful
when someone comes back to a piece of code and tries to understand it
(I have trouble rememebering what I did a couple of days ago, so it's
my own notes are very helpful to me too! ;-) ).

There is one thing that I didn't quite get, and the comments in the code
repeat the same thing:

>     cmp     r0, r1 @ Compare r0 and r1
>     ittee   eq     @ If they are equal
>     moveq   r0, #1 @ Then do this
>     moveq   r1, #1 @ And this
>     movne   r0, #2 @ Otherwise this
>     movne   r1, #2 @ And this
[...]
> 1) We use an undefined instruction, rather than the architectural BKPT
> instruction, as the GNU/Linux software breakpoint.  If a hardware
> debugger is connected to the system, BKPT will trigger it.

I don't understand why we cannot use the BKPT insn... Suppose we put
a BKPT at the beginning of each block, what would happen? Would we
get a SIGTRAP even if the insn wasn't supposed to be called?

-- 
Joel


  reply	other threads:[~2010-01-29  4:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 22:41 Daniel Jacobowitz
2010-01-29  4:25 ` Joel Brobecker [this message]
2010-01-29 15:34   ` Daniel Jacobowitz
2010-02-01 16:13 ` 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=20100129042431.GD26827@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@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