From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36938 invoked by alias); 10 May 2019 18:57:40 -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 36927 invoked by uid 89); 10 May 2019 18:57:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1494, sk:fixed_b X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.142.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 May 2019 18:57:38 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 66FF41E03F2; Fri, 10 May 2019 14:57:37 -0400 (EDT) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id itvUzOy14zxy; Fri, 10 May 2019 14:57:37 -0400 (EDT) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id EAD501E03E8; Fri, 10 May 2019 14:57:36 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com EAD501E03E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1557514656; bh=SQgT03KwGbJqPiZFQLR7DT7jdYLogNogvWDfCQRyv2Y=; h=To:From:Message-ID:Date:MIME-Version; b=T+J4tkgEuIZonh2AXIo5ar6xWWwXiTkiX7p30jS+5U/7UC8eNPXYLGiHZ85je5t2C ebtcPNbhM1zUR7R47TBgzBnwKFEJAsjosuZNtigyhD1AYt1054FcLislHLfRjt2DuW 6G1+gciaGSb+m5FxR7ZlMDg5DZvokzRyxq1+7MXGC2WWiEa6BpKlGmwHTqq0cYBn6T 4A3Vw4ZSgBZXta+jyRQxnJc42BmApodJqwRDbUmGZSUEu1XbReiVyF+1/v9C/uE0SI vLH/Tbw5c65WPJpWjEFPj1aqY8S8CjH65tkTvsQfU26kyKEr3YiEPPAJb0VnCPmakV tDjqVDWRwqSmQ== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 6WmS4QdmtyNz; Fri, 10 May 2019 14:57:36 -0400 (EDT) Received: from [172.16.0.120] (192-222-157-41.qc.cable.ebox.net [192.222.157.41]) by mail.efficios.com (Postfix) with ESMTPSA id C1BFD1E03DD; Fri, 10 May 2019 14:57:36 -0400 (EDT) Subject: Re: [PATCH] Fix GDB build when using --disable-gdbmi To: Tom Tromey Cc: gdb-patches@sourceware.org, Tom de Vries References: <20190510183512.9955-1-simon.marchi@efficios.com> <87a7fu9me8.fsf@tromey.com> From: Simon Marchi Message-ID: <08bf3e6b-11c5-2a90-fb66-d1eced683116@efficios.com> Date: Fri, 10 May 2019 18:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <87a7fu9me8.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-05/txt/msg00261.txt.bz2 On 2019-05-10 2:47 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> To fix it, I added a config.h macro, HAVE_GDBMI, defined if we build > Simon> with GDB/MI support. We can then use it in breakpoint.c to > Simon> conditionally use mi_multi_location_breakpoint_output_fixed. If > Simon> building without GDB/MI, the value of use_fixed_output is not really > Simon> important, as it is only used to fix an issue when printing breakpoints > Simon> in MI. > > I'm not sure if it's better or not, but ui_out has a "flags" feature > that could be applied to this. This would mean not having to have a #if. I don't think this will work (or I don't understand what you suggest). If we do bool use_fixed_output = ui_out->test_flags(ui_out_flag::fixed_breakpoint_output); That would require the mi_ui_out object to be created with that flag. However, this option can be toggled on after the mi_ui_out object has been created (through the MI command -fix-multi-location-breakpoint-output). One way to make it work would be, when the -fix-multi-location-breakpoint-output command is issued, we go through all existing ui_out objects and set that flag. But I don't think there's an easy way of going through all existing ui_out objects. If you have any ideas for a more elegant way to make it work, I would be up for it, because it's true that sprinkling #ifdefs is not the best idea. Simon