Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] canonical linespec and multiple breakpoints ...
@ 2011-05-05 16:29 Joel Brobecker
  2011-05-05 20:50 ` Tom Tromey
  0 siblings, 1 reply; 38+ messages in thread
From: Joel Brobecker @ 2011-05-05 16:29 UTC (permalink / raw)
  To: gdb-patches

Hello,

Re: [PATCH 2/6] Introduce `pre_expanded sals'
    http://www.sourceware.org/ml/gdb-patches/2011-04/msg00038.html
    http://www.sourceware.org/ml/gdb-patches/2011-05/msg00074.html

Jerome and I were discussing a way to move foward without having
to design everything, as the week is rapidly getting to a close.
(Jerome heads back to Paris at the end of this week, and will
be back to his normal schedule, so we're trying to take advantage
of his presence his as much as we can).

If we agree that a breakpoint expression (linespec) that gets resolved
into multiple source locations (slocs) should result in one breakpoint
per sloc, then we can start working on that.

The above requires that we agree on a way to make sure that each
breakpoint carries enough information to re-set itself, which means
that the information should make the breakpoint unique. We've handled
that issue by using a canonical linespec (FILE:FUNCTION:LINE), and
it has worked well for us.

I think that implementing the above in a way that allows each language
to implement their own way of dealing with templates/generics/homonyms
should be reasonably easy, and we'd still be much farther ahead than
we are now. What Jerome and I propose is that we implement the
infrastructure to make it work for C, and possibly Ada (we'll probably
wait for the Ada bits until the infrastructure is approved). We would
rather let the C++ bits to someone else, as we still have limited
experience with C++ itself.

We think that this will handle most situations, except the situation
where new symbols cause extra slocs to appear (typically, a shared
library gets mapped in memory). We are planing on plugging that hole
as a followup, which can be made independently, for instance using
Pedro's idea of introducing an extra level of breakpoint. The exact
details on how this is going to be done need to be discussed, but,
in the meantime, our experience with Ada show that the approach
we are proposing as a first step has been working well for our users.

Thoughts?

Thanks,
-- 
Joel


^ permalink raw reply	[flat|nested] 38+ messages in thread
* Re: [RFC] canonical linespec and multiple breakpoints ...
@ 2011-09-18 13:47 Avi Gozlan
  2011-10-03 16:28 ` Tom Tromey
  0 siblings, 1 reply; 38+ messages in thread
From: Avi Gozlan @ 2011-09-18 13:47 UTC (permalink / raw)
  To: 'Tom Tromey', 'gdb-patches@sourceware.org'
  Cc: Avi Gozlan, Matan Ben Gur

Hello,

On the basis of your proposal dealing with supporting multiple breakpoints and the discussion that followed it, I would like to raise some questions. These issues are highly relevant for our needs (the need was first described in bug 12313 in the GDB bug database).

Among varying GDB uses, we use GDB to debug a process which loads (using dlopen) the same exact library multiple times (in fact there are copies of the library otherwise dlopen returns the same handle for each load). We find your proposal very useful for us to be able to attach to the process and debug a specific library. Though, we do have some questions and suggestions. Pardon technical inaccuracies in GDB terminology.
 
1) The proposal discusses function breakpoints. Will it also enable inspecting global and static variables from a specific library?

2) Just to make sure we understand the interaction of the user interface with "set multiple-symbols": it will be possible to request GDB for a specific variable/function by a library name without getting it from all libraries or get a question (ask) each time, right? Otherwise it will be very inconvenient to inspect multiple variables within a given library.

3) Will the library specific interface know how to handle non-stripped libraries that are compiled without debug information (no "-g")?

4) We suggest adding an option to enable the GDB backtrace command to show the library name for each function. In our usage case we have scenarios in which the libraries interact with each other and a backtrace showing the library name for each function can enable us understand the interaction perfectly.

5) Perhaps a little pedantic but what about handling symbols with different names in libraries with identical name which lie in different paths?

Thanks,

Avi


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2012-02-16 19:38 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-05 16:29 [RFC] canonical linespec and multiple breakpoints 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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox