Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Denis@snap.net.nz, "PILAT <denis.pilat"@st.com
Cc: Daniel Jacobowitz <drow@false.org>, gdb@sourceware.org
Subject: Re: info thread
Date: Mon, 18 Sep 2006 21:49:00 -0000	[thread overview]
Message-ID: <17679.5055.729126.253019@kahikatea.snap.net.nz> (raw)


> Daniel,

> I'd like your opinion about a feature that we need to implement in gdb. We'd
> like to choose the solution that has the best chance to be accepted and
> integrated in GDB.

This isn't a patch so isn't the gdb mailing list more appropriate?

> As you may know, Eclipse is using "info threads" command to get thread
> Ids. The problem is that some part of this command is not used by Eclipse and
> can take a lot of time to execute when the debugger is remotely connected to
> a board. In our case we have a 100 threads application and the info threads
> takes a lot of time to execute, and in Eclipse this command is run each time
> the user push the "next" button, which leads to a non usable graphical
> interface.  

Some form of event notification would be desirable where GDB tells the
front end that the relevant information has changed (pie in the sky thought,
I have no idea how to implement it).

>            The stack frame information is not used at all by Eclipse and
> removing this part saves 70% of the execution time in our case.  Eclipse used
> the thread list IDs and the extra information which are target specific
> (usually we get thread names in these information but it can be whatever the
> targets puts)

> The solutions we thought are the following:

> Sol 1 - developping a new MI command that gives the above target extra
> information only (ie -thread-list-extra-info) of implementing a
> non-implemented one with a parameter.  I see in the doc that
> -thread-list-all-threads is not specified for instance.

> Then we need to modify Eclipse so that it uses MI command "-thread-list-ids"
> plus this command to get all he needs.  This can be an Eclipse contribution
> as well, I need to ask to Eclipse maintainer as well.

There is only a slot for -thread-list-all-threads and no implementation so I
see no harm in using a new name, especially if your command doesn't list _all_
the info.  I'm not very familiar with debugging threaded applications but I
think the command should be general and not just suited to your requirements.
Also if there is a common usage pattern then I think it would be good if that
information can be obtained with one MI command rather than two/many.  That is
the essence of many of the changes that I have made to MI.

> Sol 2 - a parameter to the "info thread" CLI command that ask gdb to not
> print stack frame information but only thread IDs lists and extra_info.
>  (ie info thread nostackframe)

I think this would be a bad idea because CLI output is for human consumption,
and someone could quite reasonably change the output later and break your
front end.  With MI the intention is to change the output in predictable and
manageable ways.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


             reply	other threads:[~2006-09-18 21:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-18 21:49 Nick Roberts [this message]
2006-09-19 13:16 ` Denis PILAT
2006-09-19 14:23   ` Daniel Jacobowitz
2006-09-19 20:55   ` Nick Roberts
2006-09-19 21:03     ` Daniel Jacobowitz
2006-09-23 19:06       ` Mark Kettenis
2006-09-23 21:59         ` Daniel Jacobowitz
2006-09-25 14:49           ` Denis PILAT
2006-09-25 14:52             ` Daniel Jacobowitz
2006-09-25 18:39           ` Michael Snyder
2006-09-25 15:25 Alain Magloire
2006-09-25 15:31 ` Daniel Jacobowitz
2006-09-25 16:25 Alain Magloire
2006-09-25 17:27 Alain Magloire
2006-09-25 17:36 ` Daniel Jacobowitz
2006-09-27 14:18 ` Denis PILAT
2006-09-28 14:35 Alain Magloire

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=17679.5055.729126.253019@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc="PILAT <denis.pilat"@st.com \
    --cc=Denis@snap.net.nz \
    --cc=drow@false.org \
    --cc=gdb@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