From: Manoj Iyer <manjo@austin.ibm.com>
To: gdb-patches@sources.redhat.com
Subject: [RFC] Print thread id in hex.
Date: Tue, 07 Jun 2005 18:19:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.58.0506071258360.13058@lazy> (raw)
From the earlier discussion sub: "debugging threaded apps. thread ID
missing in corefile." I wrote this patch to print the thread ids in HEX
(%#lx) instead of decimal (%ld).
2005-06-07 Manoj Iyer <manjo@austin.ibm.com>
* linux-thread-db.c (thread_db_pid_to_str): Print thread id in hex.
--------------------------------------------------------------------------
--- ./old/src/gdb/linux-thread-db.c 2005-06-07 12:52:32.000000000 -0500
+++ ./new/src/gdb/linux-thread-db.c 2005-06-07 12:55:11.000000000 -0500
@@ -1211,12 +1211,12 @@ thread_db_pid_to_str (ptid_t ptid)
if (ti_p->ti_state == TD_THR_ACTIVE && ti_p->ti_lid != 0)
{
- snprintf (buf, sizeof (buf), "Thread %ld (LWP %d)",
+ snprintf (buf, sizeof (buf), "Thread %#lx (LWP %d)",
(long) ti_p->ti_tid, ti_p->ti_lid);
}
else
{
- snprintf (buf, sizeof (buf), "Thread %ld (%s)",
+ snprintf (buf, sizeof (buf), "Thread %#lx (%s)",
(long) ti_p->ti_tid,
thread_db_state_str (ti_p->ti_state));
}
Thanks
-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cogito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
next reply other threads:[~2005-06-07 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-07 18:19 Manoj Iyer [this message]
2005-06-13 3:29 ` Daniel Jacobowitz
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=Pine.LNX.4.58.0506071258360.13058@lazy \
--to=manjo@austin.ibm.com \
--cc=gdb-patches@sources.redhat.com \
/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