]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix regexp in gdb.ada/mi_var_access.exp some more
authorTom de Vries <tdevries@suse.de>
Tue, 30 Jul 2024 19:50:17 +0000 (21:50 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 30 Jul 2024 19:50:17 +0000 (21:50 +0200)
commit183bccfce1bf17673bf5f3d42f3ca8daee20ac73
tree9168d3023a244ebf16882cd83902ec6e9953127a
parent4f165e008d4f0533804ea125e0eae19f1cc12f9d
[gdb/testsuite] Fix regexp in gdb.ada/mi_var_access.exp some more

When running test-case gdb.ada/mi_var_access.exp on arm-linux (debian trixie),
I run into:
...
Expecting: ^(-var-create A_String_Access \* A_String_Access[
]+)?((\^done,name="A_String_Access",numchild="[0-9]+",.*|\^error,msg="Value out of range.".*)[
]+[(]gdb[)]
[ ]*)
-var-create A_String_Access * A_String_Access
^error,msg="Cannot access memory at address 0x4"
(gdb)
FAIL: gdb.ada/mi_var_access.exp: Create varobj (unexpected output)
...

This is similar to the problem fixed by commit c5a72a8d1c3 ("[gdb/testsuite]
Fix regexp in gdb.ada/mi_var_access.exp").

The problem in both cases is that we're printing an uninitialized variable,
and consequently we can run into various error messages during printing.

Fix this as in the other commit, by accepting the error message.

Tested on arm-linux.
gdb/testsuite/gdb.ada/mi_var_access.exp