From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108776 invoked by alias); 1 Nov 2017 01:37:32 -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 108757 invoked by uid 89); 1 Nov 2017 01:37:31 -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,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 01 Nov 2017 01:37:30 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id vA11bFbW031006 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Oct 2017 21:37:20 -0400 Received: from [10.0.0.11] (192-222-251-162.qc.cable.ebox.net [192.222.251.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 6131B1E51C; Tue, 31 Oct 2017 21:37:15 -0400 (EDT) Subject: Re: [PATCH] Use console uiout when executing breakpoint commands To: gdb-patches@sourceware.org Cc: eliz@gnu.org References: <83vaj8c3fj.fsf@gnu.org> <20171021184121.694-1-simon.marchi@polymtl.ca> From: Simon Marchi Message-ID: <2a3ce6b1-844a-e212-28f7-3787c325ad66@polymtl.ca> Date: Wed, 01 Nov 2017 01:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171021184121.694-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 1 Nov 2017 01:37:15 +0000 X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00000.txt.bz2 On 2017-10-21 02:41 PM, Simon Marchi wrote: > As reported here > > https://sourceware.org/ml/gdb/2017-10/msg00020.html > > the output of certain commands, like backtrace, doesn't appear anywhere > when it is run as a breakpoint command and when using MI. > > The reason is that the current_uiout is set to the mi_ui_out while these > commands run, whereas we want the output as CLI output. Some commands > like "print" work, because they use printf_filtered (gdb_stdout, ...) > directly, bypassing the current ui_out. > > The fix I did is to force setting the cli_uiout as the current_uiout > when calling execute_control_command. I am not sure if this is the > right way to fix the problem, comments about the approach would be > appreciated. > > I enhanced gdb.mi/mi-break.exp to test the backtrace command. > > Regtested on the buildbot. I pushed this patch in. Simon