From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org, richard.bunt@arm.com
Subject: Re: [PATCH] gdb/testsuite/fortran: Add mixed language stack test
Date: Mon, 23 Mar 2020 12:05:36 +0000 [thread overview]
Message-ID: <20200323120536.GQ3317@embecosm.com> (raw)
In-Reply-To: <59f5a8cd-a39d-8abf-1502-f71950da0c69@suse.de>
* Tom de Vries <tdevries@suse.de> [2020-03-20 15:53:28 +0100]:
> On 05-03-2020 22:09, Andrew Burgess wrote:
> > + if { $lang == "fortran" } {
> > + set obj_pattern " = \\( base_one = \\( num1 = 1, num2 = 2, num3 = 3 \\), base_two = \\( string = 0x6184e0 'Something in C\\+\\+\\\\000', val = 3.5 \\), xxx = 9, yyy = 10.5 \\)"
> > + } else {
> > + set obj_pattern " = \\{<base_one> = \\{num1 = 1, num2 = 2, num3 = 3\\}, <base_two> = \\{string = 0x6184e0 \"Something in C\\+\\+\", val = 3.5\\}, xxx = 9, yyy = 10.5\\}"
> > + }
>
> FAILs for me due to hard-coded string address:
> ...
> print obj^M
> $1 = {<base_one> = {num1 = 1, num2 = 2, num3 = 3}, <base_two> = {string
> = 0x618430 "Something in C++", val = 3.5}, xxx = 9, yyy = 10.5}^M
> (gdb) FAIL: gdb.fortran/mixed-lang-stack.exp: lang=auto: print obj
> ...
Sorry for this, and thanks for reporting the problem.
I pushed the patch below to fix this issue.
Thanks,
Andrew
--
From 5935fd15306c26ead8274cbeab3287770f2ac92a Mon Sep 17 00:00:00 2001
From: Andrew Burgess <andrew.burgess@embecosm.com>
Date: Mon, 23 Mar 2020 12:01:08 +0000
Subject: [PATCH] gdb/testsuite: Remove hard coded addresses from expected
results
In commit:
commit 6b8c53f2f1c0cf5bee46120d892d4c72571375eb
Date: Sat Feb 8 21:26:31 2020 +0000
gdb/testsuite/fortran: Add mixed language stack test
The test incorrectly included two hard coded addresses in the expected
output, this commit replaces them with the $hex pattern.
gdb/testsuite/ChangeLog:
* gdb.fortran/mixed-lang-stack.exp: Replace two hard coded address
with $hex.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.fortran/mixed-lang-stack.exp | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
index df0807e268f..c0531c3fd9f 100644
--- a/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
+++ b/gdb/testsuite/gdb.fortran/mixed-lang-stack.exp
@@ -84,9 +84,9 @@ proc run_tests { lang } {
gdb_test "info frame" "source language c\\+\\+\..*" \
"info frame in frame #2"
if { $lang == "fortran" } {
- set obj_pattern " = \\( base_one = \\( num1 = 1, num2 = 2, num3 = 3 \\), base_two = \\( string = 0x6184e0 'Something in C\\+\\+\\\\000', val = 3.5 \\), xxx = 9, yyy = 10.5 \\)"
+ set obj_pattern " = \\( base_one = \\( num1 = 1, num2 = 2, num3 = 3 \\), base_two = \\( string = $hex 'Something in C\\+\\+\\\\000', val = 3.5 \\), xxx = 9, yyy = 10.5 \\)"
} else {
- set obj_pattern " = \\{<base_one> = \\{num1 = 1, num2 = 2, num3 = 3\\}, <base_two> = \\{string = 0x6184e0 \"Something in C\\+\\+\", val = 3.5\\}, xxx = 9, yyy = 10.5\\}"
+ set obj_pattern " = \\{<base_one> = \\{num1 = 1, num2 = 2, num3 = 3\\}, <base_two> = \\{string = $hex \"Something in C\\+\\+\", val = 3.5\\}, xxx = 9, yyy = 10.5\\}"
}
gdb_test "print obj" "${obj_pattern}"
--
2.14.5
prev parent reply other threads:[~2020-03-23 12:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 21:09 Andrew Burgess
2020-03-12 18:17 ` Tom Tromey
2020-03-20 14:53 ` Tom de Vries
2020-03-23 12:05 ` Andrew Burgess [this message]
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=20200323120536.GQ3317@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=richard.bunt@arm.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).