News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MASM32 Debugging

Started by PeterRod, September 18, 2008, 08:18:03 PM

Previous topic - Next topic

PeterRod

Can an ASM source file be debugged in VisualStudio 2005.
I have VS2005 Std Ed which I use for VB.NET applications and a little c++ (I dont like c/c++)
I am putting some time into learning MASM32 with Qeditor and Olly as the debugger.

If I open 'myApp.asm' inVS2005 I get the source listing in its editor.
But I dont get any debug options like 'step into' , run etc

I was wondering if it is possible?

GregL

Yes, it works very well. You need to open the .exe file.  From the command-line, or a batch file, it is devenv /debugexe filename.exe. Remember to do a debug build.





PeterRod

Greg,
Thanks for your help.
I found a way to open an ASM project in VS2005 and to use the full functionality of the VS IDE including its editor , debugger, tools and help on .asm source.
There are no templates for ASM projects in VS (at least none that I could find) so you have to do a workaround.
You would still use ml.exe and link.exe for assembly / linking but no makeit.bat file.
If you are interested I could detail the required steps

I did run into a related issue.
If the include path has spaces in the directory name ml.exe doesn't parse correctly and fails.
I noticed it in the include path. I am sure a similar error occurs in other paths.
It appears to be a ml.exe problem.
Is there a workaround other than the obvious old rule of  'no spaces' in directories?
It would be convenient to avoid that restriction.

Thanks again for the help

Peter

Mirno

Have you tried putting quotes around the string?
As you've noticed spaces are a delimiter between arguments, but a quoted string should work...

Mirno

PeterRod

Hi Mirno,
Yeah I tried quoting the path.
In Project | Properties | Microsoft Macro Assembler | General | Include Paths
If I enter a path that contains spaces I get the following errors whether the path name is quoted or not.

Following is the include path I was trying to reference:

C:\Documents and Settings\PETER\My Documents\Visual Studio 2005\Projects\AsmPgms

I received this error:

Error   1   fatal error A1000: cannot open file : and   MASM   

The ' and ' in the error report comes from  ' and ' in Documents and Settings.


I also tried
"C:\Documents and Settings\PETER\My Documents\Visual Studio 2005\Projects\AsmPgms"

I got the same error report.

BTW has anyone written an assembly language project template for VS2005 ?
seems like the correct solution to this problem and other workaround issues.

PeterRod

What works is:

'C:\Documents and Settings\PETER\My Documents\Visual Studio 2005\Projects\AsmPgms'

a single quoted string not double quoted.

The include statement in the .asm source also needs to have the path fully detailed as above.

Peter

GregL

#6
QuoteI found a way to open an ASM project in VS2005 and to use the full functionality of the VS IDE including its editor , debugger, tools and help on .asm source.

Yes, this works, I have done it. It works the same way in VS2008.

[Edit] There are post on this forum on how to do this.


vikas

I facing the problem of getting error similar to this like:

Assembling: c:\Documents
MASM : fatal error A1000: cannot open file : c:\Documents
Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"

could anybody help me in this concern


thanks in advance

Mark Jones

Quote from: vikas on October 31, 2008, 02:03:06 PM
Assembling: "c:\Documents and something else..."

Perhaps quotes need to be added?
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08