From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id FCGNAk/tCGnybx0AWB0awg (envelope-from ) for ; Mon, 03 Nov 2025 12:58:39 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UKfGcOYU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EE4C51E0BC; Mon, 03 Nov 2025 12:58:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 13A621E04C for ; Mon, 03 Nov 2025 12:58:38 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B1383858C20 for ; Mon, 3 Nov 2025 17:58:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B1383858C20 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UKfGcOYU Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 8F72C3858C42 for ; Mon, 3 Nov 2025 17:58:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F72C3858C42 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8F72C3858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762192681; cv=none; b=WQMKOP8qProx/3WDtg5HFOpy3EHyj3W3tD7ryg+4OQBgYkz2oxk1/H0l0MbX6d8iuz9/eZVPQDmx6vr2rbjp5DzH0mOamDNXA5rduoieNG0OJcX368JEKGB1LKwoIT7AQw5AB8kWnxBBB7pbky+A+ZIqvq6YZjYp1tdh8u9pFbc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762192681; c=relaxed/simple; bh=/Lwxu1v191pGqv/0cQBmsDbBj+/JGfC8FPm4bMGdPPg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=li9oNM2rAr39PTRiCN7XS5QG84utJ5HVFopDs2EpH11w8jcEo6uv1lBD5spzxYTTrsK5jetDXsev3o3QHHvrYLheSO4IHTImPSLe6299KfzKhCsdhOwJppTMpM7ZrgX6dKEQ31lPM6oB+KoAIniX7zPVd/xrNCFkg2zf8Z3UIGQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F72C3858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762192681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cNhmUqrZIEYPaXPUL+AOmz6oAl1ThIGpPyyoNwN5D98=; b=UKfGcOYU3zZU+VOs+FDzrhR3TwGjz8+5f/oapnFs8X5VsyYKP1fgQDtEyDOgeCaRpN6nc5 X0tcYvhQPbadblw3rmgcY4/nP/sOmL5EEsLWc2Azjm4bAPIWhEdf1//sUaNXSji+p1B6vy ud2Ur1u26riiZmW8ZoITl1NrpbBSRUc= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-678-0g9MQhpGNNiHwmAoNnp2QA-1; Mon, 03 Nov 2025 12:58:00 -0500 X-MC-Unique: 0g9MQhpGNNiHwmAoNnp2QA-1 X-Mimecast-MFC-AGG-ID: 0g9MQhpGNNiHwmAoNnp2QA_1762192679 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-429c5da68e5so2228580f8f.1 for ; Mon, 03 Nov 2025 09:58:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762192679; x=1762797479; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cNhmUqrZIEYPaXPUL+AOmz6oAl1ThIGpPyyoNwN5D98=; b=D9oJPBubTpGsoCaZ9HsgoWEs2ew5hGRUmKNtZWuASIXrS3nrl7EsllkBtRUqtf4yBy N48sn8arcjL1aQE3FRGIhxSlXT3GclmM76GA3x+XFdd99NeFBfNjNt/43EJ/DBjLcf8I YHHszPPc5IOom/8gpxLzwc9K5cFj8DJ0xEXij67OgBiWIs4wyQse0AGNHo1TUwzsgUox yqFwNEwy75wvcmcQGXpgmRwvsMe8xCM0XW886YG8Ynewp+kAowS+jO3WCHeV4dXd5ONf 0O/CYkMmo+TJyRkCtFcZBNlApBSvLu5JWxVYTzTOg4WkRc4qaCOIutfITu29C/ZpSGHc cneA== X-Forwarded-Encrypted: i=1; AJvYcCU2zRGomZY0ugioA/mmrd0icKESUyfyhGtw1kHG9gSO9l37hqLm8eG6w/nL+RCMal+J8bBf1GrVuQjTFw==@sourceware.org X-Gm-Message-State: AOJu0YzwVuivWUyx322z8ocO2AqYu6ToAEC20yI/ZC0SWFlLXmsT400d GYAK7HrvAmXFJqz1d72wYK21JvFuKPUkgvkITkwMiWtsabqCppsLLfSDtwwuWJ59eR9MeXjA4Vz Bn5/lij1Jba6TkR+WlmoN84ja8U4wTal1iFU32GFn96vbvdumJuhcsnsEmccf99Fmt5iR1sk= X-Gm-Gg: ASbGncsTQTfS1c+Vvn0GZTWOfjtaX33FjYz/KeRbcWuCOqs2EWLUk95McKhdn9mx5pL tBYPLdDpWct2WMCrwUJwywjscMg/2ZNxyORc8OK2TU8Q5bDcArOZUC8n8S9Ivh04pfxlf1BixrA ywTgsXGg0IDZ3Z9PLGKQUkczRASbLHnSOOxxfbWRMoPX0Ryuse9eaMa4jaD/T5fk8zLi7HSQolz wnazVywpwy7yuxK5PNFiYa0XtOCZBBJF5vSFH8y5MvZBrmnkG9v1rMmdlwiMVz2YVop/+p5cCqj BJgD5tkgWHvOZcr2t6MLwHcFMY8zn4J2TpciVhxY6GImrNwwipbzcEK1NvpWPD5bkVVkaQ== X-Received: by 2002:a05:6000:40de:b0:429:b963:cdd5 with SMTP id ffacd0b85a97d-429dbcabefdmr229700f8f.5.1762192678609; Mon, 03 Nov 2025 09:57:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IExs7ClAZONtDQqmycRW6HxcjSCf9QVkHeaIXH75L4gc220mjhVEHgqoKFsOnj6PU7EqcaYdA== X-Received: by 2002:a05:6000:40de:b0:429:b963:cdd5 with SMTP id ffacd0b85a97d-429dbcabefdmr229688f8f.5.1762192678216; Mon, 03 Nov 2025 09:57:58 -0800 (PST) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429dc1f5a7fsm429f8f.24.2025.11.03.09.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Nov 2025 09:57:57 -0800 (PST) From: Andrew Burgess To: "Aktemur, Tankut Baris" , Pedro Alves , "gdb-patches@sourceware.org" Subject: RE: [PATCH] gdb: notify of inferior switch when needed from 'thread' command In-Reply-To: References: <7461a0b8-846a-4969-aeb6-7eac08732037@palves.net> <87plau4xvj.fsf@redhat.com> Date: Mon, 03 Nov 2025 17:57:56 +0000 Message-ID: <87ldkn578b.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UvKPOPpD0kTTawAVF436jE2sfevU9NwT6WObyOWR3u4_1762192679 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org "Aktemur, Tankut Baris" writes: > Hello Andrew, > >> I'd also like to draw you attention to the gdb/mi/* changes in this >> patch as you didn't give your thoughts on that aspect of the change. >> >> That part of the patch handles the case where a user as an MI and CLI >> interpreter running, and the inferior/thread changes as a result of an >> MI action. >> >> In this case, the MI action might be a click, or miss-click in a UI, or >> might even be some automated action by the MI frontend that the user >> didn't (knowingly) perform. In this case, currently, the CLI will >> receive a thread/frame change notification (i.e. the CLI interpreter >> prints the new thread and frame), but the inferior notification is >> missing. My patch changed GDB so the CLI would (when appropriate) also >> receive an inferior changed notification, and so also print a "Switching >> to inferior..." line. >> >> Surely in that case, your "the inferior change is known from the >> command" argument doesn't apply, right? >> >> But then there's a whole argument about consistency. If I change >> inferior and thread via the MI the CLI gets a "Switching to inferior" >> line, but if I do the same switch via the CLI, I wouldn't. Which I >> dislike. > > Something is not clear to me. Suppose there is an internal switch because > of a breakpoint hit. E.g. My selected thread is 2.2. I resume all inferiors. > Thread 1.1 hits a breakpoint. GDB switches. With your patch, the output is > > [Switching to Thread 0x7ffff7d85740 (LWP 1279258)] > > Thread 1.1 "test" hit Breakpoint ... > > Should we have seen a "Switching to inferior 1 ...", too? Just to clarify, this behaviour is unchanged by my patch. But I'd certainly think there's an argument to be made that the message should be printed in this case. For now, I'm just hoping that Pedro might get back to me as I'd like to see the initial patch merged first. Thanks, Andrew