[gdb/testsuite] Dump dap.log.$n to gdb.log when exceptions found
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
For a patch I submitted, the Linaro CI reported a failure:
...
FAIL: gdb.dap/attach.exp: exceptions in log file
...
I ran the test-case locally, and observed the same FAIL in the gdb.sum file.
I then wanted to confirm that I reproduced the exact same problem, but
realized that I couldn't because there's no way for me to know what exception
occurred, and where, because that information is logged in the dap.log.$n
file, and the Linaro CI only saves the gdb.sum and gdb.log files.
This issue is even worse if only the CI can reproduce a FAIL.
Fix this in dap_check_log_file by dumping dap.log.$n to gdb.log when
exceptions are found.
Tested on x86_64-linux.
---
gdb/testsuite/lib/dap-support.exp | 3 +++
1 file changed, 3 insertions(+)
base-commit: 086c8f406d82ce171d5867eed93f1308e07252c5
Comments
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> Fix this in dap_check_log_file by dumping dap.log.$n to gdb.log when
Tom> exceptions are found.
Looks good to me.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
@@ -381,6 +381,9 @@ proc dap_check_log_file {} {
if {$ok} {
pass "exceptions in log file"
} else {
+ verbose -log -- "--- DAP LOG START ---"
+ verbose -log -- $contents
+ verbose -log -- "--- DAP LOG END ---"
fail "exceptions in log file"
}
}