Last active
December 18, 2015 01:19
-
-
Save drwilco/5702807 to your computer and use it in GitHub Desktop.
assembly and lines intermixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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. :)