Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: drow@false.org
Cc: mark.kettenis@xs4all.nl, gdb-patches@sourceware.org
Subject: Re: Save the length of inserted breakpoints
Date: Fri, 03 Mar 2006 00:08:00 -0000	[thread overview]
Message-ID: <200603022318.k22NIiSe027004@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20060302231042.GA22458@nevyn.them.org> (message from Daniel 	Jacobowitz on Thu, 2 Mar 2006 18:10:42 -0500)

> Date: Thu, 2 Mar 2006 18:10:42 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> On Fri, Mar 03, 2006 at 12:01:52AM +0100, Mark Kettenis wrote:
> > > Date: Thu, 2 Mar 2006 17:17:11 -0500
> > > From: Daniel Jacobowitz <drow@false.org>
> > > 
> > > This nasty, mechanical patch adds "len" arguments to
> > > target_remove_breakpoint and target_remove_hw_breakpoint.  The goal is
> > > to allow BREAKPOINT_FROM_PC to include heuristics, which may possibly
> > > change between when a breakpoint is inserted and when it is removed;
> > > in order to stay in sync, we need to always remove breakpoints in the
> > > same way that we inserted them.
> > > 
> > > There's not much more to say about this patch.  It's big, obvious, and
> > > pretty ugly.  Any comments on this?  Does it look OK?
> > 
> > Yuck!  It really is ugly.  For one thing, I think it is a bit
> > pointless, to add a the BREAKPOINT_FROM_PC() to targets where we know
> > the length of a breakpoint instruction is fixed.
> > 
> > Another thing is that I think the order of the arguments of
> > target_remove_breakpoint() is wrong.  I think it makes sense to see
> > your "len" argument as the length of the saved memory.  Then it is
> > more logical to make "len" the last argument of
> > target_remove_breakpoint().
> > 
> > However, doesn't it make more sense to have target_insert_breakpoint()
> > save the length instead of using BREAKPOINT_FROM_PC() to ask for it?
> 
> If you want me to do that, I'll do that instead.  It requires touching
> twice as many target functions.  Writing the changelog for this one
> took long enough, so forgive me if I wait a while before trying it
> again :-)

You're touching a fairly fundamental piece of the breakpoint
infrastructure here.  I think it is worth thinking about this for a
bit longer.  My comments certainly weren't "demands", so I'm perfectly
fine with discussing this a bit more before you rush towards changing
your patch ;-).

Mark


  reply	other threads:[~2006-03-02 23:19 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 [this message]
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
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=200603022318.k22NIiSe027004@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=drow@false.org \
    --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