Gets a ThreadInfo for each Thread
| 1018 | |
| 1019 | // Gets a ThreadInfo for each Thread |
| 1020 | static ::Array<Dynamic> GetThreadInfos() |
| 1021 | { |
| 1022 | gMutex.lock(); |
| 1023 | |
| 1024 | // Latch the current thread numbers from the current list of call |
| 1025 | // stacks. |
| 1026 | std::list<int> threadNumbers; |
| 1027 | std::list<DebuggerContext *>::iterator stack_iter = gList.begin(); |
| 1028 | while (stack_iter != gList.end()) { |
| 1029 | DebuggerContext *stack = *stack_iter++; |
| 1030 | threadNumbers.push_back(stack->mThreadNumber); |
| 1031 | } |
| 1032 | |
| 1033 | gMutex.unlock(); |
| 1034 | |
| 1035 | ::Array<Dynamic> ret = Array_obj<Dynamic>::__new(); |
| 1036 | |
| 1037 | // Now get each thread info |
| 1038 | std::list<int>::iterator thread_iter = threadNumbers.begin(); |
| 1039 | while (thread_iter != threadNumbers.end()) |
| 1040 | { |
| 1041 | Dynamic info = GetThreadInfo(*thread_iter++, false); |
| 1042 | if (info != null()) |
| 1043 | ret->push(info); |
| 1044 | } |
| 1045 | |
| 1046 | return ret; |
| 1047 | } |
| 1048 | |
| 1049 | static ::Array<Dynamic> GetStackVariables(int threadNumber, |
| 1050 | int stackFrameNumber, |
no test coverage detected