Added "Wait type" and "Priority" columns to thread list

This commit is contained in:
Kingcom committed 2013-07-06 21:40:41 +02:00
1 parent 8988d697e3
commit 82c242f237
3 files changed
+60 -3

No files matched your search

+9 -3
View File
@@ -4,14 +4,14 @@
#include <commctrl.h>
#include "DebuggerShared.h"
enum { TL_NAME, TL_PROGRAMCOUNTER, TL_ENTRYPOINT, TL_STATE, TL_COLUMNCOUNT };
enum { TL_NAME, TL_PROGRAMCOUNTER, TL_ENTRYPOINT, TL_PRIORITY, TL_STATE, TL_WAITTYPE, TL_COLUMNCOUNT };
char* threadColumns[] = {
"Name", "PC", "Entry Point", "State"
"Name", "PC", "Entry Point", "Priority","State", "Wait type"
};
const float threadColumnSizes[] = {
0.25f, 0.25f, 0.25f, 0.25f
0.20f, 0.15f, 0.15f, 0.15f, 0.15f, 0.20f
};
void CtrlThreadList::setDialogItem(HWND hwnd)
@@ -126,6 +126,9 @@ void CtrlThreadList::handleNotify(LPARAM lParam)
case TL_ENTRYPOINT:
sprintf(stringBuffer,"0x%08X",threads[index].entrypoint);
break;
case TL_PRIORITY:
sprintf(stringBuffer,"%d",threads[index].priority);
break;
case TL_STATE:
switch (threads[index].status)
{
@@ -155,6 +158,9 @@ void CtrlThreadList::handleNotify(LPARAM lParam)
break;
}
break;
case TL_WAITTYPE:
strcpy(stringBuffer,getWaitTypeName(threads[index].waitType));
break;
}
if (stringBuffer[0] == 0) strcat(stringBuffer,"Invalid");