Has anyone been able to source debug .exe generated with Ml.exe and link.exe with Windbg. I am not able to do it.
And yes I have compiled with /Zi and linked with /DEBUGTYPE:CV and /DEBUG option.
Quote from: madhur_ahuja on December 03, 2010, 08:47:58 AM
Has anyone been able to source debug .exe generated with Ml.exe and link.exe with Windbg. I am not able to do it.
Yes.
See:
(http://www.japheth.de/JWasm/Image9.png)
(color depth was reduced to 16)
Quote
And yes I have compiled with /Zi and linked with /DEBUGTYPE:CV and /DEBUG option.
That's ok. /DEBUGTYPE:CV probably isn't needed.
Thanks, DEBUGTYPE by default is CV, so thats not a culprit.
Did you do something else ? I even set the symbol path and source file path to the location containing my source, pdb files and executables.
Does it matter if you ave x86 or x64 version of WinDbg ? I am running Win 2008 x64 but assembling against 32 bit ml.exe and link.exe
You must have also the windows symbols in C:\WINDOWS\Symbols
They can be downloaded from msdn
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
Are the windows symbols really necessary ? Can I point to the symbol server instead of downloading ?
Quote from: madhur_ahuja on December 03, 2010, 09:19:45 AM
Are the windows symbols really necessary ? Can I point to the symbol server instead of downloading ?
No (the windows symbols aren't necessary) and Yes (point to the symbol server instead of downloading).
However, when starting WinDbg, it will stop somewhere inside kernel. This is a very early point of execution, where dll entry points ("LibMain") aren't executed yet.
To reach the source of your program, you'll have to enter a "G <startsymbol>" in WinDbg's command line. <startsymbol> is the name of the symbol behind the END directive.
Quote
Access to Windows symbol files. If you have access to the Internet while debugging, you can set your debugger's symbol path to point to the Windows symbol server. If you do not have access to the Internet while debugging, you can download symbols in advance from the Microsoft website.
If you choose the internet line you have to add one option to the command line
Quote
-c ".sympath+ SRV*C:\WINDOWS\Symbols*http://msdl.microsoft.com/download/symbols"
It is needed you have them with one or the two soluces
For the Windows symbols, set an environment variable like:
_NT_SYMBOL_PATH=srv*c:\asm\symbols*http://msdl.microsoft.com/download/symbols;cache*c:\asm\symbols
Of course, change c:\asm\symbols to wherever you want them to go.
This lets you keep copies instead of downloading all the time.
Thanks guys, let me try that :U