From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15978 invoked by alias); 18 Aug 2008 18:19:12 -0000 Received: (qmail 15970 invoked by uid 22791); 18 Aug 2008 18:19:11 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 18 Aug 2008 18:18:28 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.8/8.13.8) with ESMTP id m7IIIPbT026318 for ; Mon, 18 Aug 2008 18:18:25 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m7IIIPAK4063310 for ; Mon, 18 Aug 2008 20:18:25 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m7IIIOa9008655 for ; Mon, 18 Aug 2008 20:18:24 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m7IIIONg008652; Mon, 18 Aug 2008 20:18:24 +0200 Message-Id: <200808181818.m7IIIONg008652@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 18 Aug 2008 20:18:24 +0200 Subject: Re: [rfc] Preferred thread event reporting: Linux native target To: pedro@codesourcery.com (Pedro Alves) Date: Mon, 18 Aug 2008 18:19:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <200808181815.32875.pedro@codesourcery.com> from "Pedro Alves" at Aug 18, 2008 06:15:32 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2008-08/txt/msg00496.txt.bz2 Pedro Alves wrote: > On Friday 15 August 2008 23:54:31, Pedro Alves wrote: > > > > and afterwards we're back to the thread > > > the user is looking at, right? > > > > Well, in all-stop, there's nothing doing that currently. when > > you switch inferior_ptid (in all-stop mode) to handle a > > possible stop, and then you decide you should not stop, there's > > nothing reverting back to the previous thread. inferior_ptid will > > stay pointing to the last thread you resumed (the hopping thread), > > until you hit another stop event, and context_switch to the thread > > that took it. > > Hmmm, I was just taking another look at this, and, > you may be right here. > > We'd have also have requested a single-step in the thread we > wanted before detecting a need for a thread hop, so, when we > get to eventually handling that original single-step > finishing, we'd context-switch to it again. I guess this > would make your change OK. If not, how does this work then? Yes, that was my thought. We *have* to get inferior_ptid right on platforms with hardware single-step (because linux-nat.c will only hardware step that thread), and therefore we will also get inferior_ptid right on platforms with software single-step (because the code is the same). Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com