我已经在客户机上创建了用于构建的dSYM文件。客户端在构建时崩溃,现在我正试图通过终端中简单的以下命令使用symbolicatecrash来解开符号:
symbolicatecrash myapp_iPod-Touch.crash myapp.app.dSYM > test.txt但是它没有创建任何有意义的去符号化文件。它在终端中给出了以下错误:
Can't understand the output from otool然后我在下面的链接中找到了一个解决方案:iPhone SDK 3.0 and symbolicatecrash not getting along?,但它仍然没有将确切的内存位置解符号化到导致崩溃的确切代码行。
然后我也尝试了其他一些选项:下面是另一个选项,但不起作用:
symbolicatecrash.sh -A -v [crashlog-filename] MyApp.dSYM参考:http://apptech.next-munich.com/2010/01/symbolicatecrash.html
对我有帮助的最佳选择是使用atos命令来获取崩溃的确切代码行号,但我想要系统的symbolicatecrash来创建转储。
注意:当我在我的机器中创建构建,并在我的机器中解锁(我的机器创建的)构建的崩溃日志时,它创建了非常好的转储文件(显示确切的内存位置与负责崩溃的代码行)。
发布于 2011-09-30 16:47:46
如果你有崩溃的DSYM文件,那么你可以使用这个文件:
#!/bin/bash
if [[ $# < 2 ]]
then
echo "Usage: $0 [-arch <arch> (defaults to whatever is specified in the crashlog- file] <dSYM-file> <crashlog-file>"
exit 1
fi
#Get the architecture either from the params or from the crashlog itself
ARCH_PARAMS=''
if [[ "${1}" == '-arch' ]]
then
ARCH_PARAMS="-arch ${2}"
shift 2
else
ARCHITECTURE=$(cat "${2}" | grep -A1 "Binary Images:" | grep 0x | sed -E -n 's/.*(armv[6-9]).*/\1/p')
if [ -n "${ARCHITECTURE}" ]
then
ARCH_PARAMS="-arch ${ARCHITECTURE}"
else
echo "Couldn't determine architecture based on the crashlog. Please specify it by calling $0 -arch <arch> <dSYM-file> <crashlog-file>"
exit
fi
fi
echo "Assuming architecture:" ${ARCHITECTURE}
#Store the other params
SYMBOL_FILE="${1}"
CRASHLOG="${2}"
#Get the identifier out of the crashlog
IDENTIFIER=$(cat "${CRASHLOG}" | egrep -o "^Identifier:[[:space:]]*.*$" | sed 's/^Identifier:[[:space:]]*\(.*\)$/\1/')
echo "Identifier:" $IDENTIFIER
echo
echo
#Iterate through the crashlog files, find the ones that belong to the $IDENTIFIER, sed the address out of those files, symbolicate them with atos and finally replace them back into those line again. Print all other lines untouched.
while read line
do
SYMBOL=$(echo $line | sed -E -n "s/.*(${IDENTIFIER}[[:space:]]*)(0x[[:alnum:]]*).*/\2/p" | atos -o "${SYMBOL_FILE}/Contents/Resources/DWARF/${IDENTIFIER}" ${ARCH_PARAMS})
if [ -n "$SYMBOL" ]
then
echo $line | sed -E "s/(${IDENTIFIER}[[:space:]]*)(0x[[:alnum:]]*)(.*)/\1\2 ${SYMBOL}/"
else
echo $line
fi
done < "${CRASHLOG}"https://stackoverflow.com/questions/7593665
复制相似问题