GNU Debugger Flashcards
How to use GNU Debugger?
gdb <execFilename></execFilename>
GDB command to view the list of functions.
info functions
GDB command to disassemble functions
disas <function></function>
GDB command to switch to Intel Syntax
set disassembly-flavor intel
GDB command to run the executable file in gdb
r [<command></command>]
GDB command to set a breakpoint
b*<function><+offset></function>
GDB command to inspect registers.
info regirster
i r
GDB command to inspect specific registers
i r <register></register>
GDB command to execute next instruction
ni
GDB command to continue until next breakpoint
c
GDB command to examine memory location
x/<number><format><unit> &<variable></variable></unit></format></number>
number of location is usally for array/heaps