Luke Stackwalker returns an error on startup, gprof works fine

I am using gprof to profile my C code, but I want to start using a GUI-based Windows application such as Luke Stackwalker. gprof works fine on my binary, but Luc Stackover has some problems:

 Launching executable C:\lshare\POT03\Eclipse\Debug\POTaak3.exe. SymInit: Symbol-SearchPath: ';.;C:\Program Files\Luke Stackwalker;C:\Program Files\Luke Stackwalker;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Pieter' OS-Version: 5.1.2600 (Service Pack 3) 0x100-0x1 C:\lshare\POT03\Eclipse\Debug\POTaak3.exe:POTaak3.exe (00400000), size: 61440, SymType: '-unknown-', PDB: '$Tƒ|' C:\WINDOWS\system32\ntdll.dll:ntdll.dll (7C900000), size: 753664, SymType: '-unknown-', PDB: '©Uƒ|' C:\WINDOWS\system32\kernel32.dll:kernel32.dll (7C7D0000), size: 1048576, SymType: '-unknown-', PDB: '©Uƒ|' C:\WINDOWS\system32\msvcrt.dll:msvcrt.dll (77BE0000), size: 360448, SymType: '-unknown-', PDB: '©Uƒ|' ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 7C90E514) Sorting profile data. Done; 2 samples collected at 1.$ samples/second. 

Who shot who now? What am I doing wrong here? I did not forget to use the -pg flag.

0
c profiling windows luke
source share
2 answers

I understand why you want something other than gprof . Luke Stackwalker takes stack samples, but (the last time I checked) it does not include inclusive% of the wall clock used at the line level of the code. On Linux, you can use lsstack or pstack , and on Windows there should be a similar tool. In your situation, I just rely on the pause button in the IDE to do stackshots .

0
source share

SymType -unknown means that either the program was not compiled with the gcc -g option to generate debug information, or the format of the debug information cannot be recognized by the debughelp microsoft library used by Luke Stackwalker.

Please check that you use the -g option when compiling the program (and do not remove the executable file). Otherwise, it would be nice to know which version of gcc you are using.

0
source share

All Articles