Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Denis PILAT <denis.pilat@st.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: New mi commands for threads
Date: Wed, 14 Mar 2007 16:17:00 -0000	[thread overview]
Message-ID: <45F8200A.3000305@st.com> (raw)

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



             reply	other threads:[~2007-03-14 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 16:17 Denis PILAT [this message]
2007-03-15 21:12 ` Nick Roberts
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=45F8200A.3000305@st.com \
    --to=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