开发者

Linux Assembly Debugger

I need a debugger for assembly on Linux. I am extremely surprised by the LACK of debuggers out there for Linux! It should have various features, such as showing the registers and what not. I would use GDB, however it isn't exactly friendly with NASM.

I would rather have the debugger have intel syntax however I can make a sacrifice.

I have tried kdb, gdb/ddd, and ald. Does anyone know o开发者_如何学Gof any else? Don't recommend strace, because I am going beyond syscalls!


I am not sure what exactly you mean when you say that gdb is not friendly with NASM. The thing is that gdb uses AT&T notation for displaying assembler. NASM uses Intel notation. There are a couple of differences, which you can find on Google.

You can configure gdb to display assembler using Intel notation. The command is:

set disassembly-flavor intel

Programs that you've tried, kdb, ddd and friends are all gdb front-ends, i.e. they present you different UI while use gdb as their back-end.

I think your best and perhaps the only reasonable option is gdb. Another option is to write a debugger yourself, but this is quite complicated.

Hope it helps.


Could any of the debuggers listed here help you?


I'm really understand the @Saustin's question because I was looking for a Linux Assembly Debugger too, which means the possibility for create breakpoints, run step by step, see the registers on real time, go back (backtrace) or go forward, see the data in memory, etc,.

The solution is use properly DDD/GDB.

First at all it is the screenshot show how it looks.

Linux Assembly Debugger


It needs some special requirement:

  • When you create the executable file use the special flag -F stabs in nasm like this:

Linux command line:

nasm -f elf -F stabs hello.asm -o hello_stabs.o
ld -m elf_i386 hello_stabs.o -o hello_stabs
  • Then you run your the debug normally like: ddd hello_stabs

  • Enjoy!

The option -F stabs, tells the assembler to include debugging information in the output file. DDD and GDB use the STABS debugging format.


Source and good short tutorial:

The Data Display Debugger (DDD), A Quick Start Guide


If you are familiar with GDB then you may try PEDA extension, for me it mix the commandline experience with GUI

Linux Assembly Debugger

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜