This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: set multiple-symbol ask/cancel not working


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]