Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [0/9] Breakpoints at multiple locations
Date: Sat, 08 Sep 2007 11:57:00 -0000	[thread overview]
Message-ID: <uy7fhqshx.fsf@gnu.org> (raw)
In-Reply-To: <200709080011.13700.vladimir@codesourcery.com> (message from 	Vladimir Prus on Sat, 8 Sep 2007 00:11:13 +0400)

> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 8 Sep 2007 00:11:13 +0400
> 
> At the moment, gdb assumes that a code breakpoint has
> a single PC value. One case where it does not work
> is C++ constructors -- GCC generates several function
> bodies, and GDB sets breakpoint on just one of them,
> so breakpoints in constructors don't work reliably.
> Another case is C++ templates -- if I set a breakpoint
> on a line in template function, there's unbounded number
> of template instantiations that have this line, but GDB
> cannot set breakpoints on all of them.
> 
> I'm about to post a set of patches that fix it. Essentially,
> the patches make breakpoint have a list of breakpoint locations.
> When a breakpoint is creates, GDB automatically figures out the
> set of locations to use. User can than disable locations that seem
> uninteresting to him.

Thanks, this is a great feature to have in GDB.

I hope there will be a suitable patch for the user manual, before all
this is committed.  I tried to indicate what new features need to be
reflected in the manual, when I saw them in your patches (but I'm not
sure I saw all of them).

Also, I think this features should be mentioned in NEWS.

> The patches has direct effect on two user commands. The "info break"
> now outputs multiple locations, if they are present, like this:
> 
>         Num Type           Disp Enb  Address    What
>         1   breakpoint     keep y    <MULTIPLE>
>         1.1                     y    0xb7fa756d in int bar<int>(int) at helper.hpp:4
>         1.2                     y    0xb7fa7588 in double bar<double>(double) at helper.hpp:4

As I wrote in one of my messages, the "1.2" thing could potentially
break alignment of the display.  I think we should handle that
somehow.

Also, I'm not convinced that 1.2 is the best possible way to express
what you want, because it looks like a floating-point number.  Maybe
we should explicitly have an additional "Loc" column, and format the
list like this:

        Num Loc  Type           Disp Enb  Address    What
        1        breakpoint     keep y    <MULTIPLE>
        1   1                        y    0xb7fa756d in int bar<int>(int) at helper.hpp:4
        1   2                        y    0xb7fa7588 in double bar<double>(double) at helper.hpp:4

>         1   breakpoint     keep y    <MULTIPLE>
>                 breakpoint already hit 2 times
>         1.1                     y(p) 0xb7f9856d helper.hpp:4
>         1.2                     n(p) 0xb7f98588 helper.hpp:4
> 
> means that user wants location 1.1 to be enabled, and wants location 1.2
> to be disabled. The "(p)" means that both are in unloaded shared library,
> so naturally 1.1 won't be hit until the library is loaded.

I think the old <PENDING> was much more clear than this enigmatic
"(p)".

Thanks again for working on this.


  parent reply	other threads:[~2007-09-08 11:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-07 20:11 Vladimir Prus
2007-09-07 22:18 ` Pierre Muller
2007-09-08 11:57 ` Eli Zaretskii [this message]
2007-09-08 14:32   ` Vladimir Prus
2007-09-08 16:27     ` Nathan J. Williams
2007-09-08 16:40       ` Vladimir Prus
2007-09-08 16:52         ` Daniel Jacobowitz
2007-09-10  4:47     ` Markus Deuling
2007-09-10  7:44       ` Vladimir Prus
2007-09-10 14:11         ` Markus Deuling
2007-09-10 15:38           ` Vladimir Prus

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=uy7fhqshx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.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