From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13498 invoked by alias); 14 Mar 2007 16:17:36 -0000 Received: (qmail 13447 invoked by uid 22791); 14 Mar 2007 16:17:30 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-02.spheriq.net (HELO lon-del-02.spheriq.net) (195.46.50.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 Mar 2007 16:17:21 +0000 Received: from lon-out-03.spheriq.net ([195.46.50.131]) by lon-del-02.spheriq.net with ESMTP id l2EGHsoN010032 for ; Wed, 14 Mar 2007 16:17:54 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-03.spheriq.net with ESMTP id l2EGHHgR026241 for ; Wed, 14 Mar 2007 16:17:17 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id l2EGHGeb001736 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Wed, 14 Mar 2007 16:17:17 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 843B9DA43 for ; Wed, 14 Mar 2007 16:17:16 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 55012474DE for ; Wed, 14 Mar 2007 16:17:16 +0000 (GMT) Received: from [164.129.44.95] (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.7.5a-GA) with ESMTP id CJZ21192 (AUTH "denis pilat"); Wed, 14 Mar 2007 17:17:14 +0100 (CET) Message-ID: <45F8200A.3000305@st.com> Date: Wed, 14 Mar 2007 16:17:00 -0000 From: Denis PILAT User-Agent: Thunderbird 1.5.0.10 (X11/20070221) MIME-Version: 1.0 To: gdb-patches Subject: New mi commands for threads Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2007-03/txt/msg00138.txt.bz2 Hi everyone, I'd like to propose an implementation of -thread-info -thread-list-all-threads Before posting patches, I'd like to discuss a little bit. First should I post 2 patches or can I post only one for both ? About -thread-info: ------------------ The only way to get information on a thread is the "info thread" cli command, this one sometimes takes a while to execute since it gets a lot of stuff (we already discusses on performance problem before, I won't bother you with that today) . I propose an implementation of -thread-info which take an optional argument (the thread ID). If not given, we'll get information on the current thread, that could be useful as well. If argument if given ... I'm sure you've figured out. Both of these patch aim at getting rid of CLI command usage into GUI client like Eclipse. Here is an output example of what is implemented: -thread-info 3 ^done,thread-id="3",frame={level="0",addr="0x00aeaaec",func="nanosleep",args=[],from="/lib/tls/libc.so.6"},thread-extra-info="bla bla bla" As you can see I display "extra information" as well. These are not given by -thread-list-ids, and it's a good idea since extra info retrieval could also take a while. About -thread-list-all-threads: ------------------------------- It will display the same for all threads, plus the number of thread and the current thread id. Example: -thread-list-all-threads ^done,thread-list={thread-id="6",frame={level="0",addr="0x007b9939",func="__lll_mutex_lock_wait",args=[],from="/lib/tls/libpthread.so.0"},thread-extra-info="bla bla",thread-id="5",frame={level="0",addr="0x007b9939",func="__lll_mutex_lock_wait",args=[],from="/lib/tls/libpthread.so.0"},thread-extra-info="bla bla",thread-id="4",frame={level="0",addr="0x007b9939",func="__lll_mutex_lock_wait",args=[],from="/lib/tls/libpthread.so.0"},thread-extra-info="bla bla",thread-id="3",frame={level="0",addr="0x007b9939",func="__lll_mutex_lock_wait",args=[],from="/lib/tls/libpthread.so.0"},thread-extra-info="bla bla",thread-id="2",frame={level="0",addr="0x00e80aec",func="nanosleep",args=[],from="/lib/tls/libc.so.6"},thread-extra-info="bla bla",thread-id="1",frame={level="0",func="main",args=[],file="/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/cvs/head/src/gdb/testsuite/gdb.mi/pthreads.c",fullname="/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/cvs/head/src/gdb/testsuite/gdb.mi/pthreads.c",line="87"},line="87",file="/project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/cvs/head/src/gdb/testsuite/gdb.mi/pthreads.c",thread-extra-info="bla bla"},number-of-threads="6",current-thread-id="1" Do you agree the output contains and format ? Waiting for your feedback. Denis