aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Hawkins <hawkinsw@obs.cr>2024-04-18 13:28:52 +0200
committerTom de Vries <tdevries@suse.de>2024-04-18 13:28:52 +0200
commit41d5ff24c6723b87ada11c1287f50cb87f7d89e2 (patch)
tree2a61addc2b7459d241ad901a235217221187ad00
parentebf18671351d94185823d364b75369abc1baba31 (diff)
downloadgdb-41d5ff24c6723b87ada11c1287f50cb87f7d89e2.zip
gdb-41d5ff24c6723b87ada11c1287f50cb87f7d89e2.tar.gz
gdb-41d5ff24c6723b87ada11c1287f50cb87f7d89e2.tar.bz2
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>
-rw-r--r--gdb/testsuite/lib/dwarf.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index c694375..1a97f83 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/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.