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] Fix double debug info in gdb.dwarf2/dw2-ref-missing-frame.exp
Date: Mon, 11 Oct 2021 13:32:13 +0200	[thread overview]
Message-ID: <20211011113211.GA16882@delia.home> (raw)

Hi,

A mistake slipped in in commit a5ea23036d8 "[gdb/testsuite] Use function_range
in gdb.dwarf2/dw2-ref-missing-frame.exp".

Before the commit the main file was compiled with debug info, and the two
others not:
...
if {[prepare_for_testing_full "failed to prepare" \
        [list $testfile {} $srcfile {} $srcfuncfile {} \
             $srcmainfile debug]]} {
...

After the commit, all were compiled with debug info, and consequently, there
are two versions of debug info for $srcfuncfile.  This shows up as a FAIL when
running the test-case with target boards readnow and cc-with-debug-names.

Fix this by using prepare_for_testing_full, as before.

Tested on x86_64-linux.

Fixes: a5ea23036d8 ("[gdb/testsuite] Use function_range in
       gdb.dwarf2/dw2-ref-missing-frame.exp")

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix double debug info in gdb.dwarf2/dw2-ref-missing-frame.exp

---
 gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
index e8d7c0ff280..d4734f27bff 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
@@ -29,15 +29,17 @@ lassign [function_range func_loopfb \
 
 set flags \
     [list \
-         "debug" \
          "additional_flags=\"-DFUNC_NOFB_START=$func_nofb_start\"" \
          "additional_flags=\"-DFUNC_NOFB_END=$func_nofb_start + $func_nofb_len\"" \
          "additional_flags=\"-DFUNC_LOOPFB_START=$func_loopfb_start\"" \
          "additional_flags=\"-DFUNC_LOOPFB_END=$func_loopfb_start + $func_loopfb_len\""]
 set executable ${testfile}
 
-if {[prepare_for_testing "failed to prepare" $testfile \
-         [list $srcfile3 $srcfile $srcfile2] $flags] == -1} {
+if { [prepare_for_testing_full "failed to prepare" \
+	  [list $testfile {} \
+	       $srcfile [concat $flags {nodebug}]  \
+	       $srcfile2 {nodebug} \
+	       $srcfile3 {debug}]] == -1 } {
     return -1
 }
 

                 reply	other threads:[~2021-10-11 11:32 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=20211011113211.GA16882@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