Created
January 12, 2012 21:32
-
-
Save rgov/1603271 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
ps -Ac -o pid=,command= | grep -v 'launchd' | while read line; do | |
PID=$(echo $line | cut -f 1 -d ' ') | |
CMD=$(echo $line | cut -f 2- -d ' ') | |
cat <<EOF > /tmp/gdbscript | |
attach $PID | |
sharedlibrary update | |
info sharedlibrary | |
detach | |
EOF | |
gdb -batch -n -x /tmp/gdbscript > /tmp/gdboutput 2>/dev/null | |
fgrep 'WebKit.framework' /tmp/gdboutput > /dev/null && echo "$CMD matches." | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment