C/C++ / Assembly debugger

Started by
2 comments, last by En3my 19 years, 10 months ago
Hi, I have been reading about x86 assembly language for a few days now and now I would like to find a free C or C++ compiler / debugger that would let me examine the compiled code. I would like to look at the assembly code / machine-code during run-time and watch the CPU register and memory as well. Anyone that can recommend a good compiler / debugger for this purpose? I am running Windows XP and DOS. I am planning to install Linux in a couple of days too, so programs for Linux would be good too. Thanks for sharing your knowledge!
Advertisement
Dev C++ can let you see the asm code in debug but it's not very convenient because the step by step command follows the source code lines, not the the asm lines, even when the asm Window has the focus. So you jump many lines of asm at once usually. You can also see the registers but for the same reason that's not very useful.

More generally it's probably more convenient to generate an asm output file. Thus you can compare the source and output files side by side in your favorite IDE.

The free Visual C++ compiler lets you output an asm file. But you must launch it with command lines or batches or setup your IDE to use it. Look at the command lines, you can easilly output a .asm file. Else, as far as I know it's not that easy to make it work with free debuggers or even Visual C++ 6.0 if you have it.

There is GCC and for instance DevCpp for Windows 'bundled' with mingwin. Tip : you must overload the build command with another call to gcc (or g++) -S and fverbose-asm. For some obscure reason DevCpp (or gcc) bugs if you try to output both a .o and a .s. Probably due to the way DevCpp generates Makefile.win

If you are interested in mixing asm and C/C++ then gcc is the best by far though it's a bit complex to handle.

The is also Borland but I have not tested it yet. It's quite outdated as far as I know. And Watcom ?


[edited by - Charles B on June 4, 2004 7:04:48 AM]
"Coding math tricks in asm is more fun than Java"
Lcc Win32 has an excellent debugger.. Small downloadable size too, and a nice IDE thrown in..

Lcc Win32

"For every complex problem there is an answer that is clear, simple, and wrong." H L Mencken
I''m using the DEBUG utility from DOS. It works pretty well, except that sometimes it gets confused and displays the wrong instruction.

This topic is closed to new replies.

Advertisement