From: Carl Love <cel@us.ibm.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
Tom Tromey <tom@tromey.com>,
Will Schmidt <will_schmidt@vnet.ibm.com>,
cel@us.ibm.com
Subject: RE: [pushed] [gdb/testsuite] Fix gdb.ada/out_of_line_in_inlined.exp for ppc64le
Date: Mon, 28 Nov 2022 13:07:13 -0800 [thread overview]
Message-ID: <bc0abf936cfec288e62ccc5df3c767bc0d88fc2d.camel@us.ibm.com> (raw)
In-Reply-To: <c9cb2924-5d88-70b8-8a94-c31781f85360@suse.de>
Tom:
On Mon, 2022-11-28 at 21:46 +0100, Tom de Vries wrote:
> > I made the change $decimal\\.$decimal? and that seemed
> > to work on my system. I tried the test on my X86 box but it is not
> > supported. Looks like the system doesn't have the ada compiler
> > installed.
> >
> > Can you verify that the change works on your system and if the
> > patch
> > looks ok. Thanks.
> >
>
> It doesn't work, as expected, because the output is:
> ...
> Breakpoint 1, foo_o224_021.child1.child2 (s=...) at
> /home/vries/gdb_versions/devel/binutils-
> gdb.git/gdb/testsuite/gdb.ada/out_of_line_in_inlined/foo_o224_021.adb
> :24^M
> ...
> and $decimal\\.$decimal? does not match "1".
If I use the original suggestion, here is the patch I ran:
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
index 621b04e179b..54c55bc6f7e 100644
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
@@ -34,7 +34,7 @@ foreach_with_prefix scenario {all minimal} {
gdb_run_cmd
gdb_test "" \
- "Breakpoint $decimal, ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
+ "Breakpoint $decimal(\\.$decimal)?, ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
"run to foo_o224_021.child1.child2"
set opt_addr_in "($hex in)?"
then I run the test I get:
make check RUNTESTFLAGS='GDB=/home/carll/bin/gdb gdb.ada/out_of_line_in_inlined.exp ' > out
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
WARNING: Couldn't find the global config file.
WARNING: No tool specified
WARNING: Couldn't find the global config file.
ERROR: tcl error sourcing /home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp.
ERROR: tcl error code TCL LOOKUP VARNAME decimal
ERROR: can't read "decimal(\.[0-9]+)": variable isn't array
while executing
"gdb_test "" "Breakpoint $decimal(\\.$decimal)?, ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" "run to foo_o224_021.child1.child2""
("uplevel" body line 13)
invoked from within
"uplevel 1 $body"
invoked from within
"foreach_with_prefix scenario {all minimal} {
set flags [list debug \
optimize=-O2 \
additional_flags=-fgnat-encodings=$scenario]
if..."
(file "/home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp" line 22)
invoked from within
"source /home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp"
invoked from within
"catch "uplevel #0 source $test_file_name" msg"
ERROR: -------------------------------------------
ERROR: in testcase /home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
ERROR: can't read "decimal(\.[0-9]+)": variable isn't array
ERROR: tcl error code TCL LOOKUP VARNAME decimal
ERROR: tcl error info:
can't read "decimal(\.[0-9]+)": variable isn't array
while executing
"gdb_test "" "Breakpoint $decimal(\\.$decimal)?, ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" "run to foo_o224_021.child1.child2""
("uplevel" body line 13)
invoked from within
"uplevel 1 $body"
invoked from within
"foreach_with_prefix scenario {all minimal} {
set flags [list debug \
optimize=-O2 \
additional_flags=-fgnat-encodings=$scenario]
if..."
(file "/home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp" line 22)
invoked from within
"source /home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /home/carll/GDB/build-test/gdb/testsuite/../../../binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp"
invoked from within
"catch "uplevel #0 source $test_file_name" msg"
--------------------------------------------------
make[4]: *** [Makefile:226: do-check-single] Error 1
make[3]: *** [Makefile:161: check] Error 2
make[2]: *** [Makefile:1922: check] Error 2
make[1]: *** [Makefile:13585: check-gdb] Error 2
make: *** [Makefile:2531: do-check] Error 2
The error seems to be that it is looking for an array???
Second attempt, maybe the parenthesis need to be escaped, i.e.
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
index 621b04e179b..de1a6d053f1 100644
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
@@ -34,7 +34,7 @@ foreach_with_prefix scenario {all minimal} {
gdb_run_cmd
gdb_test "" \
- "Breakpoint $decimal, ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
+ "Breakpoint $decimal\\(\\.$decimal\\)?, ($hex in )?foo_o224_021\\.child1\\.child2 \\(s=\\.\\.\\.\\).*" \
"run to foo_o224_021.child1.child2"
set opt_addr_in "($hex in)?"
GDB seems to accept this, but I get the test failure:
(gdb) break foo_o224_021.child1.child2^M
Breakpoint 1 at 0x10011870: foo_o224_021.child1.child2. (3 locations)
(gdb) run
Starting program: /home/carll/GDB/build-test/gdb/testsuite/outputs/gdb.ada/out_of_line_in_inlined/foo_o224_021-all
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1.1, foo_o224_021.child1.child2 (s=...) at /home/carll/GDB/binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_in_inlined/foo_o224_021.adb:27^M
27 Do_Nothing (C);
(gdb) FAIL: gdb.ada/out_of_line_in_inlined.exp: scenario=all: run to foo_o224_021.child1.child2
So it doesn't match. I am guessing it is looking for the parentheses
in the string to match and of course doesn't see them.
Carl
next prev parent reply other threads:[~2022-11-28 21:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 16:21 Tom de Vries
2022-11-28 17:45 ` Carl Love
2022-11-28 18:08 ` Tom de Vries
2022-11-28 19:55 ` Carl Love
2022-11-28 20:46 ` Tom de Vries
2022-11-28 21:07 ` Carl Love [this message]
2022-11-28 21:31 ` Tom de Vries
2022-11-28 21:44 ` Carl Love
2022-11-28 22:09 ` Tom de Vries
2022-11-28 23:01 ` Carl Love
2022-11-29 7:24 ` Tom de Vries
2022-11-28 21:33 ` Carl Love
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=bc0abf936cfec288e62ccc5df3c767bc0d88fc2d.camel@us.ibm.com \
--to=cel@us.ibm.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--cc=tom@tromey.com \
--cc=will_schmidt@vnet.ibm.com \
/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).