This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Can decode_line_1() return sals.nelts > 1?
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Can decode_line_1() return sals.nelts > 1?
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Mon, 13 Dec 1999 08:36:23 -0800
- CC: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Organization: Cygnus Solutions
- References: <3854D4C5.A891707A@cygnus.com>
- Reply-To: msnyder at cygnus dot com
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".