From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by sourceware.org (Postfix) with ESMTPS id 429993858C50 for ; Thu, 31 Mar 2022 09:48:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 429993858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f43.google.com with SMTP id v64-20020a1cac43000000b0038cfd1b3a6dso1382407wme.5 for ; Thu, 31 Mar 2022 02:48:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=5jTt9oS5Iq2LWQeiDj+eO15MgxuEzRlXQNGCnTy+GjI=; b=7WXTeos5N4XoTAEcfoz+pjs8/TS1gz6p6/VKsMCAF0xjXsM0H5Z85qFJ/Qn8643l4h s14m0iXgTBNpgAy0aY5YCsvMCyMd5tnLGTLooiUh9zOldnOKEG+AJCIHVzhOMT5WhHPW jzoj9JsuOlUXjrtZeO1nymenhnU0rxKBkiF7oTa0qEoANSwGG2rrlhTdKJzAvtbUCiI9 llzoxjj1nSoIKMnB0J823Y10vWoa0hHbJ2QNEThcDPtqsvMkiNV2X86dbMZayS2x4nY4 /n/R40dXxxdhkguvEUHuCGpxoxhA6RPlhOA0d5tTgbPnNwEOsjKTsAw3z4JRnUKhrBKS 3i3A== X-Gm-Message-State: AOAM531w9dSnTYKJvezmuJUvAWfOaln0fq29ZZl7TR6s/y56jIQ1pI9k O5qxB7xvJf+HGam0pwS29IA= X-Google-Smtp-Source: ABdhPJzLvo3MwQ+MuVX3WLQFjg1+lJ0olRXWdxVX5RtTZ/c/3rnIwLUw2GqbhywW4lBBgcKodiMSZA== X-Received: by 2002:a05:600c:1f14:b0:38c:946f:6812 with SMTP id bd20-20020a05600c1f1400b0038c946f6812mr4105770wmb.192.1648720101177; Thu, 31 Mar 2022 02:48:21 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id i9-20020a5d5849000000b002058631cfacsm20310216wrf.61.2022.03.31.02.48.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 02:48:19 -0700 (PDT) Message-ID: <72ad3448-0ff0-f36c-d1f3-cc194c0503b8@palves.net> Date: Thu, 31 Mar 2022 10:48:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: GDB 12.0.90 available for testing Content-Language: en-US To: Eli Zaretskii , brobecker@adacore.com Cc: gdb-patches@sourceware.org, Andrew Burgess References: <20220320055815.2A90FA4D6C@takamaka.home> <83sfr4a93r.fsf@gnu.org> <83pmm8a7gn.fsf@gnu.org> <83o81sa6nu.fsf@gnu.org> <83ilrzap07.fsf@gnu.org> <83mth67i8m.fsf@gnu.org> From: Pedro Alves In-Reply-To: <83mth67i8m.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2022 09:48:25 -0000 [Adding Andrew] On 2022-03-31 07:23, Eli Zaretskii via Gdb-patches wrote: >> Date: Sun, 27 Mar 2022 09:27:52 +0300 >> From: Eli Zaretskii via Gdb-patches >> Cc: gdb-patches@sourceware.org >> >>> Date: Sat, 26 Mar 2022 21:51:49 +0300 >>> From: Eli Zaretskii via Gdb-patches >>> Cc: gdb-patches@sourceware.org >>> >>> And yet another issue: if I start GDB with the MI interface: >>> >>> gdb -i=mi PROGRAM >>> >>> then whatever I type at the prompt GDB thinks I typed "g": >>> >>> (gdb) >>> r -Q >>> &"g\n" >>> &"Ambiguous command \"g\": gcore, generate-core-file, goto-bookmark, gr, gu, guile, guile-repl.\n" >>> ^error,msg="Ambiguous command \"g\": gcore, generate-core-file, goto-bookmark, gr, gu, guile, guile-repl." >>> (gdb) >>> >>> As you see, I typed "r -Q", but GDB thinks I typed "g". >> >> This is now a Bugzilla PR 29002. I posted my proposed solution there, >> see >> >> https://sourceware.org/bugzilla/show_bug.cgi?id=29002 > > Ping! The two issues described in this PR are IMO serious and should > be fixed before GDB 12.1 is released. Could someone please respond to > what I wrote there, and propose how to fix this without adversely > affecting GNU/Linux (and possibly other non-Windows platforms)? So from the bugzilla discussion, it sounds like calling setvbuf all the time is a bad idea. So we should call it once for a given stream early on, just once. That sounds reasonable to me. However, the patch you attached in bugzilla doesn't seem to be doing that correctly: 836 if (!done_once && !ISATTY (stream)) 837 { 838 setbuf (stream, NULL); 839 done_once = 1; 840 } 836 841 because that will only do it once for all streams, and we need to do this once per stream.