summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-11-23 23:07:12 +0000
committerrwatson <rwatson@FreeBSD.org>2004-11-23 23:07:12 +0000
commitc628469f24c0ea0b0148a5ea9d584a2ececf9c68 (patch)
tree23dc7976433a0ac5afc37cc4f303b7c3b2581d07 /sys/ddb
parentb59dbc21230362efd6ec777cc8a70939afd7368a (diff)
downloadFreeBSD-src-c628469f24c0ea0b0148a5ea9d584a2ececf9c68.zip
FreeBSD-src-c628469f24c0ea0b0148a5ea9d584a2ececf9c68.tar.gz
When printing information on the current thread, such as when entering
DDB, also print the pid of the process if present. Since much debugging still centers around processes, having the pid is quite helpful.
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_thread.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/ddb/db_thread.c b/sys/ddb/db_thread.c
index 8994f96..5a8557a 100644
--- a/sys/ddb/db_thread.c
+++ b/sys/ddb/db_thread.c
@@ -41,7 +41,12 @@ __FBSDID("$FreeBSD$");
void
db_print_thread(void)
{
- db_printf("[thread %ld]\n", (long)kdb_thread->td_tid);
+ pid_t pid;
+
+ pid = -1;
+ if (kdb_thread->td_proc != NULL)
+ pid = kdb_thread->td_proc->p_pid;
+ db_printf("[thread pid %d tid %ld ]\n", pid, (long)kdb_thread->td_tid);
}
void
OpenPOWER on IntegriCloud