Browse Source

Add DW_TAG_compile_unit DIE to Dummy CUs

Dummy CUs help detect errors and are very helpful. However, the DWARF
spec seems to indicate the CUs need a DW_TAG_compile_unit in addition to
the header. This patch adds that.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31650

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
Approved-By: Tom de Vries <tdevries@suse.de>
Tested-By: Tom de Vries <tdevries@suse.de>
master
Will Hawkins 2 years ago
committed by Tom de Vries
parent
commit
41d5ff24c6
  1. 1
      gdb/testsuite/lib/dwarf.exp

1
gdb/testsuite/lib/dwarf.exp

@ -2999,6 +2999,7 @@ namespace eval Dwarf {
proc dummy_cu {} {
# Generate a CU with default options and empty body.
cu {label dummy_cu} {
compile_unit {}
}
# Generate an .debug_aranges entry for the dummy CU.

Loading…
Cancel
Save