Fixed a bug in the debugger "thread" command when it was called with no

arguments (which should have taken the dumped thread).
Improved "thread" debug output to have all data values at the same column.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10070 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-11-20 23:58:57 +00:00
parent 515b8e939e
commit 7377137f87

View File

@ -447,10 +447,10 @@ _dump_thread_info(struct thread *t)
{
dprintf("THREAD: %p\n", t);
dprintf("id: 0x%lx\n", t->id);
dprintf("name: '%s'\n", t->name);
dprintf("name: \"%s\"\n", t->name);
dprintf("all_next: %p\nteam_next: %p\nq_next: %p\n",
t->all_next, t->team_next, t->queue_next);
dprintf("priority: 0x%lx\n", t->priority);
dprintf("priority: %ld\n", t->priority);
dprintf("state: %s\n", state_to_text(t, t->state));
dprintf("next_state: %s\n", state_to_text(t, t->next_state));
dprintf("cpu: %p ", t->cpu);
@ -467,7 +467,7 @@ _dump_thread_info(struct thread *t)
dprintf("fault_handler: %p\n", (void *)t->fault_handler);
dprintf("args: %p %p\n", t->args1, t->args2);
dprintf("entry: %p\n", (void *)t->entry);
dprintf("team: %p\n", t->team);
dprintf("team: %p, \"%s\"\n", t->team, t->team->name);
dprintf("exit.sem: 0x%lx\n", t->exit.sem);
dprintf("kernel_stack_area: 0x%lx\n", t->kernel_stack_area);
dprintf("kernel_stack_base: %p\n", (void *)t->kernel_stack_base);
@ -513,7 +513,7 @@ dump_thread_info(int argc, char **argv)
// walk through the thread list, trying to match name or id
hash_open(sThreadHash, &i);
while ((t = hash_next(sThreadHash, &i)) != NULL) {
if ((t->name && strcmp(name, t->name) == 0) || t->id == id) {
if ((name != NULL && !strcmp(name, t->name)) || t->id == id) {
_dump_thread_info(t);
break;
}