3
我已提取debugserver
並將其複製到我的越獄iPhone 5S。然後,我在我的Mac上運行LLDB並使用說明here連接它。Hello world命令行LLDB iOS無法解析'main'中的斷點
我複製了一個用C語言編寫的簡單的hello世界程序,並使用SSH/SFTP和chmod將其編譯爲ARM64。
我使用了命令:./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,我可以設置斷點。這是爲什麼?請告知謝謝。
target create --arch arm64 helloworld_full
基本上我忘記了可執行文件的同一副本要調試已在客戶端上加載(又名:
你什麼時候調用target create?因爲當我這樣做時,我越來越:(lldb)過程繼續 錯誤:無效過程 – mientus
@mientus是的,我有完全相同的問題。我一整天都在困擾它。你設法弄清楚了嗎? –
@mientus,從lldb中調用它,並且當你處理繼續錯誤時,你必須重新連接。 – gigasai