From 41d5ff24c6723b87ada11c1287f50cb87f7d89e2 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Thu, 18 Apr 2024 13:28:52 +0200 Subject: [PATCH] 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 Approved-By: Tom de Vries Tested-By: Tom de Vries --- gdb/testsuite/lib/dwarf.exp | 1 + 1 file changed, 1 insertion(+) diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index c694375b534..1a97f83f8e6 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. -- 2.47.2