diff --git a/scanners/thread_scanner.cpp b/scanners/thread_scanner.cpp index 8fddf042e..eb4ef78c6 100644 --- a/scanners/thread_scanner.cpp +++ b/scanners/thread_scanner.cpp @@ -293,9 +293,9 @@ void pesieve::ThreadScanner::printThreadInfo(const pesieve::util::thread_info& t if (threadi.is_extended) { std::cout << std::hex << "\tSysStart: "; printResolvedAddr(threadi.ext.sys_start_addr); - std::cout << "\tState: " << threadi.ext.state; + std::cout << "\tState: [" << ThreadScanReport::translate_thread_state(threadi.ext.state) << "]"; if (threadi.ext.state == Waiting) { - std::cout << " Reason: " << threadi.ext.wait_reason << " Time: " << threadi.ext.wait_time; + std::cout << " Reason: [" << ThreadScanReport::translate_wait_reason(threadi.ext.wait_reason) << "] Time: " << threadi.ext.wait_time; } std::cout << "\n"; } diff --git a/scanners/thread_scanner.h b/scanners/thread_scanner.h index 2a8c1e598..938bc9b31 100644 --- a/scanners/thread_scanner.h +++ b/scanners/thread_scanner.h @@ -17,6 +17,11 @@ namespace pesieve { static const DWORD THREAD_STATE_UNKNOWN = (-1); static const DWORD THREAD_STATE_WAITING = 5; + static std::string translate_thread_state(DWORD thread_state); + static std::string translate_wait_reason(DWORD thread_wait_reason); + + //--- + ThreadScanReport(DWORD _tid) : ModuleScanReport(0, 0), tid(_tid), @@ -71,10 +76,6 @@ namespace pesieve { DWORD thread_wait_reason; DWORD thread_wait_time; AreaEntropyStats stats; - - protected: - static std::string translate_thread_state(DWORD thread_state); - static std::string translate_wait_reason(DWORD thread_wait_reason); }; //! A custom structure keeping a fragment of a thread context