Skip to content

Instantly share code, notes, and snippets.

@drwilco

drwilco/gist:5702807

Last active Dec 18, 2015
Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

@drwilco 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
You can’t perform that action at this time.