Can decode_line_1() return sals.nelts > 1?
Michael Snyder
msnyder@cygnus.com
Mon Dec 13 08:38:00 GMT 1999
Andrew Cagney wrote:
>
> Hello,
>
> Grubbing through break_command_1() and noticed:
>
> if (sals.nelts > 1)
> {
> warning ("Multiple breakpoints were set.");
> warning ("Use the \"delete\" command to delete unwanted
> breakpoints.");
> }
>
> I'm left wondering _how_ break_command_1() can end up with sals.nelts
> with a value of anything other than one. Looking through
> decode_line_1() which is used to decode the breakpoint expression I
> can't find anything other than sals.nelts being set to zero or one.
>
> Anyone know?
Without looking at the code, my first guess would be overloaded
functions. Oh, OK, I'll look at the code. Yep, look for a call
to "build_canonical_line_spec". This function disambiguates
function/method names by adding the filename. It's used when
there are multiple functions/methods by the same name. If you
get that chooser prompt (Which one do you mean?), one of your
choices is "all". Ah, the guy who gives that overload-choice
prompt is "decode_line_2".
More information about the Gdb-patches
mailing list