aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-10-11 16:59:56 +0200
committerTom de Vries <tdevries@suse.de>2021-10-11 16:59:56 +0200
commitc8ed8c8ac380813b3a5d47131ccad1f79305c16b (patch)
tree0bc23fe2501be86948dd0e7ce0a77f5b5b8121fc /gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
parent3a480f1e35b7e22a3ca6309dae8f665c8dacd104 (diff)
downloadfsf-binutils-gdb-c8ed8c8ac380813b3a5d47131ccad1f79305c16b.zip
fsf-binutils-gdb-c8ed8c8ac380813b3a5d47131ccad1f79305c16b.tar.gz
fsf-binutils-gdb-c8ed8c8ac380813b3a5d47131ccad1f79305c16b.tar.bz2
[gdb/testsuite] Fix FAIL in gdb.mi/mi-var-child-f.exp
When running test-case gdb.mi/mi-var-child-f.exp on openSUSE Tumbleweed (with glibc 2.34) I run into: ... (gdb) ^M PASS: gdb.mi/mi-var-child-f.exp: mi runto prog_array Expecting: ^(-var-create array \* array[^M ]+)?(\^done,name="array",numchild="[0-9]+",value=".*",type=.*,has_more="0"[^M ]+[(]gdb[)] ^M [ ]*) -var-create array * array^M &"Attempt to use a type name as an expression.\n"^M ^error,msg="-var-create: unable to create variable object"^M (gdb) ^M FAIL: gdb.mi/mi-var-child-f.exp: create local variable array (unexpected output) ... The problem is that the name array is used both: - as the name for a local variable - as the name of a type in glibc, in file malloc/dynarray-skeleton.c, as included by nss/nss_files/files-hosts.c. Fix this by ignoring the shared lib symbols. Likewise in a couple of other fortran tests. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp')
-rw-r--r--gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
index 4264cec..c8e5232d 100644
--- a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
+++ b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp
@@ -25,10 +25,16 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
return -1
}
+# Avoid shared lib symbols.
+gdb_test_no_output "set auto-solib-add off"
+
if ![fortran_runto_main] {
return -1
}
+# Avoid libc symbols, in particular the 'array' type.
+gdb_test_no_output "nosharedlibrary"
+
# gdb_breakpoint [gdb_get_line_number "Display Message Breakpoint"]
gdb_breakpoint [gdb_get_line_number "Stop Here"]
gdb_breakpoint [gdb_get_line_number "Final Breakpoint"]