From 23dfa8b82ed7ae1194a0ef2308c4ba7ec8dcae23 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 28 Apr 2013 13:52:33 -0400 Subject: [PATCH] Add column to threads list view for stop reason. --- .../gui/team_window/ThreadListView.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp b/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp index a229f855dc..6569fb9efe 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/ThreadListView.cpp @@ -95,7 +95,7 @@ public: virtual int32 CountColumns() const { - return 3; + return 4; } virtual int32 CountRows() const @@ -123,6 +123,14 @@ public: case 2: value.SetTo(thread->Name(), B_VARIANT_DONT_COPY_DATA); return true; + case 3: + { + if (thread->State() != THREAD_STATE_RUNNING) { + value.SetTo(thread->StoppedReasonInfo(), + B_VARIANT_DONT_COPY_DATA); + } + return true; + } default: return false; } @@ -363,6 +371,8 @@ ThreadListView::_Init() B_TRUNCATE_END, B_ALIGN_LEFT)); fThreadsTable->AddColumn(new StringTableColumn(2, "Name", 200, 40, 1000, B_TRUNCATE_END, B_ALIGN_LEFT)); + fThreadsTable->AddColumn(new StringTableColumn(3, "Stop Reason", + 200, 40, 1000, B_TRUNCATE_END, B_ALIGN_LEFT)); fThreadsTable->SetSelectionMode(B_SINGLE_SELECTION_LIST); fThreadsTable->AddTableListener(this);