This is the mail archive of the gdb@sourceware.org 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: Multiple breakpoint locations


Eli Zaretskii wrote:

>> From: Nick Roberts <nickrob@snap.net.nz>
>> Date: Wed, 14 Nov 2007 08:15:27 +1300
>> 
>> 
>> The new code for breakpoints with multiple locations looks very good and
>> addresses a common complaint about GDB.  I have a couple of points and
>> apologise if they have already been discussed.
> 
> Btw, while working on Nick's proposals, I found myself confused wrt
> the connection, if any, between the feature described in "Breakpoint
> Menus" and the multiple-location breakpoints that was the subject of
> this thread.
> 
> Are these features the same (i.e., is the format of the
> multiple-locations breakpoint listing described in "Set Break" what we
> use for breakpoints set from the menu described in "Breakpoint
> Menus")?  Or are they two different features?

They are different. "Breakpoint menus" are for overloaded function, where
a single name 'foo' may refer to completely different functions in source
code. Multiple locations handle a case where a specific function in source
corresponds to multiple PC values. 

> 
> If the former, won't additional locations, which we didn't select from
> the menu, appear in the list of locations as result of loading shared
> libraries that define additional overloaded variants of the function
> in which we wanted to break?
> 
> If the latter, I cannot seem to find the description of how multiple
> locations come into existence in the first place anywhere in the
> manual.  Am I missing something?

The manual lists cases where a given function in source can correspond to
several PC values, and they say:

        In all those cases, @value{GDBN} will insert a breakpoint at all
        the relevant locations.

So it happens automatically.

- Volodya





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