Using VC2008 Express and the VSrules supplied with the NASM installer, this asm file:
extern _ExitProcess@4
extern _MessageBoxW@16
ExitProcess equ _ExitProcess@4
MessageBox equ _MessageBoxW@16
global main
segment CODE use32 CLASS=CODE align=16
main:
push dword 0
push dword M2
push dword M1
push dword 0
call MessageBox
push dword 0
call ExitProcess
M1: dw "H", "e", "l", "l", "o", " ", "w", "o", "r", "l", "d", 0
M2: dw "M", "e", "s", "s", "a", "g", "e", 0
compiles fine but when I press F10 to step through it, I get a message:
Debugging information for 'test.exe' cannot be found or does not match. Symbols loaded (source information stripped). - and then - There is no source code available for the current location.
I can then opt for disassembly and step through the code in the disassembly pane, and the MessageBox appears as expected, but any breakpoints I set in the source are disabled.
The Debug output directory has a 17K .exe file and a 27K .pdb which is supposed to hold the debug info, but this seems of no use to the debugger. I understand the codeview debug info isn't perfect because Microsoft didn't publish the specs, but I'm still supposed to be able to set breakpoints in the source and hit them, right?
Anything special I need to do to tell the debugger where to find the source file? Or do I need to hack the VS rule/project files to get the debug info right?
Does anybody have a working and debugable VS2008 Express NASM Hello World project?