public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix info-var.exp for debug info from other files
@ 2019-08-28 17:13 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-08-28 17:13 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=48352473b1d2c213749a324f392cf8ec53d273a6
commit 48352473b1d2c213749a324f392cf8ec53d273a6
Author: Tom de Vries <tdevries@suse.de>
Date: Wed Aug 28 19:13:29 2019 +0200
[gdb/testsuite] Fix info-var.exp for debug info from other files
On openSUSE Leap 15.1, I get:
...
FAIL: gdb.base/info-var.exp: info variables
FAIL: gdb.base/info-var.exp: info variables -n
...
because the info variables command prints info also for init.c:
...
File init.c:^M
24: const int _IO_stdin_used;^M
...
while the regexps in the test-case only expect info for info-var-f1.c and
info-var-f2.c.
Fix this by extending the regexps.
Tested on x86_64-linux, both openSUSE Leap 15.1 and Fedora 30.
gdb/testsuite/ChangeLog:
2019-08-28 Tom de Vries <tdevries@suse.de>
* gdb.base/info-var.exp: Allow info variables to print info for files
other than info-var-f1.c and info-var-f2.c.
Diff:
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.base/info-var.exp | 10 ++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3939a74..06ee15c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-28 Tom de Vries <tdevries@suse.de>
+
+ * gdb.base/info-var.exp: Allow info variables to print info for files
+ other than info-var-f1.c and info-var-f2.c.
+
2019-08-28 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.fortran/info-types.exp: Add module.
diff --git a/gdb/testsuite/gdb.base/info-var.exp b/gdb/testsuite/gdb.base/info-var.exp
index 5a07d62..6dd896d 100644
--- a/gdb/testsuite/gdb.base/info-var.exp
+++ b/gdb/testsuite/gdb.base/info-var.exp
@@ -37,7 +37,10 @@ gdb_test "info variables" \
"File .*${srcfile2}:" \
"18:\[ \t\]+int global_var;" \
"20:\[ \t\]+static int f2_var;" \
- "" \
+ "(" \
+ "File .*:(" \
+ "$decimal:.*" \
+ ")+)*" \
"Non-debugging symbols:" \
".*"]
@@ -50,7 +53,10 @@ gdb_test "info variables -n" \
"" \
"File .*${srcfile2}:" \
"18:\[ \t\]+int global_var;" \
- "20:\[ \t\]+static int f2_var;" ]
+ "20:\[ \t\]+static int f2_var;(" \
+ "" \
+ "File .*:(" \
+ "$decimal:.*)+)*"]
gdb_test "info variables -n global" \
[multi_line \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-28 17:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 17:13 [binutils-gdb] [gdb/testsuite] Fix info-var.exp for debug info from other files Tom de Vries
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).