From: Tom de Vries Date: Fri, 27 Aug 2021 14:52:44 +0000 (+0200) Subject: [gdb/testsuite] Generate .debug_aranges entry for dummy CU X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a6429e19b0aa87f95cd20cb9df2715e6d3df6f1;p=binutils-gdb.git [gdb/testsuite] Generate .debug_aranges entry for dummy CU A best practise for DWARF [1] is to generate .debug_aranges entries for CUs even if they have no address range. Generate .debug_arange entries for the dummy CUs added by the DWARF assembler. Tested on x86_64-linux. [1] http://wiki.dwarfstd.org/index.php?title=Best_Practices --- diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index a058a78df2e..120fa418201 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -2419,7 +2419,11 @@ namespace eval Dwarf { # Emit a dummy CU. proc dummy_cu {} { # Generate a CU with default options and empty body. - cu {} { + cu {label dummy_cu} { + } + + # Generate an .debug_aranges entry for the dummy CU. + aranges {} dummy_cu { } }