This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: implement ambiguous linespec proposal
> I think it would also make some Ada cases work more sanely, though I
> don't know enough to say with certainty. I'm thinking here about how
> ada_lookup_symbol_list returns a list but then the linespec code only
> uses the first one (via some call through ada_lookup_encoded_symbol, I
> don't remember the details).
You are missing part of the picture, I think, because some of our code
is not in the FSF tree [1]. We get multiple breakpoints for situations
such as homonyms, or generics (aka templates in C++) instantiations.
In that situation, I think that the FSF GDB only picks the first one,
whereas AdaCore's GDB creates multiple breakpoints.
> My problem with this is that it adds more complexity to the user
> interface: some linespecs will create a single breakpoint with multiple
> locations, some will create multiple breakpoints once again, depending
> on the context.
We have a similar issue: When the user inserts a breakpoint, and there
are multiple possible choices, we have two scnearios:
1. He selects `all' -> In that case, we actually create one breakpoint
with multiple locations;
2. He selects a subset -> In that situation, we create one breakpoint
per location.
I think this can be pretty confusing.
I am copying Jerome Guitton on this message, since he did the work
for that.
--
Joel
[1]: We tried contributing it, but it was too hacky to really be part
of the FSF sources. The main complaint at the time was the fact
that it introduced a canonical form that was specific to Ada. I was
planning on looking at generalizing it to all languages, but never
got around to doing it.