From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26289 invoked by alias); 14 Mar 2008 18:04:51 -0000 Received: (qmail 25366 invoked by uid 22791); 14 Mar 2008 18:04:48 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Mar 2008 18:04:28 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id C7645983B5; Fri, 14 Mar 2008 18:04:26 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id A615B983AA; Fri, 14 Mar 2008 18:04:26 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JaEGY-0008FP-14; Fri, 14 Mar 2008 14:04:26 -0400 Date: Fri, 14 Mar 2008 18:04:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Implement -thread-info. Message-ID: <20080314180425.GA31663@caradoc.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <200802171833.26673.vladimir@codesourcery.com> <20080314150732.GA19288@caradoc.them.org> <20080314151115.GB19288@caradoc.them.org> <200803142003.48178.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803142003.48178.vladimir@codesourcery.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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-03/txt/msg00184.txt.bz2 On Fri, Mar 14, 2008 at 08:03:47PM +0300, Vladimir Prus wrote: > > Oh, one other thing. I went back to look at Denis's patches. He made > > -thread-info without an argument describe the current thread only. > > Doesn't that seem useful, especially before we get notifications > > completely hammered out? I do not see any other MI command that > > reports the current thread. > > > > So that would mean we needed -thread-list-all-threads back again. > > Hmm, I'd rather not. Currently, the current thread is reported by > *stopped, and is not supposed to randomly change -- because the > target is fully stopped while frontend talks with gdb. Therefore, > using -thread-info as a roundabout way to get the current thread > does not really give you anything. > > For non-stop mode, I have long and evil plans that I'll post soon, > but they don't require this either. I find it strange that -thread-info gives information about multiple threads, myself. But this isn't worth arguing about; we'll do it your way. > +@{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)", > + frame=@{addr="0x0804891f",func="foo",args=[@{name="i",value="10"@}], > + file="/tmp/a.c",fullname="/tmp/a.c",line="158"@}@}], If we're adding the level then please update the example. > /* That switch put us at the top of the stack (leaf frame). */ > switch_to_thread (tp->ptid); > - print_stack_frame (get_selected_frame (NULL), 0, LOCATION); > + print_stack_frame (get_selected_frame (NULL), 1, LOCATION); mi_like_p? This will print out the #0 in the CLI too. Otherwise OK. -- Daniel Jacobowitz CodeSourcery