diff options
author | Tom de Vries <tdevries@suse.de> | 2024-07-30 21:50:17 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-07-30 21:50:17 +0200 |
commit | 183bccfce1bf17673bf5f3d42f3ca8daee20ac73 (patch) | |
tree | 9168d3023a244ebf16882cd83902ec6e9953127a /gdb | |
parent | 4f165e008d4f0533804ea125e0eae19f1cc12f9d (diff) | |
download | fsf-binutils-gdb-183bccfce1bf17673bf5f3d42f3ca8daee20ac73.zip fsf-binutils-gdb-183bccfce1bf17673bf5f3d42f3ca8daee20ac73.tar.gz fsf-binutils-gdb-183bccfce1bf17673bf5f3d42f3ca8daee20ac73.tar.bz2 |
[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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.ada/mi_var_access.exp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.ada/mi_var_access.exp b/gdb/testsuite/gdb.ada/mi_var_access.exp index b71c8f3..e797a15 100644 --- a/gdb/testsuite/gdb.ada/mi_var_access.exp +++ b/gdb/testsuite/gdb.ada/mi_var_access.exp @@ -42,8 +42,9 @@ mi_continue_to_line \ # to match possible values. set re_ok "\\^done,name=\"A_String_Access\",numchild=\"$decimal\",.*" set re_error "\\^error,msg=\"Value out of range\.\".*" +set re_error2 "\\^error,msg=\"Cannot access memory at address $hex\"" mi_gdb_test "-var-create A_String_Access * A_String_Access" \ - "($re_ok|$re_error)" \ + "($re_ok|$re_error|$re_error2)" \ "Create varobj" set bp_location [gdb_get_line_number "STOP2" ${testdir}/mi_access.adb] |