2
0
mirror of https://sourceware.org/git/binutils-gdb.git synced 2025-03-07 13:39:43 +08:00

[gdb/testsuite] Fix gdb.fortran/info-modules.exp with gcc-8

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.

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.
This commit is contained in:
Tom de Vries 2020-07-21 11:37:17 +02:00
parent 185a798e66
commit e9bdc5108c
2 changed files with 7 additions and 2 deletions
gdb/testsuite

View File

@ -1,3 +1,8 @@
2020-07-21 Tom de Vries <tdevries@suse.de>
* gdb.fortran/info-modules.exp (info module variables): Allow missing
line numbers for some variables.
2020-07-21 Tom de Vries <tdevries@suse.de>
* gdb.opt/inline-locals.c (init_array): New func.

View File

@ -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;"