目前 启动应用后 lldb attach -p 再调试, 正常
现在希望尝试 以backboard启动时 attach , image list 失败, 跟其他帖子的教学不太一样
出现error: the target has no associated executable images
不知道是不是环境有什么问题,或者错了什么步骤
需求: 请教backboard启动调试的正确方法/技巧
操作步骤:
第一步: ios backboard 启动应用
iPhone:/Developer/usr/bin root# ./debugserver -x backboard *:1234 /var/containers/Bundle/Application/0600B6A2-AC5C-45E0-95AF-C071D70757EF/Translate.app/Translate
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-360.0.26.1 for arm64.
Listening to port 1234 for a connection from *…
第二步: osx lldb
(lldb) process connect connect://192.168.1.37:1234
Process 969 stopped
thread #1, stop reason = signal SIGSTOP
frame #0: 0x00000001022e9000
→ 0x1022e9000: mov x28, sp
0x1022e9004: and sp, x28, #0xfffffffffffffff0
0x1022e9008: mov x0, #0x0
0x1022e900c: mov x1, #0x0
(lldb) image list -o -f error: the target has no associated executable images
(lldb) b main
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) b ptrace
Breakpoint 2: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations
画面是卡在 Launch Screen
c可以跑起来
c后下断失败,list image 失败
(lldb) b main
Breakpoint 3: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) b ptrace
Breakpoint 4: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) image list
error: the target has no associated executable images
-launch=TYPE (-x TYPE)
Valid values TYPE are:
auto Auto-detect the best launch method to use.
posix Launch the executable using posix_spawn.
fork Launch the executable using fork and exec. (启动失败,这即正常情况吗?)
backboard Launch the executable through BackBoard Services.
frontboard Launch the executable through FrontBoard Services.(这是一般的启动吗?)
iPhone:/Developer/usr/bin root# ./debugserver -x fork *:1234 /var/containers/Bundle/Application/0600B6A2-AC5C-45E0-95AF-C071D70757EF/Translate.app/Translate
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-360.0.26.1 for arm64.
error: failed to launch process ./debugserver: unknown error.
Exiting.
测试了debugserver 不同的launch type
发现以debugserver args 启动的应用都会image list失败 error: the target has no associated executable images