Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Generate .debug_aranges in gdb.dwarf2/locexpr-data-member-location.exp
Date: Tue, 14 Sep 2021 13:00:17 +0200	[thread overview]
Message-ID: <20210914110015.GA13980@delia.home> (raw)

Hi,

When running test-case gdb.dwarf2/locexpr-data-member-location.exp with target
board cc-with-debug-names, all tests pass but we run into PR28261:
...
(gdb) run ^M
Starting program: locexpr-data-member-location ^M
warning: Section .debug_names in locexpr-data-member-location-lib.so has \
  abbreviation_table of size 1 vs. written as 37, ignoring .debug_names.^M
...

Using a patch that fixes PR28261, the warning is gone, but we run into:
...
FAIL: gdb.dwarf2/locexpr-data-member-location.exp: step into foo
...

This is due a missing .debug_aranges contribution for the CU declared in
gdb.dwarf2/locexpr-data-member-location.exp.

Fix this by adding the missing .debug_aranges contribution.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Generate .debug_aranges in gdb.dwarf2/locexpr-data-member-location.exp

---
 gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index 1f70e6a34bd..1c366521808 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -144,7 +144,7 @@ Dwarf::assemble ${asm_file} {
     get_func_info foo $flags
     get_func_info bar $flags
 
-    cu {} {
+    cu { label cu_label } {
 	DW_TAG_compile_unit {
 	    {DW_AT_language @DW_LANG_C_plus_plus}
 	    {name ${::srcfile}}
@@ -294,6 +294,11 @@ Dwarf::assemble ${asm_file} {
 	    {DW_LNE_end_sequence}
 	}
     }
+
+    aranges {} cu_label {
+	arange {} $foo_start $foo_end
+	arange {} $bar_start $bar_end
+    }
 }
 
 # Compile the shared object again, but this time include / use the

                 reply	other threads:[~2021-09-14 11:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210914110015.GA13980@delia.home \
    --to=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox