baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

gdb cheat sheet

This is just a small list i’ve collected for myself. Not meant to be complete …

set disassembly-flavor intel …. obligatory life saver 😉

x/100bs $rsp ……. ASCII dump stack (byte-wise)
x/100ws $rsp ……. ASCII dump stack (lower word-bytes only)
x/80x $rsp ………. HEX dump stack
x/80xb 0x7fffffffd880 ….. HEX dump memory address

xxd from http://stackoverflow.com/questions/9233095/memory-dump-formatted-like-xxd-from-gdb:

disas …. disassemble
r …….. run
b 10 …. set breakpoint on line 10
b *0x000000000040021e …. set breakpoint at address

info reg … show registers
info b ….. show breakpoints

file blabla.bin …. load file

Comments are currently closed.