summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_sleepqueue.c1
-rw-r--r--sys/kern/subr_turnstile.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index 5779fdf1e258..081c737a3406 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -907,6 +907,7 @@ found:
TAILQ_FOREACH(td, &sq->sq_blocked, td_slpq) {
db_printf("\t%p (tid %d, pid %d, \"%s\")\n", td,
td->td_tid, td->td_proc->p_pid,
+ td->td_name[0] != '\0' ? td->td_name :
td->td_proc->p_comm);
}
}
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index dd91b08e2cd0..16562f826a07 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -968,7 +968,8 @@ print_thread(struct thread *td, const char *prefix)
{
db_printf("%s%p (tid %d, pid %d, \"%s\")\n", prefix, td, td->td_tid,
- td->td_proc->p_pid, td->td_proc->p_comm);
+ td->td_proc->p_pid, td->td_name[0] != '\0' ? td->td_name :
+ td->td_proc->p_comm);
}
static void