Re: set multiple-symbol ask/cancel not working

Tom Tromey
2011-11-29T16:14:10Z

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> It looks like "set multiple-symbols ask/cancel" regressed again :-(.
Joel> (gdb) set multiple-symbols ask
Joel> (gdb) b normal_menu
Joel> Breakpoint 1 at 0x402130: normal_menu. (2 locations)

Thanks for sending the reproducer and the instructions. This saved a
lot of time.

I looked into this. The bug is that the canonical form for each
location is the same: "pck.adb:normal_menu". (Unlike in C++, where the
arguments would be part of the symbol name...)

I am not sure of the best way to handle this. Personally I think the
C++ approach is pretty good (though not without its baggage). But, I
don't know how to implement that for Ada, and I assume that there is
probably some reason it isn't done.

Since the "canonical form" doesn't actually have to be valid input to
linespec (it is only used for filtering the results -- well, it is now
that I fixed a couple of bad uses), I went ahead and changed
linespec.c:add_sal_to_sals to use FILE:FUNCTION:LINE for the canonical
form in this case.

This gives:

(gdb) b pck.adb:normal_Menu
[0] cancel
[1] all
[2] pck.adb:pck.normal_menu:4
[3] pck.adb:pck.normal_menu:8

Tom