This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC] Print thread id in hex.
- From: Manoj Iyer <manjo at austin dot ibm dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 7 Jun 2005 13:10:36 -0500 (CDT)
- Subject: [RFC] Print thread id in hex.
>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 +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++