public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Simplify gdb.dwarf2/locexpr-data-member-location.exp
Date: Tue, 7 Sep 2021 10:52:59 +0200	[thread overview]
Message-ID: <69503e50-69c7-10ab-6eda-a2a1cda600e4@suse.de> (raw)
In-Reply-To: <20210905063948.GA22464@delia>

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

On 9/5/21 8:39 AM, Tom de Vries wrote:
> Avoid this by simplify the test-case to trigger the same assert using the file
> command instead.

FTR, after the other commits this is what remains.

At this point, I don't see a pressing reason for why this should be
committed.  But perhaps somebody else does.

Thanks,
- Tom

[-- Attachment #2: 0001-gdb-testsuite-Simplify-gdb.dwarf2-locexpr-data-member-location.exp.patch --]
[-- Type: text/x-patch, Size: 1878 bytes --]

[gdb/testsuite] Simplify gdb.dwarf2/locexpr-data-member-location.exp

When reverting commit 5a20fadc841 the test-case
gdb.dwarf2/locexpr-data-member-location.exp runs into an internal-error.

Simplify the test-case by triggering the internal-error using gdb_unload
instead of runto "bar".

Tested on x86_64-linux.

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

diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index 1f70e6a34bd..98f9270d7bb 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -40,7 +40,7 @@
 #    purging of shared objects.
 #
 # 3) After performing some simple gdb commands, the program is
-#    run again.  In the course of running the objfile destructor
+#    discarded.  In the course of running the objfile destructor
 #    associated with the shared object, values are preserved
 #    along with their types.  As noted earlier, it was during
 #    the recursive type copy that the bug was observed.
@@ -342,8 +342,7 @@ gdb_test "step" "bar \\(.*" "step into bar"
 
 # We don't want a clean restart here since that will be too clean.
 # The original reproducer for PR28030 set a breakpoint in the shared
-# library and then restarted via "run".  The command below does roughly
-# the same thing.  It's at this step that an internal error would
-# occur for PR28030.  The "message" argument tells runto to turn on
-# the printing of PASSes while runto is doing its job.
-runto "bar" message
+# library and then restarted via "run".  The command below is more minimal:
+# it discards executable file and symbol table.  It's at the latter step
+# that an internal error would occur for PR28030.
+gdb_unload

  parent reply	other threads:[~2021-09-07  8:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05  6:39 Tom de Vries
2021-09-06 15:48 ` [committed][gdb/testsuite] Handle eof in gdb_internal_error_resync Tom de Vries
2021-09-06 23:28 ` [committed][gdb/testsuite] Handle internal-error in gdb_run_cmd Tom de Vries
2021-09-07  8:21 ` [committed][gdb/testsuite] Handle internal-error in gdb_unload Tom de Vries
2021-09-07  8:52 ` Tom de Vries [this message]
2021-09-08  0:34   ` [PATCH][gdb/testsuite] Simplify gdb.dwarf2/locexpr-data-member-location.exp Simon Marchi

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=69503e50-69c7-10ab-6eda-a2a1cda600e4@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).