Currently, when breakpoint source tracking is enabled (see 'set
breakpoint source-tracking enabled on'), GDB will not source track
multi-location breakpoints.
As a first take this was fine, but I think that we can support source
tracking for some multi-location breakpoints.
Source tracking only applies to breakpoints set based on a file and
line number, so the rest of this discussion is only concerned with
this case. This includes things like 'break file:line' and also
'break line'. In the latter case GDB uses the current source file to
provide the filename, so the two cases are really equivalent.
If we consider 'break file:line' then there are two ways that this can
resolve to multiple locations.
First, if 'file:line' lands in an inline function, and the inline
function is inlined multiple times (or has an out-of-line
instantiation) then there can be multiple locations. However, there
is only a single source line for all of these breakpoint locations,
the original line in the single original file.
Hi Andrew,
I like your approach. My initial restriction on all multi-threaded breakpoints was too broad.
It's great the source-tracking actually works for the inlined functions.
Thank you for your improvement,
Alexandra