From 8d3256a4adc3df31c6ad996f10bc09c5da7eea39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 6 Oct 2005 08:40:35 +0000 Subject: [PATCH] The "thread" debugger command now also accepts an address for the thread structure. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14308 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/thread.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/thread.c b/src/system/kernel/thread.c index 36fb67d28e..da90b82115 100644 --- a/src/system/kernel/thread.c +++ b/src/system/kernel/thread.c @@ -548,7 +548,7 @@ dump_thread_info(int argc, char **argv) bool found = false; if (argc > 2) { - kprintf("usage: thread [id/name]\n"); + kprintf("usage: thread [id/address/name]\n"); return 0; } @@ -558,6 +558,12 @@ dump_thread_info(int argc, char **argv) } else { name = argv[1]; id = strtoul(argv[1], NULL, 0); + + if (IS_KERNEL_ADDRESS(id)) { + // semi-hack + _dump_thread_info((struct thread *)id); + return 0; + } } // walk through the thread list, trying to match name or id