Great rundown, thanks Doug! You've discovered a minor glitch in the manual... "-f dbg" *is* compiled into Nasm (didn't used to be... I'm pretty sure). It's useful for debugging Nasm, not your program, so it isn't "interesting", but it is there.
As I said, I think the best thing is to gird up our loins and learn to use gdb. But I've been meaning to get up a list of alternatives. A list of "front ends" to gdb would be good, too. "ddd", I think, and "insight"(?)... more(?). I don't know much about them (I'm a "command line guy", pretty much).
Jeff Owens has got a package of tools...
http://www.linuxasmtools.net/Among many other neat things are two debuggers: "asmbug" is messing up my console right now - I think it's supposed to be run from an xterm, maybe. "minibug" seems to work good - simple to use... more colorful than debug.
I think the gem of Jeff's package is his "asmref". The most "asm friendly" description of the system calls I've seen. Indexed by name, number, type - example code(!!!)... Kernel errors, symbols, structures, signals... it hooks into Nasm documentation - including the instruction set reference from the "old" manual... and another x86 instruction set reference... plus documentation of Jeff's own considerable suite of programs (I'd forgotten "asmsrc" - intended to generate Nasm-compatible source from an executable - must look at that again!). Plus documentation for his library - oh yeah, it includes a library - libraries, I should say - one for X, too!
For some reason, I don't use Jeff's stuff much. I don't know why. So I don't give him as much feedback and encouragement as I should. He's put a lot of work into this, and I don't think too many people are using it. Definitely worth a look! Anyway, to the topic - "minibug" might be a good debugger for beginners.
I frequently use Patrick Alken's "ald" - the assembly language debugger. It is, as the name suggests, asm friendly.
http://ald.sourceforge.net/There's an offshoot of ald, by Terry Loveall, which pastes in some Nasm code to give ald assembly capabilities (whee! just like DEBUG!). Since it seems to have vanished from the web(?)...
http://home.myfairpoint.net/fbkotler/debug-0.0.21.tgz(you may have to hold down left-shift to get that to download, rather than "print" - the latter is not informative!
The last one, I don't recall where I found. Comes from Taiwan. Although the source files are named ".s", they're in Nasm syntax(!). Apparently intended to be a kernel debugger(?), it squawks about a kernel module not being insmod'ed. If I try that, it squawks about wrong version. Changing just the version string, reassembling, and insmod'ing results in a prompt reboot. Obviously, I've got a lot to learn about kernel modules! But if you ignore the error message, it seems to work much like DEBUG. Other interesting program with it... "kernsym" - I don't know what to make of it. Interesting mostly in that it's in Nasm syntax (like Jeff's minibug and asmbug), rather than as something a beginner might want to debug his program...
http://home.myfairpoint.net/fbkotler/debug-0.3.zipThose are the alternatives I can think of. I'd say give "minibug" a shot, if you don't feel like matching wits with gdb...
Best,
Frank