From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110544 invoked by alias); 2 Mar 2016 22:20:38 -0000 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 Received: (qmail 110520 invoked by uid 89); 2 Mar 2016 22:20:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=phil, expectation, definitive, assure 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 02 Mar 2016 22:20:36 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 2D7087F087; Wed, 2 Mar 2016 22:20:34 +0000 (UTC) Received: from [10.36.112.49] (ovpn-112-49.ams2.redhat.com [10.36.112.49]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u22MKXZc011615; Wed, 2 Mar 2016 17:20:34 -0500 Subject: Re: [PATCH] python: Use console format for output of gdb.execute command To: Catalin Udma , gdb-patches@sourceware.org References: <1456756452-15880-1-git-send-email-catalin.udma@freescale.com> From: Phil Muldoon Message-ID: <56D76731.7060202@redhat.com> Date: Wed, 02 Mar 2016 22:20:00 -0000 MIME-Version: 1.0 In-Reply-To: <1456756452-15880-1-git-send-email-catalin.udma@freescale.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00039.txt.bz2 On 29/02/16 14:34, Catalin Udma wrote: > When gdb is started in MI mode, the output of gdb.execute > command is in MI-format in case when it is executed from python stop > handler while for all other cases the output is in console-format. > > To assure consistent output format, this is fixed by using the console > format for all python gdb command executions. > > PR python/19743 While I have no problems with the patch, is the expectation that if the interpreter is in MI mode and a command has previously output that structured output, isn't the inverse the bug? Shouldn't gdb.execute honor the interpreter instead of forcing one? I'm not too sure on this, not being an MI expert, or whether some commands in GDB arbitrarily output one or the other. I'll dig around when I find some time and see if I can find anything definitive. The other thought of course is, if this is right, it arguably introduces an API regression. So we might have to work with some compatibility mode for existing scripts. A tricky bug! Cheers Phil