diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2025-05-06 13:03:47 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2025-05-12 14:50:31 -0400 |
commit | 57eea4cd0dd2e2cc4fb81738ba6a310dd31b6789 (patch) | |
tree | 32290f5a2f93418ebb3ea6689f723aec8eb22846 /gdb/python/py-utils.c | |
parent | 8422833a4f17d6542f8331e0408fe3e81abc6d78 (diff) | |
download | binutils-57eea4cd0dd2e2cc4fb81738ba6a310dd31b6789.zip binutils-57eea4cd0dd2e2cc4fb81738ba6a310dd31b6789.tar.gz binutils-57eea4cd0dd2e2cc4fb81738ba6a310dd31b6789.tar.bz2 |
gdb/dwarf: skip broken .debug_macro.dwo
Running gdb.base/errno.exp with gcc <= 13 with split DWARF results in:
$ make check TESTS="gdb.base/errno.exp" RUNTESTFLAGS="CC_FOR_TARGET=gcc-13 --target_board=fission"
(gdb) break -qualified main
/home/smarchi/src/binutils-gdb/gdb/dwarf2/read.c:7549: internal-error: locate_dwo_sections: Assertion `!dw_sect->readin' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
...
FAIL: gdb.base/errno.exp: macros: gdb_breakpoint: set breakpoint at main (GDB internal error)
The assert being hit has been added in 28f15782adab ("gdb/dwarf: read
multiple .debug_info.dwo sections"), but it merely exposed an existing
problem.
gcc versions <= 13 are affected by this bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111409
Basically, it produces .dwo files with multiple .debug_macro.dwo
sections, with some unresolved links between them. I think that this
macro debug info is unusable, and all we can do is ignore it.
In locate_dwo_sections, if we detect a second .debug_macro.dwo section,
forget about the previous .debug_macro.dwo and any subsequent one. This
will effectively make it as if the macro debug info wasn't there at all.
The errno test seems happy with it:
# of expected passes 84
# of expected failures 8
Change-Id: I6489b4713954669bf69f6e91865063ddcd1ac2c8
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-utils.c')
0 files changed, 0 insertions, 0 deletions