[PATCH v2 4/6] Remove some dead code from handle_search_memory
Tom Tromey
tromey@adacore.com
Wed Oct 7 18:06:41 GMT 2020
>>>>> "Christian" == Christian Biesinger via Gdb-patches <gdb-patches@sourceware.org> writes:
>> 'error' is noreturn, so I removed that code since it was dead.
>> Maybe whatever catches the exception sends an error.
Christian> Yeah sorry, I understand that your patch doesn't change what this
Christian> function does, I was just wondering if both the old and new code have
Christian> a bug that it should send an error but doesn't.
Yeah, sorry about that - I should have realized you knew.
I think the try/catch in server.cc:captured_main will catch this
exception and write the error:
catch (const gdb_exception_error &exception)
{
fflush (stdout);
fprintf (stderr, "gdbserver: %s\n", exception.what ());
if (response_needed)
{
write_enn (cs.own_buf);
putpkt (cs.own_buf);
}
Tom
More information about the Gdb-patches
mailing list