Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] canonical linespec and multiple breakpoints ...
Date: Tue, 02 Aug 2011 17:09:00 -0000	[thread overview]
Message-ID: <m3oc073fmp.fsf@fleche.redhat.com> (raw)
In-Reply-To: <201108021633.04777.pedro@codesourcery.com> (Pedro Alves's	message of "Tue, 2 Aug 2011 16:33:04 +0100")

>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro> I'm very sorry for the delay in responding to this.

It is no problem, and thanks for replying.

Tom> Right now there are several patches (and planned patches) to make
Tom> debuginfo reading lazier: my lazy reading patch for new inferiors,

Pedro> I never replied to your patch, but my reaction was that it is
Pedro> probably breaking breakpoints in the new inferiors today, even
Pedro> without any linespec/multi breakpoints work.

Is there a way to set a breakpoint in a new inferior without first
loading the debuginfo by hand?  It has been a while since I was looking
at this, but I don't remember finding a way.

If there is one, though, I can easily test this.

Pedro> Wouldn't e.g., making debug info reading smarter (the sharing of
Pedro> objfiles between inferiors work/idea?) mostly dispense that
Pedro> approach?

That would help for much of the debuginfo, but not all of it.  I think
it would depend on how much sharing there is across inferiors in a given
session.

FWIW I have taken a couple stabs at making objfile sharing work.  It is
a lot harder than I thought it would be, and it winds up requiring
conditions which I am not confident are always true.

The big problem comes from symbols.  In the new setup, symbols are
independent of the program space.  SYMBOL_VALUE_ADDRESS still needs the
program space, though -- so we add a mapping from objfile to the
per-program-space objfile wrapper.  But, to actually use this map, the
current program space must be set properly at any use of
SYMBOL_VALUE_ADDRESS.  It isn't clear to me that this is guaranteed.  I
think there are other cases like this too.

Pedro> It's not just user breakpoints that worry me with simply avoiding
Pedro> debug info altogether with some per-inferior flag, rather than
Pedro> making it depeng on need/request.
[...]

Thanks, this is very helpful info.

Pedro> I'm not sold on this either.  One could do something similar,
Pedro> but leavy the default the way around -- have a new "final"
Pedro> property/option of breakpoints --- once it's spec resolves,
Pedro> it no longer gets locations auto-added, and have the user
Pedro> request for final'ness explicitly.  The "final" property
Pedro> does not need to be final itself, it could be toggleable.

Ok.  I will implement it the "full" way first; if we find it isn't so
good in practice we can always change it or add an option later on.

Pedro> What I don't think I have seen addressed is how the proposal
Pedro> interacts with multi-exec.  E.g, suppose I have program foo
Pedro> loaded once (one inferior) and program bar loaded twice (two
Pedro> inferiors).  I have one of the bar inferiors in focus, 
Pedro> and I do "b main".  How many locations does this resolve to?
Pedro> One, two, or three?  Currently, it resolves to two.

Three, following the rule that a breakpoint will fire at all matching
locations.

Tom


  reply	other threads:[~2011-08-02 17:09 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
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 [this message]
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=m3oc073fmp.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@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