From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16523 invoked by alias); 14 Aug 2008 21:51:45 -0000 Received: (qmail 16511 invoked by uid 22791); 14 Aug 2008 21:51:43 -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; Thu, 14 Aug 2008 21:51:01 +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 m7ELoN8Q071530 for ; Thu, 14 Aug 2008 21:50:23 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 m7ELoNQR4018290 for ; Thu, 14 Aug 2008 23:50:23 +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 m7ELoMxu023979 for ; Thu, 14 Aug 2008 23:50:22 +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 m7ELoMaw023976; Thu, 14 Aug 2008 23:50:22 +0200 Message-Id: <200808142150.m7ELoMaw023976@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 14 Aug 2008 23:50:22 +0200 Subject: Re: [rfc] Preferred thread event reporting: Linux native target To: pedro@codesourcery.com (Pedro Alves) Date: Thu, 14 Aug 2008 21:51:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <200808142220.34755.pedro@codesourcery.com> from "Pedro Alves" at Aug 14, 2008 10:20:34 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/msg00391.txt.bz2 Pedro Alves wrote: > > -- this is actually simply the currently selected thread > > (i.e. the current value of inferior_ptid). > > Disagreed. inferior_ptid will change if an event happens in > another thread while you're stepping, but the core decides the event > was not a good reason to stop. E.g., thread hopping. Hmm, but if we "thread hop" inferior_ptid should be prefered anyway (to get the internal "thread hop" action over with as quickly as possible), and afterwards we're back to the thread the user is looking at, right? > > The patch below implements this by adding a new member "preferred" to > > "struct lwp_info", setting it according to the value of inferior_ptid > > in linux_nat_resume, and using it (instead of the single-step flag) to > > decide whether to prefer reporting events in this thread. > > I'd prefer to check if an lwp is stepping due to user request, by > checking struct thread_info's data directly, intead of your > "prefered" flag. On the other hand, if the information we need is visible without relying on inferior_ptid, that would be even nicer. > Unfortunatelly, currently, GDB doesn't always correctly clear the > stepping state of all threads when proceeding (clear_proceed_status > only clears the current thread), but I'm addressing that too in the > series, see attached. Great! This is one more thing I wanted to address; thanks for taking care of it ... > For my series to go in, every target much register at least the main > thread in GDB's thread tables, and as it happens, I think AIX > is the only target I don't have covered, or that I know of > no one covering. I can test AIX if necessary. Do you have a patch? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com