Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: msnyder@redhat.com, gdb-patches@sourceware.org
Subject: Re: Save the length of inserted breakpoints
Date: Mon, 17 Apr 2006 21:50:00 -0000	[thread overview]
Message-ID: <20060417215026.GA26596@nevyn.them.org> (raw)
In-Reply-To: <200604172024.k3HKO6Y3002093@elgar.sibelius.xs4all.nl>

On Mon, Apr 17, 2006 at 10:24:06PM +0200, Mark Kettenis wrote:
> Hmm, if I understand things correctly, the only reason why you need
> placed_size, is because we want shadow_len to tell is whether we've
> actually saved the contents or not.  This is eh, a wee bit ugly.

Correct (on both counts).

> Actually I think the z0 packet should not include the length of the
> breakpoint.  The remote stub will have to keep track of the length of
> the inserted breakpoint anyway, exactly because it has get the the
> target memory correct.

Yes... and no.  Two problems with that, which I'm sure you can see. One
is that, in practice, it's there; we can't remove it (protocol
incompatibilities), and because it's there, stub developers probably
use it.  They may have to stash this information somewhere else, but
not use that copy when actually removing the breakpoint.  Ugh!

[Actually I bet a lot of stubs DON'T get the underlying memory correct,
which makes their dependence on this even clearer.  I bet a lot of
stubs would report the breakpoint.  Most of the time, we read memory
with breakpoints removed, so a lot of stub authors may just not have
noticed this issue - and there's nothing about it in the manual.  It
might be more pragmatic to always issue the read, but I'm reluctant
unless we find real problems with it; why double the number of packets
needlessly?]

And secondly, software breakpoints seem to be such a simple concept...
but the variety of ways people find to implement them is astounding.
For instance, you would not need to record the length if you could
"shadow" executing ROM pages using RAM; you could perform memory reads
from the ROM page, and insert breakpoints onto the RAM page.

> I'm still thinking about a more elegant solution.  One would be to
> allocate the shadow contents dynamically and make it a NULL pointer if
> GDB didn't actually save any shadow contents.  Meanwhile, I spropose
> you check this in.  This issue has been on the table long enough now.

Thanks for your understanding.  If you find a nicer way, I'll pitch in
to help clean up the result.  In the mean time, we'll go with this
version.

I'm going to wait a little longer - I'd appreciate Eli's look over the
gdbint.texi bits, and I'm out of my GDB work environment at the moment
so I can't test it.

> P.S. Someone should really get rid of tm-sh.h and
> DEPRECATED_{BIG|LITTLE}_BREAKPOINT.

That's not all that someone should get rid of...

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-04-17 21:50 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02 22:25 Daniel Jacobowitz
2006-03-02 23:13 ` Mark Kettenis
2006-03-02 23:19   ` Daniel Jacobowitz
2006-03-03  0:08     ` Mark Kettenis
2006-03-03  1:21       ` Daniel Jacobowitz
2006-03-03 13:51   ` Eli Zaretskii
2006-03-03 15:03     ` Daniel Jacobowitz
2006-03-03 17:56       ` Eli Zaretskii
2006-03-03 18:04         ` Daniel Jacobowitz
2006-03-03 22:00           ` Eli Zaretskii
2006-03-03 22:10             ` Daniel Jacobowitz
2006-03-03 22:35               ` Eli Zaretskii
2006-03-03 23:01                 ` Daniel Jacobowitz
2006-03-04 10:39                   ` Eli Zaretskii
2006-03-04 14:58                     ` Daniel Jacobowitz
2006-03-04 15:05                       ` Eli Zaretskii
2006-03-04 15:11                         ` Daniel Jacobowitz
2006-03-06 19:49                           ` Eli Zaretskii
2006-03-07  5:31               ` Michael Snyder
2006-03-04  0:35             ` Steven Johnson
2006-03-04 10:18               ` Daniel Jacobowitz
2006-04-11 21:46   ` Daniel Jacobowitz
2006-04-11 22:32     ` David S. Miller
2006-04-12  7:30     ` Eli Zaretskii
2006-04-12  9:44     ` Mark Kettenis
2006-04-12 12:57       ` Daniel Jacobowitz
2006-04-12 18:38         ` Mark Kettenis
2006-04-12 18:47           ` Daniel Jacobowitz
2006-04-13  8:12             ` Eli Zaretskii
2006-04-13 22:13               ` Mark Kettenis
2006-04-13 22:59                 ` Daniel Jacobowitz
2006-04-13 23:30                   ` Daniel Jacobowitz
2006-04-14  8:10                   ` Eli Zaretskii
2006-04-14  8:52                     ` David S. Miller
2006-04-14  8:04                 ` Eli Zaretskii
2006-04-14  8:51                   ` David S. Miller
2006-04-16 23:58                   ` Mark Kettenis
2006-04-17  7:07                     ` Eli Zaretskii
2006-04-13 21:57             ` Michael Snyder
2006-04-13 22:59               ` Daniel Jacobowitz
2006-04-16 23:53                 ` Mark Kettenis
2006-04-16 23:50               ` Mark Kettenis
2006-04-17  1:41                 ` Daniel Jacobowitz
2006-04-17 13:09                   ` Mark Kettenis
2006-04-17 13:37                     ` Daniel Jacobowitz
2006-04-17 13:50                       ` Mark Kettenis
2006-04-17 19:08                         ` Daniel Jacobowitz
2006-04-17 20:25                           ` Mark Kettenis
2006-04-17 21:50                             ` Daniel Jacobowitz [this message]
2006-04-18  8:59                           ` Eli Zaretskii
2006-04-18 19:21                             ` Daniel Jacobowitz
2006-04-19  7:40                               ` Eli Zaretskii

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=20060417215026.GA26596@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=msnyder@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