diff options
author | Joel Brobecker <brobecker@gnat.com> | 2013-03-29 02:04:15 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2013-03-29 02:04:15 +0000 |
commit | af312be73153278ccc14e39c40a2bb0923578aa8 (patch) | |
tree | 9beb9b575195b2ea5f021bc599236f535ec17b9b /gdb/testsuite/gdb.ada/win_fu_syms/pck.ads | |
parent | 0349ea227a93db57acba96cba1a3556742e1bddf (diff) | |
download | binutils-gdb-af312be73153278ccc14e39c40a2bb0923578aa8.tar.gz |
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.
Diffstat (limited to 'gdb/testsuite/gdb.ada/win_fu_syms/pck.ads')
-rw-r--r-- | gdb/testsuite/gdb.ada/win_fu_syms/pck.ads | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.ada/win_fu_syms/pck.ads b/gdb/testsuite/gdb.ada/win_fu_syms/pck.ads new file mode 100644 index 00000000000..d5791b2130d --- /dev/null +++ b/gdb/testsuite/gdb.ada/win_fu_syms/pck.ads @@ -0,0 +1,19 @@ +-- Copyright 2007-2013 Free Software Foundation, Inc. +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. + +with System; +package Pck is + procedure Do_Nothing (A : System.Address); +end Pck; |