Linux Assembly Debugger

前端 未结 3 1593
轻奢々
轻奢々 2021-02-07 15:53

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 an

相关标签:
3条回答
  • 2021-02-07 16:20

    Could any of the debuggers listed here help you?

    0 讨论(0)
  • 2021-02-07 16:22

    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.


    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: ffffd 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

    0 讨论(0)
  • 2021-02-07 16:44

    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 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, ffffd 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. Other option is to write debugger your-self, but this is quiet complicated.

    Hope it helps.

    0 讨论(0)
提交回复
热议问题