| 363 | } |
| 364 | |
| 365 | std::wstring CProcessThreadTable::GetSingleThreadInfo(std::shared_ptr<WinSys::ThreadInfo>& info) { |
| 366 | CString text; |
| 367 | CString s; |
| 368 | const auto& tx = GetThreadInfoEx(info.get()); |
| 369 | |
| 370 | s = ThreadStateToString(info->ThreadState); |
| 371 | s += L"\t"; |
| 372 | text += s; |
| 373 | |
| 374 | s.Format(L"%d (0x%05X)", info->Id, info->Id); |
| 375 | s += L"\t"; |
| 376 | text += s; |
| 377 | |
| 378 | s.Format(L"%d (0x%05X)", info->ProcessId, info->ProcessId); |
| 379 | s += L"\t"; |
| 380 | text += s; |
| 381 | |
| 382 | s = info->GetProcessImageName().c_str(); |
| 383 | s += L"\t"; |
| 384 | text += s; |
| 385 | |
| 386 | s = FormatHelper::TimeSpanToString(info->UserTime + info->KernelTime); |
| 387 | s += L"\t"; |
| 388 | text += s; |
| 389 | |
| 390 | s = info->CreateTime < (1LL << 32) ? CString() : FormatHelper::TimeToString(info->CreateTime); |
| 391 | s += L"\t"; |
| 392 | text += s; |
| 393 | |
| 394 | s.Format(L"%d", info->Priority); |
| 395 | s += L"\t"; |
| 396 | text += s; |
| 397 | |
| 398 | s.Format(L"%d", info->BasePriority); |
| 399 | s += L"\t"; |
| 400 | text += s; |
| 401 | |
| 402 | if (info->TebBase != nullptr) { |
| 403 | s.Format(L"0x%p", info->TebBase); |
| 404 | s += L"\t"; |
| 405 | text += s; |
| 406 | } |
| 407 | s = info->ThreadState == WinSys::ThreadState::Waiting ? WaitReasonToString(info->WaitReason) : L""; |
| 408 | s += L"\t"; |
| 409 | text += s; |
| 410 | |
| 411 | if (info->StartAddress) { |
| 412 | s.Format(L"0x%p", info->StartAddress); |
| 413 | s += L"\t"; |
| 414 | text += s; |
| 415 | } |
| 416 | if (info->Win32StartAddress != info->StartAddress) { |
| 417 | s.Format(L"0x%p", info->Win32StartAddress); |
| 418 | s += L"\t"; |
| 419 | text += s; |
| 420 | } |
| 421 | |
| 422 | s.Format(L"0x%p", info->StackBase); |
nothing calls this directly
no test coverage detected