This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB <MULTIPLE> breakpoints, source lines
Daniel Jacobowitz wrote:
> On Sat, Feb 14, 2009 at 01:22:38PM +0300, Vladimir Prus wrote:
>> > My question is: are there any circumstances in which you can get a
>> > different source file or line for each location?
>>
>> There should be none, except that we had a bug report whereby GDB would
>> create multiple location breakpoint where each location has the same
>> line number and file basename, but different directories.
>
> Do you think we'll ever use these for e.g. breakpoints on overloaded
> functions?
I don't know. I never had a particular design to set breakpoint on
every overloaded function. In case of constructors/templates/inlined
function you are very likely to have no idea of the address of the instance
you care about. Overloaded functions are basically separate functions that
happen to share a part of the name, so user is much more likely to know
which function he wants to debug.
- Volodya