[gdb/testsuite] Fix gdb.fortran/module.exp for debug info from other files
authorTom de Vries <tdevries@suse.de>
Thu, 17 Oct 2019 08:07:05 +0000 (10:07 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 17 Oct 2019 08:07:05 +0000 (10:07 +0200)
On openSUSE Leap 15.1, I get:
...
FAIL: gdb.fortran/module.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 module.f90.

Fix this by extending the regexps.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-10-17  Tom de Vries  <tdevries@suse.de>

* gdb.fortran/module.exp: Allow info variables to print info for files
other than module.f90.

Change-Id: I401d8018b121fc7343f6bc8b671900349462457f

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/module.exp

index 395a3ccacf4f37369898f67afad3dfacdb743e15..1075a1d614d303703582d15490660cad4ba9432c 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-17  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.fortran/module.exp: Allow info variables to print info for files
+       other than module.f90.
+
 2019-10-16  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.fortran/module.exp: Extend with 'info variables' test.
index 276f7dc3c24dc8d6f7c7e3f010be937d51e5e697..a2aff3cb7c73a3b58258eafb7541fa3b5d4320a6 100644 (file)
@@ -53,7 +53,10 @@ gdb_test "info variables -n" \
         "33:\[ \t\]+${int_type} modmany::var_c;" \
         "33:\[ \t\]+${int_type} modmany::var_i;" \
         "37:\[ \t\]+${int_type} moduse::var_x;" \
-        "37:\[ \t\]+${int_type} moduse::var_y;" ]
+        "37:\[ \t\]+${int_type} moduse::var_y;(" \
+        "" \
+        "File .*:(" \
+        "$decimal:.*)+)*"]
 
 
 # Do not use simple single-letter names as GDB would pick up for expectedly
This page took 0.043048 seconds and 4 git commands to generate.