This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/doco] (Ada) provide the exception message when hitting an exception catchpoint
On 11/25/2017 02:05 AM, Joel Brobecker wrote:
>> +ERROR: tcl error sourcing /home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp.
>> +ERROR: can't read "exception_name(",exception-message="foo\.adb:[0-9]+ explicit raise)": variable isn't array
>> + while executing
>> +"mi_expect_stop "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"$exception_name(\",exception-message=\"$exception_message)?" "foo..."
>> + (procedure "continue_to_exception" line 17)
>> + invoked from within
>> +"continue_to_exception \
>> + "CONSTRAINT_ERROR" "foo\\.adb:$decimal explicit raise" \
>> + "continue until CE caught by all-exceptions catchpoint""
>> + (file "/home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp" line 106)
>> + invoked from within
>> +"source /home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp"
>> + ("uplevel" body line 1)
>> + invoked from within
>> +"uplevel #0 source /home/pedro/gdb/src/gdb/testsuite/gdb.ada/mi_catch_ex.exp"
>> + invoked from within
>> +"catch "uplevel #0 source $test_file_name""
>
> Grumpf. Sorry about that. I'm not sure why it was working for me
> before. I was able to reproduce on a different machine, but noticed
> another error in the process. Attached is a tentative patch. It gives
> me clean results (15 PASSes). Does it work for you?
Yup, works for me.
Thanks,
Pedro Alves
>
> gdb/testsuite/ChangeLog:
>
> * gdb.ada/mi_catch_ex.exp (continue_to_exception): Adjust
> expected output in gdb_expect call to allow the exception
> message to be present as well. Fix syntax confusion to avoid
> TCL thinking that exception_name is an array.
>