Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] canonical linespec and multiple breakpoints ...
Date: Sat, 02 Jul 2011 06:35:00 -0000	[thread overview]
Message-ID: <83fwmpqjem.fsf@gnu.org> (raw)
In-Reply-To: <m362nmarbv.fsf@fleche.redhat.com>

> From: Tom Tromey <tromey@redhat.com>
> Date: Fri, 01 Jul 2011 10:39:00 -0600
> 
> Here is my proposal for how to handle ambiguous linespecs.

Thanks.

> I think I/T sets are also a good idea here

What is an "I/T set"?

> Tom> 6. Set a breakpoint that has a match in the inferior.  Then the inferior
> Tom>    loads a .so to make the linespec ambiguous.
> 
> Add new locations to the breakpoint.

How about alerting the user to this effect, giving them an opportunity
to narrow the scope of the breakpoint?  We could have this as an
optional behavior, but IMO if the breakpoint was unambiguous when I
set it, I would like such an alert by default, because it could be
that I knew what I was doing, and GDB might be defeating me now.

OTOH, if the new-and-improved linespec will allow me to be specific
about this use case (i.e. I don't want any other locations be added),
perhaps this is not an issue.  On the third hand, I could be
forgetting something when I specify the breakpoint, and still be
surprised.

>   modify breakpoint N location LINESPEC

I think this kind of command is necessary not only for the use case
which led you to conclude that it's needed.  We need this to let the
user re-specify location based on dynamically changing environment of
the debugging session: shared libraries being loaded and unloaded,
inferiors starting and exiting, etc.

(As for the command name, I'd suggest "location N LINESPEC", btw.)

I would also recommend an option to stop and suggest such changes
whenever any event happens that would normally trigger addition of
another location, but _before_ such a location is added -- e.g.,
because putting a breakpoint on some locations has undesirable side
effect, like in embedded systems.

IOW, we should give the user more control on the precise linespec,
including when the original linespec turns out to be different from
what it was when typed.

You say nothing about watchpoints.  Will they also use the same
infrastructure?

> I welcome contrasting proposals

Sorry, I don't have any ;-)

Thanks again for working on this.


  reply	other threads:[~2011-07-02  6:35 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 16:29 Joel Brobecker
2011-05-05 20:50 ` Tom Tromey
2011-05-05 22:40   ` Joel Brobecker
2011-05-06  3:20     ` Jan Kratochvil
2011-05-06  4:42       ` Joel Brobecker
2011-05-06 18:08         ` Matt Rice
2011-05-06  7:16     ` Eli Zaretskii
2011-05-06 19:18     ` Tom Tromey
2011-05-06  7:10   ` Eli Zaretskii
2011-05-26 21:06     ` Tom Tromey
2011-05-27  7:56       ` Eli Zaretskii
2011-06-30 21:35         ` Tom Tromey
2011-07-01 18:06           ` Tom Tromey
2011-07-02  6:35             ` Eli Zaretskii [this message]
2011-07-05 19:52               ` Tom Tromey
2011-07-05 21:07                 ` Eli Zaretskii
2011-07-05 21:46                   ` Tom Tromey
2011-07-04 19:32             ` Joel Brobecker
2011-07-05  9:20               ` Jerome Guitton
2011-07-05 15:24                 ` Joel Brobecker
2011-07-05 19:53               ` Tom Tromey
2011-07-26 21:06             ` Tom Tromey
2011-07-27 15:10               ` Matt Rice
2011-07-27 16:23               ` Jan Kratochvil
2011-07-28 15:18               ` Matt Rice
2011-08-02 15:33               ` Pedro Alves
2011-08-02 17:09                 ` Tom Tromey
2011-08-02 18:00                   ` Pedro Alves
2011-11-18 19:31                     ` Tom Tromey
2012-02-16 23:31                       ` Tom Tromey
2011-07-02  6:15           ` Eli Zaretskii
2011-07-05 20:00             ` Tom Tromey
2011-05-27 10:50       ` Matt Rice
2011-05-29 13:01       ` Matt Rice
2011-07-05 20:01         ` Tom Tromey
2011-07-06  2:32           ` Matt Rice
2011-09-18 13:47 Avi Gozlan
2011-10-03 16:28 ` Tom Tromey

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=83fwmpqjem.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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