Skip to content

Instantly share code, notes, and snippets.

@thomaspatzke
Created February 10, 2014 16:32
Show Gist options
  • Save thomaspatzke/8919230 to your computer and use it in GitHub Desktop.
Save thomaspatzke/8919230 to your computer and use it in GitHub Desktop.
Search all memory sections from a core dump for a particular string
readelf -l core | perl -ne 'if (/^\s*LOAD\s+\S+\s+(\S+)\s+\S+\s+(\S+)/) { print "printf \"=== $1 ===\\n\"\nfind $1, +$2, \"Search\"\n" }' > searchmem.gdb
gdb executable core < searchmem.gdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment