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]


I would be careful to stay away from turning "logically" specified breakpoints (by which I mean specified on function name or source location) into addresses to the user. Even between rerunnings of the same executable a library's load address can shift, causing the address to move. gdb can probably still make the equivalency between the breakpoints - most slides are rigid, for instance. But the address doesn't show this. I would use something simble like 5a, 5b or whatever...

Jim

On Oct 16, 2003, at 9:17 AM, gdb-patches-digest-help@sources.redhat.com wrote:

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

--
Jim Ingham                                   jingham@apple.com
Developer Tools
Apple Computer


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