From: Konstantin Baladurin Date: Fri, 29 Sep 2017 14:03:17 +0000 (+0300) Subject: [x86/Linux][SOS] Fix DumpStack command output on x86 (dotnet/coreclr#14189) X-Git-Tag: submit/tizen/20210909.063632~11030^2~6865 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e2dac21b1b3473217f5358e1e70be4a322a9c3c;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [x86/Linux][SOS] Fix DumpStack command output on x86 (dotnet/coreclr#14189) 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 --- diff --git a/src/coreclr/src/ToolBox/SOS/Strike/disasm.cpp b/src/coreclr/src/ToolBox/SOS/Strike/disasm.cpp index e141f80..6137031 100644 --- a/src/coreclr/src/ToolBox/SOS/Strike/disasm.cpp +++ b/src/coreclr/src/ToolBox/SOS/Strike/disasm.cpp @@ -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));