Closed ZhaoTuan closed 6 years ago
Hi,
I am testing StackWalker in Windows 10 with VS2010 now and found the call stack printing works well in debug mode(Debug_VC2010), the output information is listed as follow.
SymInit: Symbol-SearchPath: '.;C:\app\lib\StackWalker\Main\StackWalker;C:\app\lib\StackWalker\Main\StackWalker\Debug_VC2010;C:\WINDOWS;C:\WINDOWS\system32;SRVC:\websymbolshttp://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 't' OS-Version: 6.2.9200 () 0x100-0x1 C:\app\lib\StackWalker\Main\StackWalker\Debug_VC2010\StackWalker_VC2010.exe:StackWalker_VC2010.exe (00400000), size: 761856 (result: 0), SymType: 'PDB', PDB: 'C:\app\lib\StackWalker\Main\StackWalker\Debug_VC2010\StackWalker.pdb' C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (779E0000), size: 1626112 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 6.2.16299.334 C:\WINDOWS\System32\KERNEL32.DLL:KERNEL32.DLL (76050000), size: 851968 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNEL32.DLL', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\KERNELBASE.dll:KERNELBASE.dll (761A0000), size: 1929216 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNELBASE.dll', fileVersion: 6.2.16299.334 C:\WINDOWS\System32\ADVAPI32.dll:ADVAPI32.dll (75B20000), size: 491520 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ADVAPI32.dll', fileVersion: 6.2.16299.192 C:\WINDOWS\System32\msvcrt.dll:msvcrt.dll (76970000), size: 774144 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\msvcrt.dll', fileVersion: 7.0.16299.125 C:\WINDOWS\System32\sechost.dll:sechost.dll (76570000), size: 274432 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\sechost.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\RPCRT4.dll:RPCRT4.dll (768B0000), size: 778240 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\RPCRT4.dll', fileVersion: 6.2.16299.309 C:\WINDOWS\System32\SspiCli.dll:SspiCli.dll (74400000), size: 131072 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SspiCli.dll', fileVersion: 6.2.16299.192 C:\WINDOWS\System32\CRYPTBASE.dll:CRYPTBASE.dll (743F0000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\CRYPTBASE.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\bcryptPrimitives.dll:bcryptPrimitives.dll (75870000), size: 356352 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\bcryptPrimitives.dll', fileVersion: 6.2.16299.98 C:\WINDOWS\SYSTEM32\VERSION.dll:VERSION.dll (74110000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\VERSION.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\SYSTEM32\dbghelp.dll:dbghelp.dll (74250000), size: 1576960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dbghelp.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\ucrtbase.dll:ucrtbase.dll (76380000), size: 1142784 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ucrtbase.dll', fileVersion: 6.2.16299.248 > c:\app\lib\stackwalker\main\stackwalker\stackwalker.cpp (1045): StackWalker::ShowCallstack c:\app\lib\stackwalker\main\stackwalker\main.cpp (44): Func5 c:\app\lib\stackwalker\main\stackwalker\main.cpp (48): Func4 c:\app\lib\stackwalker\main\stackwalker\main.cpp (52): Func3 c:\app\lib\stackwalker\main\stackwalker\main.cpp (56): Func2 c:\app\lib\stackwalker\main\stackwalker\main.cpp (60): Func1 c:\app\lib\stackwalker\main\stackwalker\main.cpp (65): StackWalkTest c:\app\lib\stackwalker\main\stackwalker\main.cpp (210): main f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (278): __tmainCRTStartup f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (189): mainCRTStartup ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 76068654) 76068654 (KERNEL32): (filename not available): BaseThreadInitThunk ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 77A44B17) 77A44B17 (ntdll): (filename not available): RtlGetAppContainerNamedObjectPath ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 77A44AE7) 77A44AE7 (ntdll): (filename not available): RtlGetAppContainerNamedObjectPath
However, when I switch it to release mode(Release_VC2010), the output lists as follow.
SymInit: Symbol-SearchPath: '.;C:\app\lib\StackWalker\Main\StackWalker;C:\app\lib\StackWalker\Main\StackWalker\Release_VC2010;C:\WINDOWS;C:\WINDOWS\system32;SRVC:\websymbolshttp://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 't' OS-Version: 6.2.9200 () 0x100-0x1 C:\app\lib\StackWalker\Main\StackWalker\Release_VC2010\StackWalker_VC2010.exe:StackWalker_VC2010.exe (00400000), size: 86016 (result: 0), SymType: 'PDB', PDB: 'C:\app\lib\StackWalker\Main\StackWalker\Release_VC2010\StackWalker_VC2010.pdb' C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (779E0000), size: 1626112 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 6.2.16299.334 C:\WINDOWS\System32\KERNEL32.DLL:KERNEL32.DLL (76050000), size: 851968 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNEL32.DLL', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\KERNELBASE.dll:KERNELBASE.dll (761A0000), size: 1929216 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\KERNELBASE.dll', fileVersion: 6.2.16299.334 C:\WINDOWS\System32\ADVAPI32.dll:ADVAPI32.dll (75B20000), size: 491520 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ADVAPI32.dll', fileVersion: 6.2.16299.192 C:\WINDOWS\System32\msvcrt.dll:msvcrt.dll (76970000), size: 774144 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\msvcrt.dll', fileVersion: 7.0.16299.125 C:\WINDOWS\System32\sechost.dll:sechost.dll (76570000), size: 274432 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\sechost.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\RPCRT4.dll:RPCRT4.dll (768B0000), size: 778240 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\RPCRT4.dll', fileVersion: 6.2.16299.309 C:\WINDOWS\System32\SspiCli.dll:SspiCli.dll (74400000), size: 131072 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\SspiCli.dll', fileVersion: 6.2.16299.192 C:\WINDOWS\System32\CRYPTBASE.dll:CRYPTBASE.dll (743F0000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\CRYPTBASE.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\bcryptPrimitives.dll:bcryptPrimitives.dll (75870000), size: 356352 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\bcryptPrimitives.dll', fileVersion: 6.2.16299.98 C:\WINDOWS\SYSTEM32\VERSION.dll:VERSION.dll (74110000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\VERSION.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\SYSTEM32\dbghelp.dll:dbghelp.dll (74250000), size: 1576960 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\dbghelp.dll', fileVersion: 6.2.16299.15 C:\WINDOWS\System32\ucrtbase.dll:ucrtbase.dll (76380000), size: 1142784 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\System32\ucrtbase.dll', fileVersion: 6.2.16299.248 > c:\app\lib\stackwalker\main\stackwalker\stackwalker.cpp (1045): StackWalker::ShowCallstack c:\app\lib\stackwalker\main\stackwalker\main.cpp (209): main f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (278): __tmainCRTStartup ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 76068654) 76068654 (KERNEL32): (filename not available): BaseThreadInitThunk ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 77A44B17) 77A44B17 (ntdll): (filename not available): RtlGetAppContainerNamedObjectPath ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 77A44AE7) 77A44AE7 (ntdll): (filename not available): RtlGetAppContainerNamedObjectPath
Is there any way to handle this issue?
Many thanks.
You can disable optimization ;)
Good idea.
Problem solved and a pull request has been made.
Thanks.
Hi,
I am testing StackWalker in Windows 10 with VS2010 now and found the call stack printing works well in debug mode(Debug_VC2010), the output information is listed as follow.
However, when I switch it to release mode(Release_VC2010), the output lists as follow.
Is there any way to handle this issue?
Many thanks.