【问题标题】:Hello world command line LLDB iOS unable to resolve breakpoint in 'main'Hello world 命令行 LLDB iOS 无法解析“main”中的断点
【发布时间】: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-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 上调试时,我可以设置断点。为什么会这样?请指教谢谢。

【问题讨论】:

    标签: ios jailbreak lldb arm64


    【解决方案1】:

    好的,我实际上是通过在 lldb 客户端上包含文件来得到它的:

    target create --arch arm64 helloworld_full
    

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

    【讨论】:

    • 什么时候调用 target create ?因为当我这样做时,我得到:(lldb)进程继续错误:无效进程
    • @mientus 是的,我也有同样的问题。我整天都在坚持。你想清楚了吗?
    • @mientus,从lldb调用它,当你得到进程继续错误时,你必须重新附加。
    猜你喜欢
    • 1970-01-01
    • 2021-09-17
    • 1970-01-01
    • 1970-01-01
    • 2018-03-14
    • 2016-10-25
    • 1970-01-01
    • 1970-01-01
    • 2014-09-25
    相关资源
    最近更新 更多