[committed][gdb/testsuite] Fix gdb.fortran/info-modules.exp with gcc-8
Tom de Vries
tdevries@suse.de
Tue Jul 21 09:37:37 GMT 2020
Hi,
When using test-case gdb.fortran/info-modules.exp with gcc 8.4.0, I run into:
...
FAIL: gdb.fortran/info-modules.exp: info module variables: check for entry \
'info-types.f90', '35', 'Type m1t1 mod1::__def_init_mod1_M1t1;'
FAIL: gdb.fortran/info-modules.exp: info module variables: check for entry \
'info-types.f90', '35', 'Type __vtype_mod1_M1t1 mod1::__vtab_mod1_M1t1;'
...
This is caused by this change in gdb output:
...
(gdb) info module variables
...
File gdb.fortran/info-types.f90:
-35: Type m1t1 mod1::__def_init_mod1_M1t1;
+ Type m1t1 mod1::__def_init_mod1_M1t1;
-35: Type __vtype_mod1_M1t1 mod1::__vtab_mod1_M1t1;
+ Type __vtype_mod1_M1t1 mod1::__vtab_mod1_M1t1;
21: real(kind=4) mod1::mod1_var_1;
22: integer(kind=4) mod1::mod1_var_2;
...
caused by a change in debug info.
Fix this by allowing those entries without line number.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix gdb.fortran/info-modules.exp with gcc-8
gdb/testsuite/ChangeLog:
2020-07-21 Tom de Vries <tdevries@suse.de>
* gdb.fortran/info-modules.exp (info module variables): Allow missing
line numbers for some variables.
---
gdb/testsuite/gdb.fortran/info-modules.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.fortran/info-modules.exp b/gdb/testsuite/gdb.fortran/info-modules.exp
index a3a9b2cb18..02e35c207e 100644
--- a/gdb/testsuite/gdb.fortran/info-modules.exp
+++ b/gdb/testsuite/gdb.fortran/info-modules.exp
@@ -117,9 +117,9 @@ GDBInfoModuleSymbols::check_entry "${srcfile2}" "mod2" "19" \
"${integer4} mod2::mod2_var_1;"
GDBInfoModuleSymbols::check_entry "${srcfile2}" "mod2" "20" \
"${real4} mod2::mod2_var_2;"
-GDBInfoModuleSymbols::check_entry "${srcfile}" "mod1" "35" \
+GDBInfoModuleSymbols::check_entry "${srcfile}" "mod1" "(35)?" \
"Type m1t1 mod1::__def_init_mod1_M1t1;"
-GDBInfoModuleSymbols::check_entry "${srcfile}" "mod1" "35" \
+GDBInfoModuleSymbols::check_entry "${srcfile}" "mod1" "(35)?" \
"Type __vtype_mod1_M1t1 mod1::__vtab_mod1_M1t1;"
GDBInfoModuleSymbols::check_entry "${srcfile}" "mod1" "21" \
"${real4} mod1::mod1_var_1;"
More information about the Gdb-patches
mailing list