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?
You can do
display/i $pc
and every time GDB stops, it will display the disassembly of the next instruction.
GDB-7.0 also supports set disassemble-next-line on, which will disassemble the entire next line, and give you more of the disassembly context.
GDB-7.0
set disassemble-next-line on