From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1416 invoked by alias); 15 Mar 2007 21:12:09 -0000 Received: (qmail 1406 invoked by uid 22791); 15 Mar 2007 21:12:07 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 Mar 2007 21:12:01 +0000 Received: from kahikatea.snap.net.nz (164.61.255.123.dynamic.snap.net.nz [123.255.61.164]) by viper.snap.net.nz (Postfix) with ESMTP id 5A0653DA2F9; Fri, 16 Mar 2007 10:11:57 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id CF7534F73F; Fri, 16 Mar 2007 10:11:55 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17913.46746.760751.573314@kahikatea.snap.net.nz> Date: Thu, 15 Mar 2007 21:12:00 -0000 To: Denis PILAT Cc: gdb-patches Subject: Re: New mi commands for threads In-Reply-To: <45F8200A.3000305@st.com> References: <45F8200A.3000305@st.com> X-Mailer: VM 7.19 under Emacs 22.0.95.4 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/msg00144.txt.bz2 > 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 ? I think it's best to keep the patches separate unless the code changes overlap. > 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" I would put number-of-threads="6",current-thread-id="1" at the start so that they don't get lost behind the thread list (I know the output is only intended for the front end but it might make debugging of GDB easier and costs nothing). Lists use square brackets, information on each thread should be enclosed in curly brackets: threads=[{thread-id="6",frame={...},thread-extra-info="bla"},{thread-id="5",frame={...},thread-extra-info="bla"},...] I guess your output has been manually generated as thread-id="1" seems to duplicate some information. I thought that the frame information was expensive to get and that it was agreed you could get it, if needed, using other MI commands anyway. -- Nick http://www.inet.net.nz/~nickrob