From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16937 invoked by alias); 7 Dec 2010 21:57:28 -0000 Received: (qmail 16929 invoked by uid 22791); 7 Dec 2010 21:57:27 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Dec 2010 21:57:22 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB7LvJsG009593 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Dec 2010 16:57:19 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB7LvILS012461; Tue, 7 Dec 2010 16:57:19 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id oB7LvIic007316; Tue, 7 Dec 2010 16:57:18 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id B8A8388808C; Tue, 7 Dec 2010 14:57:17 -0700 (MST) From: Tom Tromey To: Marc Khouzam Cc: "'gdb-patches\@sourceware.org'" Subject: Re: [MI] Segfault using 'interpreter-exec mi' References: Date: Tue, 07 Dec 2010 21:57:00 -0000 In-Reply-To: (Marc Khouzam's message of "Tue, 7 Dec 2010 16:38:24 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-12/txt/msg00079.txt.bz2 >>>>> "Marc" == Marc Khouzam writes: Marc> Thanks! Marc> I was stuck trying to use catch_exception(), which was not working Marc> because I needed the return value of mi_parse(), but I see that Marc> using TRY_CATCH was the way to go. Yeah. For future reference, you can do that by having a trampoline function that has different arguments. I find TRY_CATCH a lot simpler though. >> + if (exception.reason < 0) >> + { >> + mi_print_exception (token, exception); >> + xfree (token); Marc> Here, do we need an call to Marc> mi_out_rewind (uiout)? Marc> I don't know what it does, but I noticed it was being Marc> called below after mi_print_exception() It is unclear to me what mi_out_rewind does. There don't seem to be any comments describing this function. So, I chose to implement this in a way that is compatible with the earlier code, which did not call mi_out_rewind on this path. Tom