From 2b7a67e7aaeb0c7139345af6a28727dd3ffbe78c Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 22 Apr 2013 21:09:52 -0400 Subject: [PATCH] Fix #9700. - CLI "threads" command now outputs the exception reason for stopped threads, if available. --- .../debugger/user_interface/cli/CliThreadsCommand.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/user_interface/cli/CliThreadsCommand.cpp b/src/apps/debugger/user_interface/cli/CliThreadsCommand.cpp index 6bb84f3a87..8387b4941b 100644 --- a/src/apps/debugger/user_interface/cli/CliThreadsCommand.cpp +++ b/src/apps/debugger/user_interface/cli/CliThreadsCommand.cpp @@ -38,7 +38,14 @@ CliThreadsCommand::Execute(int argc, const char* const* argv, Thread* thread = it.Next();) { const char* stateString = UiUtils::ThreadStateToString( thread->State(), thread->StoppedReason()); - printf("%10" B_PRId32 " %-9s \"%s\"\n", thread->ID(), stateString, + printf("%10" B_PRId32 " %-9s \"%s\"", thread->ID(), stateString, thread->Name()); + + const BString& stoppedReason = thread->StoppedReasonInfo(); + if (thread->State() == THREAD_STATE_STOPPED + && !stoppedReason.IsEmpty()) { + printf(" (Reason: \"%s\")", stoppedReason.String()); + } + printf("\n"); } }