From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123477 invoked by alias); 17 Aug 2016 20:24:35 -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 123467 invoked by uid 89); 17 Aug 2016 20:24:34 -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,SPF_PASS autolearn=ham version=3.3.2 spammy=extending, Yeah, spots, scope X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 Aug 2016 20:24:24 +0000 Received: from EUSAAHC001.ericsson.se (Unknown_Domain [147.117.188.75]) by (Symantec Mail Security) with SMTP id C1.8F.02568.1E8C4B75; Wed, 17 Aug 2016 22:28:17 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.77) with Microsoft SMTP Server id 14.3.301.0; Wed, 17 Aug 2016 16:20:21 -0400 Subject: Re: [PATCH 1/2] mi: Restore original thread/frame when specifying --thread or --thread-group To: Pedro Alves , References: <20160801211401.18155-1-simon.marchi@ericsson.com> <20160801211401.18155-2-simon.marchi@ericsson.com> <155e8052-19b5-a446-c9bd-f973ded3eaa3@ericsson.com> <83adec9c-d7a1-3165-eac7-236372e994ef@redhat.com> <9a530702-6889-0d20-0a20-fcbce3cd57e2@ericsson.com> <87789b60-69ed-c685-8058-15be519258eb@ericsson.com> From: Simon Marchi Message-ID: <0d7f095b-caf7-27c8-e3bc-efb3229845fb@ericsson.com> Date: Wed, 17 Aug 2016 20:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <87789b60-69ed-c685-8058-15be519258eb@ericsson.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00176.txt.bz2 On 16-08-05 04:58 PM, Simon Marchi wrote: > On 16-08-05 01:26 PM, Pedro Alves wrote: >> Yeah. The approach of extending the previous_inferior_ptid's scope a bit would >> avoid this, since it wouldn't need to revert back anything with a cleanup. >> Might end up being that once all the spots are identified, switching to >> the other approach ends up being a simpler patch. > > Hmm maybe. I'll try to continue on that path and see what it gives. I really feel > like I don't know what I am doing, but I'll try anyway, that's how we learn I suppose :). Given the timeframe, I don't think it's realistic nor a good idea to push to get this into 7.12. Unless there's an obvious way to do it that I missed, the changes are quite big and risky so close to the release. Here's my work-in-progress branch in case you'd like to take a high level look. https://github.com/simark/binutils-gdb/commits/user-selected-ptid It's not all pretty, but I got the testsuite to pass (at least with native x86 Linux, I haven't tried with remote yet...). The "user_selection" object keeps the currently selected inferior and thread, but not the frame yet. That means that if you are inspecting an arbitrary frame and there's an MI command with --thread, the inferior/thread will be kept, but not your frame.