Skip to content

Instantly share code, notes, and snippets.

@drwilco
Last active December 18, 2015 01:19
Show Gist options
  • Save drwilco/5702807 to your computer and use it in GitHub Desktop.
Save drwilco/5702807 to your computer and use it in GitHub Desktop.
assembly and lines intermixed
objdump -S /usr/sbin/varnishd | awk '/00000000004836f0/ {flag=1;next}
/0000000000483a30/{flag=0} flag {print}' | while read addr asm
do
line=`addr2line -i -e /usr/sbin/varnishd $addr`
if [ "x$line" != "x$last" ]
then
echo "$addr $line"
fi
echo "$asm"
last="$line"
done > foo.txt
@drwilco
Copy link
Author

drwilco commented Jun 5, 2013

Just a quick point: the two addresses in the AWK command are just to delimit which function is being dumped, and this will probably break on more than one fuction. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment