从 plCrashReporter 解码 protobuf 数据

发布于 2024-10-06 15:54:45 字数 984 浏览 0 评论 0原文

我正在将 plCrashReporter 集成到我的一个应用中,以添加崩溃报告功能。本质上,如果我检测到崩溃,我会将崩溃报告收集为 NSData...

NSData *crashData;
NSError *error;
crashData = [crashReporter loadPendingCrashReportDataAndReturnError: &error];

crashData 现在包含整个报告。我可以将这个 crashData 推入 PLCrashReport 结构并读出它的参数,但我宁愿将整个 blob 发送到我的服务器并在那里查看它。当我收到数据时,看起来有很多这样的内容:

706c6372 61736801 0a110801 1205342e 322e3118 02209184 82e80412
1b0a1263 6f6d2e73 6d756c65 2e545061 696e4465 76120531 2e362e32
1adb0208 00120618 d4a5f59d 03120618 bda5f59d 03120418 b5b96c12
0618df95 b09d0312 0618938b 9f9a0312 0618f9bb f68d0312 0618cdbc
f68d0312

我没有运气从中得到任何有意义的东西。我尝试过使用 plcrashutil,但没有任何运气...

./plcrashutil conversion --format=iphone example.plcrash 无法解码崩溃日志:无法解码无效的崩溃日志标头

我也尝试使用 Google 的 protobuf 但无法运行它。

我确实有一个 dSYM 文件,但我什至还没有尝试用符号表示它。

我运行的是 Mac OS X 10.6.5。

任何建议将不胜感激。谢谢!

I'm integrating plCrashReporter into one of my apps to add crash reporting functionality. Essentially, if I detect a crash I gather the crash report as NSData...

NSData *crashData;
NSError *error;
crashData = [crashReporter loadPendingCrashReportDataAndReturnError: &error];

crashData now contains the entire report. I can push this crashData into a PLCrashReport struct and read out parameters of it, but I'd rather just send the whole blob to my servers and look at it there. When the data reaches me, it looks like a lot of this:

706c6372 61736801 0a110801 1205342e 322e3118 02209184 82e80412
1b0a1263 6f6d2e73 6d756c65 2e545061 696e4465 76120531 2e362e32
1adb0208 00120618 d4a5f59d 03120618 bda5f59d 03120418 b5b96c12
0618df95 b09d0312 0618938b 9f9a0312 0618f9bb f68d0312 0618cdbc
f68d0312

I haven't had any luck getting anything meaningful out of this. I've tried using the plcrashutil, but haven't had any luck...

./plcrashutil convert --format=iphone example.plcrash
Could not decode crash log: Could not decode invalid crash log header

I also tried using Google's protobuf but was unable to get it running.

I do have a dSYM file but am not even at the point of trying to symbolicate this yet.

I'm running Mac OS X 10.6.5.

Any advice would be greatly, greatly appreciated. Thanks!

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

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

发布评论

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

评论(1

丶情人眼里出诗心の 2024-10-13 15:54:45

解决了这个问题!报告以十六进制形式发送,但将其转换为二进制后可以让您通过 plcrashutil 很好地运行它。这是我的 HexToBinary.cpp 实现。

Got this sorted out! The report gets sent through as hex, but converting it to binary allows you then to nicely run it through plcrashutil. Here is my HexToBinary.cpp implementation.

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