aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-exp.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-02-21 14:25:31 +0100
committerTom de Vries <tdevries@suse.de>2024-02-21 14:25:31 +0100
commit99eeecc8d276e5af745e48825d66efff693a7678 (patch)
tree5892708a4e424699e8c4052e32a8aacc3050d585 /gdb/f-exp.h
parent33283d91d94e205ba34306cd1c253b9faceb4dd9 (diff)
downloadgdb-99eeecc8d276e5af745e48825d66efff693a7678.zip
gdb-99eeecc8d276e5af745e48825d66efff693a7678.tar.gz
gdb-99eeecc8d276e5af745e48825d66efff693a7678.tar.bz2
[gdb/testsuite] Fix error handling in _dap_read_json
In _dap_read_json we have a gdb_expect with clauses that generate errors: ... timeout { error "timeout reading json header" } eof { error "eof reading json header" } ... Proc gdb_expect uses dejagnu's remote_expect, which has some peculiar semantics related to errors: ... # remote_expect works basically the same as standard expect, but it # also takes care of getting the file descriptor from the specified # host and also calling the timeout/eof/default section if there is an # error on the expect call. ..... When a timeout triggers, it generates a timeout error, which is reported by gdb_expect, after which it runs the timeout/eof/default clauses, which generates an eof error, which is reported by runtest. I think the intention here is to generate just a one error, a timeout error. Fix this by postponing generating the error until after gdb_expect. Tested on x86_64-linux, by: - running all the DAP test-cases and observing no regressions, and - modifying the gdb.dap/eof.exp test-case to trigger a timeout error, and observing only a timeout error. PR testsuite/31382 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31382
Diffstat (limited to 'gdb/f-exp.h')
0 files changed, 0 insertions, 0 deletions