PDA

View Full Version : Linux equivalent to DOS' Debug?



Christmas
October 16th, 2010, 01:32 PM
Hi! I dropped by to ask this: what is the Linux equivalent to the 'Debug' command in DOS, so that I can use commands for some kind of registries, r, mov, xchg etc? (I need it for my classroom as I don't want to install Windows in a virtual machine).

I mention I tried gdb but it doesn't seem to work like that. Reading the man page didn't help me much either.

The Cog
October 16th, 2010, 01:42 PM
Moved to Programming Talk forum. You're more likely to get help there, and won't get buried so quickly.

Christmas
October 16th, 2010, 02:25 PM
OK, hopefully.

The Cog
October 16th, 2010, 04:20 PM
As a thought:

I don't know how to use gdb - the last debugger I used was Borland turbo C. But Borland turbo C is now a free download, I gather, and would probably work in dosbox.

And a quick google found these two references:
http://www.gnu.org/software/ddd/
http://libre.adacore.com/libre/tools/gps/

nvteighen
October 16th, 2010, 08:32 PM
It is gdb. Look at this very good introduction to it (PDF): http://www.cs.umd.edu/~srhuang/teaching/cmsc212/gdb-tutorial-handout.pdf

NathanB
October 17th, 2010, 03:28 AM
It is obvious that a Linux debugger would be of no use to you because you'll likely need access to the DOS interrupt routines.

Your best route is to install a Virtual Machine:
http://www.virtualbox.org/

Then load a DOS environment into it:
http://www.freedos.org/

NathanB
October 17th, 2010, 03:35 AM
P.S. - This will not help you in your class, but if you *do* get the notion to play with a debugger in a Linux environment, check out EDB (Evan's Debugger):

http://freshmeat.net/projects/edebugger

Tutes, Refs, Utils, and other resources available at Linux Assembly:

http://asm.sourceforge.net/

Hope that helps!

Nathan.
http://clax.inspiretomorrow.net/index.html

Christmas
October 18th, 2010, 05:18 PM
Ok guys, thank you all for your replies. I think I will try the FreeDOS option, it was also suggested to me somewhere else too.