AsmTools comes with two debuggers (Asmbug,
MiniBug),but other debuggers can be used. The Linux
world has a large number of debuggers and a few
support assembler. Most are structured for a high
level language (such as C) and the general purpose
debuggers can be awkward on assembler.

Here are some of the choices available:

AsmBug - AsmTools terminal debugger
MiniBug - AsmTools console debugger
insight - Debugger from Red Hat
kdbg - KDE debugger
debug - Command line debugger
debugger - GTK style debugger
gdb - GNU general purpose debugger
ald - simple command line debugger
ddd - data display debugger




AsmBug

AsmBug runs in a x-terminal and is optimized for
assembler. It has many features and has a very fast
mouse interface. This is the debugger used to test
AsmTools. The display uses two windows. One shows
debugger information, and the other shows output from
the program under test.




MiniBug

MiniBug is a simple debugger that is optimized for the
console. Like AsmBug it uses two windows but it does
not have a mouse interface. All commands are single
letters or key presses.




Insight


The "insight" debugger can be configured using many
separate windows. It support several languages and
is a huge program.

The insight debugger is hosted and supported by Red
Hat. It requires x-wndows and displays the source code
as debugging proceeds. It is based on gdb and will
show registers, memory, and raw instructions. As will
all gdb debuggers the display of memory is not ideal.
Also, it can be difficult to install.

http://sources.redhat.com/insight




kdbg

The kdbg debugger is another large debugger used to
debug KDE. It is also in active development and is based
on gdb. It requires x-windows for operation and is
like the insight debugger. It isn't ideal for assembler.

http://members.nextra.at/johsixt/kdbg.html






Debug

Terry Loveall wrote a command line debugger called
debug that is like old DOS debuggers. It works well
and has some support for symbols. Since it
works with raw executables and the console it is
very dependable.

http://modest-proposal/Furball.htm




debugger

"debugger" is a GTK style debugger that has appeared
recently. I have not been able to compile it, so no
opinion is offered.





gdb

gdb is a general command line debugger. It works best
if source code is available and acts as a engine for
other debuggers. Both kdbg and insight call gdb. Many
people like this debugger, but I find it very tedious
to use.




ald

ald is a command line debugger that supports
assembler. This is a very basic and dependable
debugger. Since it involves a lot of typing to do
simple operations, the debugging scession tends to be
very slow.




ddd

ddd is optimized for "C" code but can be used with
assembler. Showing the register window has been a
problem, because it does not stay on the display.




To use any of the debuggers it is helpful if the
assembler supports symbolic debugging. Some
possible choices are:


nasm, gas, yasm.


For nasm it is best to enable the elf format and
debug mode with:


nasm -f elf -g ......


With gas you have a number of choices, including the
intel syntax, debugging info, and more. The yasm
assembler is like nasm with a few differences. None of
the assemblers or debuggers handle assembly data
structures very well. Structures are difficult to
access and even nasm does not allow filling in a
series of structures with data. The only alternative
is to view data as hex/decimal bytes/words/dwords.
kdbg has limited display of labels with the data but
it is marginal. The insight and kdbg debuggers share
some of the quirks of gdb. Both look for a start label
of _start or main and try to set a breakpoint there
initially. For some reason this breakpoint does not
work. The soluttion to these problems is to put the
labels _start and main at the top of all programs and
set a initial breakpont at one instruction beyond the
labels.


Another quirk is that all debuggers based upon GDB
can not single step a program until the run button has
been pressed once. Also all debuggers are a little
awkward at passing parameters to programs. With
insight it is the --args parameter and with kdbg it is
a menu item.






Fork me on GitHub