[x86/Linux][SOS] Fix DumpStack command output on x86 (dotnet/coreclr#14189)
authorKonstantin Baladurin <k.baladurin@partner.samsung.com>
Fri, 29 Sep 2017 14:03:17 +0000 (17:03 +0300)
committerJan Vorlicek <janvorli@microsoft.com>
Fri, 29 Sep 2017 14:03:17 +0000 (16:03 +0200)
On x86 DumpStack command doesn't print symbol information for
caller and callee. This patch fixes it and make output the same
as on AMD64.

Commit migrated from https://github.com/dotnet/coreclr/commit/c8a49ac3abce30092f51e397136098f9cdd9ba5f

src/coreclr/src/ToolBox/SOS/Strike/disasm.cpp

index e141f80..6137031 100644 (file)
@@ -923,7 +923,7 @@ BOOL PrintCallInfo(DWORD_PTR vEBP, DWORD_PTR IP, DumpStackFlag& DSFlag, BOOL bSy
 
             // if AMD64 ever becomes a cross platform target this must be resolved through
             // virtual dispatch rather than conditional compilation
-#ifdef _TARGET_AMD64_ 
+#if defined(_TARGET_AMD64_) || defined(_TARGET_X86_)
             // degrade gracefully for debuggees that don't have a runtime loaded, or a DAC available
             eTargetType ett = ettUnk;
             if (!g_bDacBroken)
@@ -940,7 +940,7 @@ BOOL PrintCallInfo(DWORD_PTR vEBP, DWORD_PTR IP, DumpStackFlag& DSFlag, BOOL bSy
                     methodDesc = finalMDorIP;
                 }
             }
-#endif // _TARGET_AMD64_
+#endif // _TARGET_AMD64_ || _TARGET_X86_
             if (methodDesc == 0) 
             {
                 PrintNativeStack(IP, DSFlag.fSuppressSrcInfo);
@@ -962,14 +962,14 @@ BOOL PrintCallInfo(DWORD_PTR vEBP, DWORD_PTR IP, DumpStackFlag& DSFlag, BOOL bSy
             else if ((name = HelperFuncName(IP)) != NULL) {
                 ExtOut(" (JitHelp: %s)", name);
             }
-#ifdef _TARGET_AMD64_
+#if defined(_TARGET_AMD64_) || defined(_TARGET_X86_)
             else if (ett == ettMD || ett == ettStub)
             {
                 NameForMD_s(methodDesc, g_mdName,mdNameLen);                    
                 DMLOut("%s (stub for %S)", DMLIP(IP), g_mdName);
                 // fallthrough to return
             }
-#endif // _TARGET_AMD64_
+#endif // _TARGET_AMD64_ || _TARGET_X86_
             else
             {
                 DMLOut(DMLIP(IP));