Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet-dump analyze clrthreads -special #943

Merged
merged 3 commits into from
Mar 24, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions src/SOS/Strike/strike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6888,25 +6888,37 @@ DECLARE_API(Threads)
// We need to support minidumps for this command.
BOOL bMiniDump = IsMiniDumpFile();

if (bMiniDump && bPrintSpecialThreads)
{
Print("Special thread information is not available in mini dumps.\n");
}

EnableDMLHolder dmlHolder(dml);

try
{
Status = PrintThreadsFromThreadStore(bMiniDump, bPrintLiveThreadsOnly);
if (!bMiniDump && bPrintSpecialThreads)
if (bPrintSpecialThreads)
{
#ifdef FEATURE_PAL
Print("\n-special not supported.\n");
#else //FEATURE_PAL
HRESULT Status2 = PrintSpecialThreads();
if (!SUCCEEDED(Status2))
Status = Status2;
#endif //FEATURE_PAL
Print("\n-special not supported.\n");
sdmaclea marked this conversation as resolved.
Show resolved Hide resolved
#else //FEATURE_PAL
BOOL bSupported = true;

if (((g_pRuntime->GetRuntimeConfiguration() != IRuntime::WindowsCore) &&
(g_pRuntime->GetRuntimeConfiguration() != IRuntime::WindowsDesktop)))
{
Print("Special thread information is only supported on Windows targets.\n");
bSupported = false;
}
sdmaclea marked this conversation as resolved.
Show resolved Hide resolved
else if (bMiniDump && bPrintSpecialThreads)
sdmaclea marked this conversation as resolved.
Show resolved Hide resolved
{
Print("Special thread information is not available in mini dumps.\n");
bSupported = false;
}

if (bSupported)
{
HRESULT Status2 = PrintSpecialThreads();
sdmaclea marked this conversation as resolved.
Show resolved Hide resolved
if (!SUCCEEDED(Status2))
Status = Status2;
}
#endif // FEATURE_PAL
}
}
catch (sos::Exception &e)
Expand Down