summaryrefslogtreecommitdiff
path: root/ddb
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-06-09 15:15:58 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-06-11 10:33:54 +0200
commit1d1a672bcac7b36ff35e48fb9633d56c8e733343 (patch)
tree22980362d624d168e7dd1530c0eab7f321508282 /ddb
parente4b4e64ba7d2679df6508f27ce75d90cba7f5cb5 (diff)
ddb: print task names if available
* ddb/db_print.c (db_print_task): Print task name if available. * i386/i386/db_interface.c (db_task_name): Likewise. * i386/i386/db_machdep.h (DB_GNUMACH_TASK_NAME): Remove unused definition.
Diffstat (limited to 'ddb')
-rw-r--r--ddb/db_print.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ddb/db_print.c b/ddb/db_print.c
index c015d84..1cbff64 100644
--- a/ddb/db_print.c
+++ b/ddb/db_print.c
@@ -258,7 +258,12 @@ db_print_task(
} else {
if (flag & OPTION_TASK_TITLE)
db_printf(" TASK THREADS\n");
- db_printf("%3d (%0*X): ", task_id, 2*sizeof(vm_offset_t), task);
+ if (task->name[0])
+ db_printf("%3d %s (%0*X): ", task_id, task->name,
+ 2*sizeof(vm_offset_t), task);
+ else
+ db_printf("%3d (%0*X): ", task_id,
+ 2*sizeof(vm_offset_t), task);
if (task->thread_count == 0) {
db_printf("no threads\n");
} else {