aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-08-27 16:52:44 +0200
committerTom de Vries <tdevries@suse.de>2021-08-27 16:52:44 +0200
commit6a6429e19b0aa87f95cd20cb9df2715e6d3df6f1 (patch)
tree184c4a65b935ae7fab8b4ca9bf94f6d5cd8566ad
parent1d4a20b5769453ba69bd94c7731fc268fa21ff9a (diff)
downloadgdb-6a6429e19b0aa87f95cd20cb9df2715e6d3df6f1.zip
gdb-6a6429e19b0aa87f95cd20cb9df2715e6d3df6f1.tar.gz
gdb-6a6429e19b0aa87f95cd20cb9df2715e6d3df6f1.tar.bz2
[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
-rw-r--r--gdb/testsuite/lib/dwarf.exp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index a058a78..120fa41 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 {
}
}