Fix discrepancies in nm's --line-number output by adding support for the DW_AT_specif...
authorNick Clifton <nickc@redhat.com>
Thu, 19 Mar 2020 16:55:13 +0000 (16:55 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 19 Mar 2020 16:55:13 +0000 (16:55 +0000)
commitf3a08f77787cfe1b9edb7b5ab82ce7a2d527c8cf
tree4132eed4ed6724dab37f7611abaf7f2ab919c3a6
parent3734bec8336f6f33927ab99460cb681035c2ca4f
Fix discrepancies in nm's --line-number output by adding support for the DW_AT_specification DWARF Attttribute.

PR 25676
bfd * dwarf2.c (struct varinfo): Add unit_offset field to record the
location of the varinfo in the unit's debug info data.  Change the
type of the stack field to a boolean.
(lookup_var_by_offset): New function.  Returns the varinfo
structure for the variable described at the given offset in the
unit's debug info.
(scan_unit_for_symbols): Add support for variables which have the
DW_AT_specification attribute.

binutils* testsuite/binutils-all/dw4.s: New test source file.
* testsuite/binutils-all/nm.exp: Run the new test.
bfd/ChangeLog
bfd/dwarf2.c
binutils/ChangeLog
binutils/testsuite/binutils-all/dw4.s [new file with mode: 0644]
binutils/testsuite/binutils-all/nm.exp