Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb@sourceware.org
Subject: Re: improved thread id reporting
Date: Sat, 04 Apr 2009 22:24:00 -0000	[thread overview]
Message-ID: <e394668d0904041517x74777a2egc913a9068104209d@mail.gmail.com> (raw)
In-Reply-To: <200904041904.n34J4UXV013513@brahms.sibelius.xs4all.nl>

On Sat, Apr 4, 2009 at 12:04 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Sat,  4 Apr 2009 11:46:04 -0700 (PDT)
>> From: dje@google.com (Doug Evans)
>>
>> Hi.
>>
>> GDB's current reporting of thread ids has (at least) three problems (IMO):
>> 1) Reporting the pthread id (e.g. 0x0xf7e5cbb0) has a very low S/N ratio.
>
> Uh?  I'd say it has a very high S/N ratio; it's the only thing that
> you can actually use to identify a thread to a particular thread
> created by the code you're debugging.

Ok, "very low" is subjective and context dependent.

> Also realize that whatever is printed now between () is OS-specific
> information that varies from OS to OS and may even be completely
> absent in the case of user-level threads libraries.

Realized.

>> 2) When switching to a thread IWBN to also report the thread being switched
>>    from, otherwise one has to scrollback through the session to find it
>>    (assuming that's even possible).
>
> That's not an unreasonable suggestion.
>
>> 3) When reporting thread ids the only usable number in the gdb session
>>    (gdb's internal thread number) is not included.
>
> I don't consider this to be a big issue.  If I need a GDB internal
> thread number, I find it no problem to just use the "info threads"
> command and make decisions based on that.  I'd expect that to be much
> more convenient than scrollback through the session ;)

I've sometimes had to manually search the output of "info threads" and
map from pthread-id/lwp to gdb number when the source of the
pthread-id/lwp was the "[New ...]" or "[Switching ...]" message.
Blech.

> That said, if it's possible to print them without creating additional
> line breaks on an 80-column wide screen, I have no objections.
>
>> To fix (1) I'd like to simply remove the pthread id from the output.
>
> I think that's a bad idea.

Even as a user-settable option?


  parent reply	other threads:[~2009-04-04 22:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04 19:06 Doug Evans
2009-04-04 19:07 ` Mark Kettenis
2009-04-04 20:40   ` Daniel Jacobowitz
2009-04-04 21:21     ` Eli Zaretskii
2009-04-04 22:17       ` Daniel Jacobowitz
2009-04-05  1:11         ` Doug Evans
2009-04-05  3:42         ` Eli Zaretskii
2009-04-05  3:48           ` Daniel Jacobowitz
2009-04-05  7:19           ` Paul Pluzhnikov
2009-04-05 18:50             ` Eli Zaretskii
2009-04-05 20:11               ` Paul Pluzhnikov
2009-04-05 20:36                 ` Eli Zaretskii
2009-04-04 22:35     ` Doug Evans
2009-04-06  2:58     ` Doug Evans
2009-04-06  3:33       ` Eli Zaretskii
2009-04-06 15:36         ` Mark Kettenis
2009-04-06 20:21           ` Eli Zaretskii
2009-04-06  7:39       ` Daniel Jacobowitz
2009-04-06 21:21         ` Eli Zaretskii
2009-05-08  5:43         ` Doug Evans
2009-04-06 20:20       ` Tom Tromey
2009-04-06 20:20         ` Eli Zaretskii
2009-04-06 22:15           ` Tom Tromey
2009-04-07 15:18             ` Doug Evans
2009-04-04 22:24   ` Doug Evans [this message]
2009-04-05  3:13     ` Daniel Jacobowitz
2009-04-05  9:16       ` Mark Kettenis
2009-04-05 18:23         ` Eli Zaretskii
2009-04-05 19:22       ` Doug Evans
2009-04-04 19:20 ` Thiago Jung Bauermann
2009-04-04 19:21   ` Eli Zaretskii

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=e394668d0904041517x74777a2egc913a9068104209d@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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