This is the mail archive of the gdb-testers@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]

[binutils-gdb] bfd/dwarf: Improve use of previously loaded dwarf information


*** TEST RESULTS FOR COMMIT 90ed9b8bc136c80116273d1aae5a31fbd415af27 ***

Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: 90ed9b8bc136c80116273d1aae5a31fbd415af27

bfd/dwarf: Improve use of previously loaded dwarf information

When parsing DWARF data in order to report file/line type error messages
we perform section placement to make section addresses unique within
relocatable object files.

Currently, if we reuse previously loaded (and cached) dwarf data then we
neglect to perform section placement, the result is that the section
addresses will not be unique, and we might, incorrectly associate an
address with the wrong debug information, and so report an incorrect
file and line number.

Further we neglect to check that that bfd for which we are looking up
debug information is actually the bfd for which the previous debug
information was loaded, it is possible that we will reuse previously
loaded debug information for a different bfd.

And finally, due to following of gnu_debuglink links in one bfd to
another, the process of checking that the cached debug information is
valid requires us to track the original bfd in the cached debug
information.  The original debug information here is either the bfd that
we're interested in, not the bfd we finally load the debug information
from.

bfd/ChangeLog:

	* dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
	(_bfd_dwarf2_slurp_debug_info): If stashed debug information does
	not match current bfd, then reload debug information.  Record bfd
	we're loading debug info for in the stash.  If we have debug
	informatin in the cache then perform section placement before
	returning.

ld/ChangeLog:

	* testsuite/ld-elf/dwarf.exp (build_tests): Add new tests.
	* testsuite/ld-elf/dwarf2.err: New file.
	* testsuite/ld-elf/dwarf2a.c: New file.
	* testsuite/ld-elf/dwarf2b.c: New file.
	* testsuite/ld-elf/dwarf3.c: New file.
	* testsuite/ld-elf/dwarf3.err: New file.


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