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] |
When a function is declared inside a "declare" block, the associated symbol name gets stuffed a "B_nnn" sequence inside it. For instance, with a procedure Call_Me declared as follow: procedure Foo is begin declare procedure Call_Me is begin Do_Nothing; -- STOP end Call_Me; begin Call_Me; end; end Foo; The procedure symbol name is now "foo__B_1__call_me". This B_nnn sequence was added in order to avoid name collisions when homonyms were declared in distinct declare blocks. The attached patch adds support for this name encoding addition. Without this patch, GDB would display the function name as: Breakpoint 1, <foo__B_1__call_me> () at foo.adb:8 8 Do_Nothing; -- STOP The patch changes it to the more natural: Breakpoint 1, foo.call_me () at foo.adb:8 8 Do_Nothing; -- STOP 2008-01-01 Joel Brobecker <brobecker@adacore.com> * ada-lang.c (ada_remove_trailing_digits): New function. (ada_remove_po_subprogram_suffix): New function. (ada_decode): Improve. Move the description of the algorithm directly inside the code, instead of in the function global description. I also added a new testcase for this: 2008-01-01 Joel Brobecker <brobecker@adacore.com> * gdb.ada/fun_in_declare/pck.ads, gdb.ada/fun_in_declare/pck.adb, gdb.ada/fun_in_declare/foo.adb: New files. * gdb.ada/fun_in_declare.exp: New testcase. Tested on x86-linux. No regression. Checked in. -- Joel
Attachment:
decode.diff
Description: Text document
Attachment:
decode-testcase.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |