4

我的 iOS 程序中有一个 EXC_BAD_ACCESS,我怀疑原因是在我的一个匿名块中,但其中有很多,我需要稍微缩小候选列表。

堆栈跟踪将当前帧显示为__lldb_unnamed_function4866$$ProjectName. 我看不到行号或源文件名。也没有可见的局部变量。调试器显示机器代码指令。这是在后台事件队列上运行的,因此堆栈上的其他任何地方都没有我的代码。

我该如何找出这是什么功能?

4

2 回答 2

0

I came across a similar situation, and while I can't help (yet) with your problem, I think I know a man who can.

Check out http://www.realmacsoftware.com/blog/block-debugging, for an exposition of how to find out a lot more about the evil block in question.

It doesn't help me much, because I'm working from a crash log, but if you're still interested, this is going to give you just about as much as you can get about the unnamed block.

Warning, the above link exposes you to a lot of arcane knowledge, and may make you feel a little inadequate :)

[Editted to add] Not good enough yet?

After searching through disassembly and doing some manual symbolication, I came to the conclusion that the ___lldb_unnamed_function is a red herring.

I followed How to manually symbolicate a crash log with atos, and it pointed the finger at a completely different function, which came from a 3rd party library, and was a very good candidate for the crash reason (killed by angry watchdog with badf00d.)

In the course of this enquiry, I also came across hopper, a great disassembler; I used the demo version to confirm what the suspicious code was doing, so I'm giving them a namecheck.

于 2013-10-28T10:26:47.090 回答
-1

尝试通过单击断点导航器中的加号来设置异常断点cmd + 6如果发现对 iTunes U 上的斯坦福讲座有用,可以了解调试最佳实践的概述

于 2012-09-06T09:25:57.537 回答