Created
May 3, 2012 08:39
-
-
Save rednaxelafx/2584416 to your computer and use it in GitHub Desktop.
quick and dirty shell script to decode HotSpot native stack trace
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/sh | |
if [[ -f $1 && -f $2 ]] | |
then | |
for line in `cat $1 | grep -Po '(?<=V \[libjvm\.so\+)0x[\da-f]+(?=\])'` | |
do | |
echo `objdump -C -d --start-address=$line $2 | egrep '>:$' -m 1` | |
done | |
else | |
echo 'usage: <path to hs_err file> <path to libjvm.so>' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BTW, if this script doesn't work out of the box (e.g. on Ubuntu), try changing the first line to
/bin/bash
instead of/bin/sh