【发布时间】:2014-05-06 06:58:55
【问题描述】:
我已提取debugserver 并将其复制到我越狱的iPhone 5S。然后我在我的 Mac 上运行 LLDB 并使用指令here 连接它。
我使用 SSH/SFTP 复制了一个用 C 语言编写并针对 ARM64 编译的简单 hello world 程序到我的 iPhone 5S 上并对其进行 chmod。
我使用了命令:./debugserver *:1234 helloworld64_full,其中 helloworld64_full 是设备上的可执行文件。
然后我开始连接到 iPhone:platform select remote-ios 和 process connect connect://localhost:1234,连接到:
Process 442 stopped
* thread #1: tid = 0x90ed, 0x0000000120085010 dyld`_dyld_start, stop reason = signal SIGSTOP
frame #0: 0x0000000120085010 dyld`_dyld_start
dyld`_dyld_start:
-> 0x120085010: add x28, sp, 0
0x120085014: and sp, x28, #0xfffffffffffffff0
0x120085018: movz x0, #0
0x12008501c: movz x1, #0
(lldb) b main
但是当我开始设置断点b main。它说:
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
但是当我为 x86-64 重新编译相同的源程序并在我的 mac 上调试时,我可以设置断点。为什么会这样?请指教谢谢。
【问题讨论】: