Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 of any else? Don't recommend strace, because I am going beyond syscalls!

like image 432
Saustin Avatar asked Apr 23 '11 00:04

Saustin


People also ask

How do I debug an assembly file?

You start debugging by clicking Start Debugging on the Debug menu. On the Start Debugging dialog box, check Enable Assembler debugging, then click OK. If you debug the module again during the same session, you can start it by clicking Start Debugging, Run or Debug.

Can you use gdb on assembly?

gdb is the GNU source-level debugger that is standard on linux (and many other unix) systems. It can be used both for programs written in high-level languages like C and C++ and for assembly code programs; this document concentrates on the latter.

What is assembly debugger?

The debugger automatically displays the contents of memory locations and registers as they are accessed and displays the address of the program counter. This display makes assembly debugging a valuable tool that you can use together with source debugging.


1 Answers

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.

like image 115
Alexander Sandler Avatar answered Sep 17 '22 13:09

Alexander Sandler