This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Breakpoint infrastructure cleanups [0/8]


> From: Elena Zannoni <ezannoni@redhat.com>
> Date: Thu, 16 Oct 2003 10:32:57 -0400
> 
> Just occurred to me that maybe the user sometimes would want to set a
> breakpoint in just one particular instance of an inlined function, we
> should still allow that.

How about the following?

(gdb) break inline_foo
Breakpoint 5 set at inline_foo, which has multiple locations.
Say "info breakpoint 5" for more details.
(gdb) info break 5
Num Type          Enb Address    What
5   sw breakpoint  y  0x8040222  inlined into foo
5   sw breakpoint  y  0x8040822  inlined into bar
5   sw breakpoint  y  0x8040852  inlined into boring_loop
(gdb) delete 5 *0x8040852

> I.e. should setting the multiple breakpoints
> be the default?

I think this is the best default, yes.

Alternatively, we could show all possible addresses where the
requested breakpoint coulod be set and ask the user to select which
ones she wants, like this:

(gdb) break inline_foo
Function inline_foo is inlined into multiple locations:
  Address    Location
  0x8040222  inlined into foo
  0x8040822  inlined into bar
  0x8040852  inlined into boring_loop
Please use "break *address" to set breakpoints at one or more of these
(gdb) break *0x8040822 *0x8040822


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]