ios - Hello world 命令行 LLDB iOS 无法解析 'main' 中的断点

标签 ios jailbreak lldb arm64

我已经提取了 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-iosprocess 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 上调试时,我可以设置断点。为什么会这样?请指教谢谢。

最佳答案

好的,我通过像这样在 lldb 客户端上实际包含文件来获得它:

target create --arch arm64 helloworld_full

基本上我忘记了要调试的可执行文件的相同副本必须加载到客户端(也就是 mac 机器)

关于ios - Hello world 命令行 LLDB iOS 无法解析 'main' 中的断点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22685319/

相关文章:

iphone - 从iPhone上的远程sql表获取数据

ios - Theos实例方法调用

c++ - lldb 可以显示 typedef 的实际类型吗?

llvm - 使用 LLDB 调试 LLVM IR

debugging - LLDB 如何设置当 register == somevalue 时停止的断点?

ios - 如何使用 XIB 编辑 UITableView 上的单元格,就像 Storyboard 一样

ios - UITabbar 在 iOS 10 中拉伸(stretch)但在 11+ 中不拉伸(stretch)

ios - 类型 'Result<String>' 的值没有成员 'error' [Alamofire, Swift 5]

ios - 越狱检查方法,苹果会批准这个吗?

iphone - iOS 应用程序在启动时崩溃