SymbolicateCrash 未创建正确的去符号文件

发布于 2024-12-07 07:04:28 字数 953 浏览 0 评论 0原文

我有在客户端计算机上创建的用于构建的 dSYM 文件。客户端在构建中发生崩溃,现在我尝试通过在终端中执行以下简单命令,使用 symbolicatecrash 来消除符号:

symbolicatecrash myapp_iPod-Touch.crash myapp.app.dSYM > test.txt

但它没有创建任何有意义的消除符号文件。它在终端中给出以下错误:

Can't understand the output from otool

然后我在以下链接中找到了解决方案: iPhone SDK 3.0 和 symbolicatecrash 无法相处? 但它仍然没有将确切的内存位置去符号化到导致崩溃的确切代码行。

然后我也尝试了其他一些选择: 以下是另一个选项,但不起作用:

symbolicatecrash.sh -A -v [crashlog-filename] MyApp.dSYM

供参考: http:// apptech.next-munich.com/2010/01/symbolicatecrash.html

帮助我的最佳选择是 atos 命令来获取崩溃的确切代码行号,但我想要系统的symbolicatecrash 来创建转储。

注意:当我在我的机器中创建构建并在我的机器中去符号化(我的机器创建的)构建的崩溃日志时,它会创建完美的转储文件(显示确切的内存位置与导致崩溃的代码行)。

I have the dSYM file for build created on client's machine. Client got a crash in build and now I am trying to de-symbol by use of the symbolicatecrash by the simple following command in terminal:

symbolicatecrash myapp_iPod-Touch.crash myapp.app.dSYM > test.txt

but it's not creating any meaningful de-symboled file. and it's giving the follwoing error in terminal:

Can't understand the output from otool

then I found a solution in following link:
iPhone SDK 3.0 and symbolicatecrash not getting along?
but still it's not de-symbolicating the exact memory location to exact code line responsible for crash.

Then I tried some other options too:
Following is the other option but didn't work:

symbolicatecrash.sh -A -v [crashlog-filename] MyApp.dSYM

For reference: http://apptech.next-munich.com/2010/01/symbolicatecrash.html

The best option that helped me is atos command to get the exact code line number of the crash but I want the systematic symbolicatecrash to create the dump.

NOTE: When I create build in my machine and desymbolicate (the my machine created) build's crash log in my machine it creates perfectly good dump file (show's exact memory location VS code line responsible for crash).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青朷 2024-12-14 07:04:28

如果您有崩溃的 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}"

If you have the DSYM file for the crash then you can use this one:

#!/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}"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文