From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13508 invoked by alias); 18 Feb 2008 07:38:33 -0000 Received: (qmail 13498 invoked by uid 22791); 18 Feb 2008 07:38:33 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 18 Feb 2008 07:38:02 +0000 Received: (qmail 1506 invoked from network); 18 Feb 2008 07:38:00 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Feb 2008 07:38:00 -0000 From: Vladimir Prus To: Nick Roberts Subject: Re: [RFA] Implement -thread-info. Date: Mon, 18 Feb 2008 07:38:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: gdb-patches@sources.redhat.com References: <200802171833.26673.vladimir@codesourcery.com> <18361.9433.599580.415136@kahikatea.snap.net.nz> In-Reply-To: <18361.9433.599580.415136@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802181038.04497.vladimir@codesourcery.com> 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-02/txt/msg00283.txt.bz2 On Monday 18 February 2008 09:25:29 Nick Roberts wrote: > > Presently, the MI -thread-info and -thread-list-all-threads > > commands are not implemented, so a frontend wishing to know > > the state of all threads upon stop is required to manually iterate > > over threads, or use CLI. This patch implements -thread-info, > > that prints essentially the same information as 'info thread' in CLI. > > The new command can either print information for all threads, or > > for a specific one provided as argument, making -thread-list-all-threads > > not necessary. > > mi_info_threads is nearly the same function as thread_command. You probably meant info_threads_command? > Can this be > used in a dual way just as -break-list uses breakpoint_1? I don't know -- I actually have no idea what magic makes breakpoint_1 to work both for MI and CLI. Do you happen to know? > Also Denis Pilat has already proposed a patch for -thread-info: > http://sourceware.org/ml/gdb-patches/2007-03/msg00167.html I did not notice that. > > How does your patch compare? (assuming the problem of return type is solved > as has been done for thread_select). It appears that my patch: 1. Does not bother with making non-throwing function, as MI top-level can handle exceptions. 2. Allows to print information about all threads. I don't know what problem of return type you refer to -- can you clarify? - Volodya