From NASM to Visusal Studio source debugging



I think I have posted on this years ago but I never found a solution,
and now I'm back with this need...

I have a rather large NASM/Win32 project (an interpreter for a
LISP/Prolog flavoured language).

Presently, I build the stuff using NASM and Borland command
line tools, using a free editor (Context by Eden Kirin) as IDE.
When needed, I debug the assembler source with the old Borland
Turbo Debugger.

I really need to go Visual Studio. I need source level assembler
debugging in Visual Studio 2005, and linking with Visual C++.
I'll do what it takes to get there.

The reason I need the transition is, I need to involve my collegues
in experiments with interfacing with VC code. Visual Studio is
the thing they use. Period. They will get confused and find they
have lots of other things to do if I confront them with Borland
tools. Besides, I have a specific need for experimenting with
..NET interfacing via VC.

What is the simplest/the best way to get it working?

I know NASM (and YASM) can produce the required obj
format (-f win32) but as far as I can tell neither assembler
will deliver debug info with this format.

(Or am I wrong? Is the debug information required for
source level debugging present in the format per se? I
don't think so...)

If there is no other way, I will translate the project to MASM.
I will probably use the NASM preprocessor (the project depends
heavily on nontrivial NASM macros) and then translate the
expanded code to MASM before assembling it.

Does a suitable NASM -> MASM translator exist? (Is it available
for little or no charge?) (If not, I think I can manage to write one; it
needs only cover the expanded NASM stuff I'm actually using.)

Will it be possible to trick VS/MASM into using the line numbers
as of before the NASM preprocessing - so that I can step through
the NASM code, set breakpoints in it etc. in a VS code pane?

(I would prefer to keep the assembler code base in NASM since
I might some day try to make it work with Linux or BSD.)

Ole Nielsby/Remove the slow slimy animal from my reply address


.



Relevant Pages

  • Re: HLA v1.93 is now available
    ... MASM does branch displacement optimization. ... would anyone want to use an assembler that forces *them* to do this ... NASM as a back-end to HLA? ...
    (alt.lang.asm)
  • Re: Video Mode 13h in windows XP ... impossible?
    ... there is NO problem using mode 13h under XP...if you write a DOS ... terminates so does the "DOS box" and you return to the Windows desktop ... A dedicated assembler (most of which are completely free and available ... NASM, this is _certainty_ that it's okay for you to do so...the people ...
    (alt.lang.asm)
  • Re: Why there are so many assemblers.
    ... But *clearly* the discussion of the creation of NASM predated ... >> reasonable facsimile to the Intel assembler. ... that was in mid-1996), MASM was still a commercial product, TASM was a ... I have a problem with Rene Tournois calling it an "Intel Syntax" ...
    (alt.lang.asm)
  • Re: Why there are so many assemblers.
    ... The manual, written much later, may be correct in terms of what NASM became, but that's not the original intent. ... various usenet boards announcing a desire to create an "Intel Syntax" assembler that was free, and portable to Linux. ... The impression I got was that people wanted an "Intel Syntax" assembler for Linux, ... quick that the people actually working on the project didn't have the experience to develop anything remotely similar to MASM, or even a reasonable facsimile to the Intel assembler. ...
    (alt.lang.asm)
  • Re: Best assembler for 8088/8086?
    ... > limited memory), I'm considering writing major portions in assembler, ... > - masm ... TASM to run on that hardware. ... NASM should, but I don't ...
    (comp.lang.asm.x86)