From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22994 invoked by alias); 14 Mar 2013 02:02:58 -0000 Received: (qmail 22984 invoked by uid 22791); 14 Mar 2013 02:02:57 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-we0-f172.google.com (HELO mail-we0-f172.google.com) (74.125.82.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Mar 2013 02:02:53 +0000 Received: by mail-we0-f172.google.com with SMTP id d46so1683110wer.3 for ; Wed, 13 Mar 2013 19:02:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-originating-ip:in-reply-to:references :from:date:message-id:subject:to:content-type:x-gm-message-state; bh=IH1sXzjtVfUmPY9G+pSguq4CW9cNzA7njKTovueQar8=; b=pSpdZwwtxc70sMgmsxO7dKmHmyGOQsScqiwuPKWGil8VBgBS9DI5gNSB+AdWYMjfvk N6TcbRCwmvrsfIOiSn5XN0mZHCQK1YGYtgMQEmrfxI7Va8xyUcZAEQZT6tOyZKm0Pb5q ZO3fjOEfwXBFsxTARes/vnGofEL/qBfR+O4LHn57fHc+rY6G5sB5VY8P9hfTNbFhlnu/ dfRf2eUOHgYau+/+3PlNJIw73M1ngIVCJqbTIuy8lV5nvo+m1EV0tqFXGIkiyegNfYtZ nxkuTyE/ynLan2Wh7TuzwA5wqJBE08QhZLA99Op8v1+sVMbBoMaVNxjlLCO9peWsxm+t 13tQ== X-Received: by 10.194.110.69 with SMTP id hy5mr933404wjb.1.1363226570092; Wed, 13 Mar 2013 19:02:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.242.199 with HTTP; Wed, 13 Mar 2013 19:02:29 -0700 (PDT) In-Reply-To: References: From: Gareth McMullin Date: Thu, 14 Mar 2013 02:02:00 -0000 Message-ID: Subject: Include putpkt in TRY_CATCH. PR gdb/51275 To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlaBCITmKBU/DJcUWmzFvIv4OdhxSVTqMvMJgvSFIcdgFVjA8GV3/zBhFuK7mVKEW1DhD9t X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00616.txt.bz2 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 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)