This is the mail archive of the 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: [PATCH, gdb6.8] -break-list doesn't list multiple breakpoints

Nick Roberts wrote:

>  > > Using the bkptno field means that existing frontends will recognise these
>  > > locations as breakpoints.
>  > 
>  > Yes, but those are not a breakpoints, do it will do a disservice to the
>  > existing frontends. In particular, might find it very interesting experience
>  > to edit condition of one breakpoint, and having conditions on other
>  > breakpoints change. Likewise, changing any properly of location will not
>  > work.
>  > 
>  > I think that right now, the only thing that existing frontend cannot do is
>  > to individually disable and enable locations. This is nice thing to have,
>  > but not very critical, so I think it's fine for only new frontends to have
>  > this capability, given the presenting locations as breakpoints comes with a
>  > bunch of issues.
> If set individually, the multiple breakpoint locations can be used with
> deleted, ignore, condition and commands.  

To set individual breakpoint on constructor instances, for example,
you need to set breakpoint at address.

> Why would this not true when the 
> location is part of a multiple breakpoint?  Is it just due to the
> implementation or a fundamental limitation?

That's the design of multiple-location breakpoints. You specify the line
or function on which such a breakpoint should be set. GDB that arranges
for the list of locations to automatically include all relevant addresses,
including when shared libraries are loaded and unloaded. Note that while
there's mechanism to enable and disable individual locations, it's a bit
heuristic, so the enable/disable state might not be carried over when
new shared libraries are loaded.

Allowing the user to manipulate individual locations will interfere with
this automatic updating of location list. Furthermore, what is the use case?
For constructors, one is not likely to ever want to do anything with 
individual locations. For inlined functions, I don't know why you would
specifically treat one inlined instance, but if you wish, you can always create
a more specific breakpoint, like on address, and do anything.

Of course, we can provide a command that creates individual breakpoints on
each address matching a specification, and does not do any auto-update of
those breakpoints. If you think such a behaviour will be useful, can you
explain why, and then work on implementing it?

- Volodya

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