Ignore __fu<digits>__ symbols from COFF symbol tables
authorJoel Brobecker <brobecker@gnat.com>
Fri, 29 Mar 2013 02:04:15 +0000 (02:04 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 29 Mar 2013 02:04:15 +0000 (02:04 +0000)
commitaf312be73153278ccc14e39c40a2bb0923578aa8
tree9beb9b575195b2ea5f021bc599236f535ec17b9b
parent0349ea227a93db57acba96cba1a3556742e1bddf
Ignore __fu<digits>__ symbols from COFF symbol tables

The debugger sometimes prints strange function names for given
addresses. For instance, with the following source code...

4    procedure Foo is
5       A : Integer;
6    begin
7       Do_Nothing (A'Address);
8    end Foo;

... we can see...

    (gdb) info line 5
    Line 5 of "foo.adb" starts at address 0x4017ca <_ada_foo+6>
       and ends at 0x4017d2 <_fu29__system__scalar_values__is_is4+7>.
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

_fu29__system__scalar_values__is_is4 is an artificial symbol
generated by the linker, and interferes with the pc-to-symbol
resolution.  There isn't much in the general minimal_symbol
data that could help us identify them, so this patch changes
the COFF reader to simply ignore them.

gdb/ChangeLog:

* coffread.c (is_import_fixup_symbol): New function.
(record_minimal_symbol): Use is_import_fixup_symbol to
detect import fixup symbols, and discard them.

gdb/testsuite/ChangeLog:

        * gdb.ada/win_fu_syms: New testcase.
gdb/ChangeLog
gdb/coffread.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/win_fu_syms.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/win_fu_syms/foo.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/win_fu_syms/pck.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/win_fu_syms/pck.ads [new file with mode: 0644]
This page took 0.024602 seconds and 4 git commands to generate.