Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* New mi commands for threads
@ 2007-03-14 16:17 Denis PILAT
  2007-03-15 21:12 ` Nick Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: Denis PILAT @ 2007-03-14 16:17 UTC (permalink / raw)
  To: gdb-patches

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-19 13:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-14 16:17 New mi commands for threads Denis PILAT
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox