summaryrefslogtreecommitdiff
path: root/src/ToolBox
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2018-03-02 09:54:31 -0800
committerGitHub <noreply@github.com>2018-03-02 09:54:31 -0800
commit47d8420b0c687fb8b2d480d7c40434eb01991e73 (patch)
treebabd672d6c53b34b2e8cec673db1c800fc5917a9 /src/ToolBox
parent7a56e4ed8f8e21f9a73139ed116d83f71cfbe20c (diff)
downloadcoreclr-47d8420b0c687fb8b2d480d7c40434eb01991e73.tar.gz
coreclr-47d8420b0c687fb8b2d480d7c40434eb01991e73.tar.bz2
coreclr-47d8420b0c687fb8b2d480d7c40434eb01991e73.zip
Fix !threads -special spurious error message (#16701)
Fix !threads -special spurious error message Generate portable PDB for SOS.NETCore. Fix issue #16665. Incorrect command names in messages on Linux.
Diffstat (limited to 'src/ToolBox')
-rw-r--r--src/ToolBox/SOS/NETCore/SOS.NETCore.csproj3
-rw-r--r--src/ToolBox/SOS/Strike/strike.cpp16
2 files changed, 12 insertions, 7 deletions
diff --git a/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj b/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj
index ae5660fb78..7cff9d7b6f 100644
--- a/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj
+++ b/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj
@@ -29,11 +29,10 @@
<!-- Configuration specific properties -->
<PropertyGroup Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">
<DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
<DefineConstants>_DEBUG;DEBUG;TRACE;$(DefineConstants)</DefineConstants>
</PropertyGroup>
- <PropertyGroup Condition="'$(OsEnvironment)' == 'Unix'">
+ <PropertyGroup>
<DebugType>portable</DebugType>
</PropertyGroup>
diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
index fbffe0aea6..aaaf39aa43 100644
--- a/src/ToolBox/SOS/Strike/strike.cpp
+++ b/src/ToolBox/SOS/Strike/strike.cpp
@@ -166,8 +166,10 @@ HMODULE g_hInstance = NULL;
#ifdef FEATURE_PAL
#define SOSPrefix ""
+#define SOSThreads "clrthreads"
#else
#define SOSPrefix "!"
+#define SOSThreads "!threads"
#endif
#if defined _X86_ && !defined FEATURE_PAL
@@ -5779,8 +5781,12 @@ HRESULT PrintSpecialThreads()
continue;
}
- TADDR moduleTlsDataAddr = 0;
+ if (tlsArrayAddr == NULL)
+ {
+ continue;
+ }
+ TADDR moduleTlsDataAddr = 0;
if (!SafeReadMemory (tlsArrayAddr + sizeof (void*) * (dwCLRTLSDataIndex & 0xFFFF), &moduleTlsDataAddr, sizeof (void**), NULL))
{
PrintLn("Failed to get Tls expansion slots for thread ", ThreadID(SysId));
@@ -7670,8 +7676,8 @@ DECLARE_API(FindAppDomain)
if (IsDMLEnabled())
DMLOut("<exec cmd=\"!gcroot /d %p\">!gcroot %p</exec>, and if you find a root on a\n", p_Object, p_Object);
else
- ExtOut("!gcroot %p, and if you find a root on a\n", p_Object);
- ExtOut("stack, check the AppDomain of that stack with !threads.\n");
+ ExtOut(SOSPrefix "gcroot %p, and if you find a root on a\n", p_Object);
+ ExtOut("stack, check the AppDomain of that stack with " SOSThreads ".\n");
ExtOut("Note that the Thread could have transitioned between\n");
ExtOut("multiple AppDomains.\n");
}
@@ -9646,7 +9652,7 @@ DECLARE_API(GCRoot)
if (all)
ExtOut("Found %d roots.\n", i);
else
- ExtOut("Found %d unique roots (run '!GCRoot -all' to see all roots).\n", i);
+ ExtOut("Found %d unique roots (run '" SOSPrefix "gcroot -all' to see all roots).\n", i);
return Status;
}
@@ -12348,7 +12354,7 @@ private:
if ((hr = g_clrData->GetTaskByOSThreadID(osID, &pTask)) != S_OK)
{
ExtOut("Unable to walk the managed stack. The current thread is likely not a \n");
- ExtOut("managed thread. You can run !threads to get a list of managed threads in\n");
+ ExtOut("managed thread. You can run " SOSThreads " to get a list of managed threads in\n");
ExtOut("the process\n");
return hr;
}