Show current assembly instruction in GDB

前端 未结 8 1658
一生所求
一生所求 2020-11-30 15:52

I\'m doing some assembly-level debugging in GDB. Is there a way to get GDB to show me the current assembly instruction in the same way that it shows the current source line?

8条回答
  •  悲哀的现实
    2020-11-30 16:36

    GDB Dashboard

    https://github.com/cyrus-and/gdb-dashboard

    This GDB configuration uses the official GDB Python API to show us whatever we want whenever GDB stops after for example next, much like TUI.

    However I have found that this implementation is a more robust and configurable alternative to the built-in GDB TUI mode as explained at: gdb split view with code

    For example, we can configure GDB Dashboard to show disassembly, source, registers and stack with:

    dashboard -layout source assembly registers stack
    

    Here is what it looks like if you enable all available views instead:

    Related questions:

    • Switching to assembly in gdb

提交回复
热议问题