From patchwork Wed Oct 4 12:02:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 23323 Received: (qmail 72776 invoked by alias); 4 Oct 2017 12:02:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 72189 invoked by uid 89); 4 Oct 2017 12:02:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1570 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Oct 2017 12:02:12 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3BB195F92A for ; Wed, 4 Oct 2017 12:02:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3BB195F92A Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id B62315C8AE for ; Wed, 4 Oct 2017 12:02:10 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] Move code out of 'between TRY and CATCH' Date: Wed, 4 Oct 2017 13:02:02 +0100 Message-Id: <1507118522-25258-1-git-send-email-palves@redhat.com> I tried building GDB with TRY/CATCH mapped to raw C++ try/catch (by defining GDB_XCPT to GDB_XCPT_RAW_TRY in gdb/common/common-exceptions.h), and that caught a case of code written between try and catch. This commit fixes it. gdb/ChangeLog: 2017-10-04 Pedro Alves * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code out of 'between TRY and CATCH'. --- gdb/ChangeLog | 5 +++++ gdb/guile/scm-breakpoint.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bc58f51..87f84ca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2017-10-04 Pedro Alves + * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code + out of 'between TRY and CATCH'. + +2017-10-04 Pedro Alves + * cli/cli-cmds.c (complete_command): Add missing END_CATCH. * common/common-exceptions.h (TRY): Open an outermost scope. Expand intro comment. diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c index b6b6810..ec75be5 100644 --- a/gdb/guile/scm-breakpoint.c +++ b/gdb/guile/scm-breakpoint.c @@ -988,13 +988,14 @@ gdbscm_breakpoint_commands (SCM self) { print_command_lines (current_uiout, breakpoint_commands (bp), 0); } - current_uiout->redirect (NULL); CATCH (except, RETURN_MASK_ALL) { + current_uiout->redirect (NULL); gdbscm_throw_gdb_exception (except); } END_CATCH + current_uiout->redirect (NULL); result = gdbscm_scm_from_c_string (buf.c_str ()); return result;