From: Nick Roberts <nickrob@snap.net.nz>
To: Denis PILAT <denis.pilat@st.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: New mi commands for threads
Date: Thu, 15 Mar 2007 21:12:00 -0000 [thread overview]
Message-ID: <17913.46746.760751.573314@kahikatea.snap.net.nz> (raw)
In-Reply-To: <45F8200A.3000305@st.com>
> 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
next prev parent reply other threads:[~2007-03-15 21:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-14 16:17 Denis PILAT
2007-03-15 21:12 ` Nick Roberts [this message]
2007-03-16 8:40 ` Denis PILAT
2007-03-16 23:43 ` Nick Roberts
2007-03-19 13:45 ` Denis PILAT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17913.46746.760751.573314@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=denis.pilat@st.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox