[PATCH] Remove some TODOs from gdb.cp tests

Tom Tromey tromey@adacore.com
Tue Jul 11 13:17:51 GMT 2023


>> * exception.exp - the code relying on the line numbers can't work,
>> because gdb never prints that message anyway.

Bruno> If that is dead code, why not remove those and just have a simple gdb_test?

Yeah, I did do that, e.g.:

>> # Continue to second catch.
>> -set name "continue to second catch"
>> -gdb_test_multiple "continue" $name {
>> -    -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception caught\\), throw location.*${srcfile}:30, catch location .*${srcfile}:58\r\n$gdb_prompt $" {
>> -	pass $name
>> -    }
>> -    -re "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception caught\\).*\r\n$gdb_prompt $" {
>> -	pass $name
>> -    }
>> -}
>> +gdb_test "continue" \
>> +    "Continuing.${ws}Catchpoint \[0-9\]+ \\(exception caught\\).*" \
>> +    "continue to second catch"
>> # Backtrace from the catch point.
>> # This should get to user code.

Tom


More information about the Gdb-patches mailing list