From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10494 invoked by alias); 19 Jun 2019 16:04:46 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 10472 invoked by uid 89); 19 Jun 2019 16:04:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Jun 2019 16:04:43 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [IPv6:2001:718:2:2901:0:0:0:238]) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id x5JG4b4l051033 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jun 2019 18:04:39 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Received: from [IPv6:2a02:c7d:2fcb:c700:6267:20ff:fee4:3e2c] ([IPv6:2a02:c7d:2fcb:c700:6267:20ff:fee4:3e2c]) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id x5JG4aX3032411 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 19 Jun 2019 18:04:37 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Message-ID: Subject: Re: MI commands with --thread (--frame?) do not preserve user selected thread / frame From: Jan Vrany To: Simon Marchi , gdb@sourceware.org Date: Wed, 19 Jun 2019 16:04:00 -0000 In-Reply-To: <8b3e78c4-fd5d-598e-4dcf-712807102072@simark.ca> References: <5df1c9d79778a5d6703bba442031b5a1bbeda141.camel@fit.cvut.cz> <3b34a5e356a75454b6b7903048c0d62a409673d5.camel@fit.cvut.cz> <8b3e78c4-fd5d-598e-4dcf-712807102072@simark.ca> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00058.txt.bz2 On Wed, 2019-06-19 at 11:54 -0400, Simon Marchi wrote: > On 2019-06-19 11:10 a.m., Jan Vrany wrote: > > On Wed, 2019-06-19 at 11:53 +0100, Jan Vrany wrote: > > > Hi, > > > > > > I was debugging a multithreaded program and realized that using --thread option to > > > verious MI command silently changes user selected thread - here's an example using > > > separate UI and CLI chahhel (tested on commit 6f5601c4d0) > > > > > > > > ... > > > > > > As you can see, there was no `frame`, `thread`, `-select-frame` or `-thread-select` command between > > > first and second info thread / frame commands on CLI, yet the selected thread / frame changed (silently). > > > > > > Is this intended behavior? If so what's the rationale? > > No, this is indeed a known bug: > > https://sourceware.org/bugzilla/show_bug.cgi?id=20684 > Ah, I see. > > > So it seems to work (at least for a simple case, there might be some edge cases I don't recall). I > think that the CLI and MI events about the thread change should not appear though, since the goal is > to make it appear as if there is no user selection changes. I agree, the event should not be emitted. This was just a quick hack whether it'd help in my case. If you think this is an acceptable way of "fixing" it, I'm happy to improve this patch and submit. Jan