This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Include putpkt in TRY_CATCH. PR gdb/51275
- From: Gareth McMullin <gareth at blacksphere dot co dot nz>
- To: gdb-patches at sourceware dot org
- Date: Thu, 14 Mar 2013 15:02:29 +1300
- Subject: Include putpkt in TRY_CATCH. PR gdb/51275
- References: <CAL8qUbrD=fgMP7nE0O8tX=AXifUpQXas25o_4SfK4p79rfoUpw@mail.gmail.com>
If debugging with a remote connection over a serial link and the link is
disconnected, say by disconnecting USB serial port, the GDB quit command no
longer works.
Including the call to putpkt in the TRY_CATCH in remote_get_trace_status
allows the exception to be caught and reported, but still allows GDB to exit
on the quit command.
This fixes bug 15275 and probably 11221 which I believe is the same problem.
gdb:
2013-03-14 Gareth McMullin <gareth@blacksphere.co.nz>
PR gdb/15275
* remote.c (remote_get_trace_status): Include putpkt in TRY_CATCH.
---
diff --git a/gdb/remote.c b/gdb/remote.c
index 21d86f7..29c64c0 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10695,10 +10695,9 @@ remote_get_trace_status (struct trace_status *ts)
trace_regblock_size = get_remote_arch_state ()->sizeof_g_packet;
- putpkt ("qTStatus");
-
TRY_CATCH (ex, RETURN_MASK_ERROR)
{
+ putpkt ("qTStatus");
p = remote_get_noisy_reply (&target_buf, &target_buf_size);
}
if (ex.reason < 0)