diff --git a/base-hw/src/core/kernel/thread.cc b/base-hw/src/core/kernel/thread.cc index 20b1fc9f86..404bd7198e 100644 --- a/base-hw/src/core/kernel/thread.cc +++ b/base-hw/src/core/kernel/thread.cc @@ -602,13 +602,13 @@ void Thread::_print_activity_table() for (unsigned id = 0; id < MAX_THREADS; id++) { Thread * const t = Thread::pool()->object(id); if (!t) { continue; } - t->_print_activity(); + t->_print_activity(t == this); } return; } -void Thread::_print_activity() +void Thread::_print_activity(bool const printing_thread) { static Thread * idle = dynamic_cast(cpu_scheduler()->idle()); Genode::printf("\033[33m[%u] %s", pd_id(), pd_label()); @@ -623,7 +623,8 @@ void Thread::_print_activity() Genode::printf("\033[32m init\033[0m"); break; } case SCHEDULED: { - Genode::printf("\033[32m run\033[0m"); + if (!printing_thread) { Genode::printf("\033[32m run\033[0m"); } + else { Genode::printf("\033[32m debug\033[0m"); } break; } case AWAITS_IPC: { _print_activity_when_awaits_ipc(); diff --git a/base-hw/src/core/kernel/thread.h b/base-hw/src/core/kernel/thread.h index b1200dee16..61e60ad277 100644 --- a/base-hw/src/core/kernel/thread.h +++ b/base-hw/src/core/kernel/thread.h @@ -182,8 +182,10 @@ class Kernel::Thread /** * Print the activity of the thread + * + * \param printing_thread wether this thread caused the debugging */ - void _print_activity(); + void _print_activity(bool const printing_thread); /** * Print the activity of the thread when it awaits a message