需求:lldb调试的时候,失败了,提示error: Failed to connect port,请问这个跟debugserver签名有关么?
**日志:
iPhone:/usr/bin root# debugserver *:1234 -a Wechat
debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
for arm64.
Attaching to process Wechat...
Listening to port 1234 for a connection from *...
(lldb) process connect connect://localhost:1234
error: Failed to connect port
chengzidexiaodupi:~ root# debugserver *:12345 -a WeChat
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-900.3.57..2
for arm64.
Attaching to process WeChat...
Segmentation fault: 11
chengzidexiaodupi:~ root#
chengzidexiaodupi:~ root# debugserver -x posix *:12345 /var/containers/Bundle/Application/8B2AB31F-91AB-4D44-A621-9EF66B1D2602/WeChat.app/WeChat
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-900.3.57..2
for arm64.
error: failed to launch process /usr/bin/debugserver: failed to get the task for process 26466
Exiting.
chengzidexiaodupi:~ root#
换成 auto 之后的显示如下,但是进程是启动的:
chengzidexiaodupi:~ root# debugserver -x auto /var/containers/Bundle/Application/8B2AB31F-91AB-4D44-A621-9EF66B1D2602/WeChat.app/WeChat
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-900.3.57..2
for arm64.
Got a connection, waiting for process information for launching or attaching.
chengzidexiaodupi:~ root# debugserver 127.0.0.1:1111 -a Weibo
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-900.3.57..2
for arm64.
Attaching to process Weibo...
Listening to port 1111 for a connection from 127.0.0.1...
lldb 会出现下面的问题,请问有什么办法解决吗?
(lldb) process connect connect://127.0.0.1:1111
error: Failed to connect port
(lldb)
chengzidexiaodupi:~ root# debugserver 192.168.31.82:12345 -a /var/containers/Bundle/Application/97B08221-76F6-44BE-BB5C-5CAD7B38D854/Weibo.app/Weibo
debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-900.3.57..2
for arm64.
Attaching to process /var/containers/Bundle/Application/97B08221-76F6-44BE-BB5C-5CAD7B38D854/Weibo.app/Weibo...
Listening to port 12345 for a connection from 192.168.31.82...
error: rejecting incoming connection from 192.168.31.181 (expecting 192.168.31.82)
(lldb) process connect connect://192.168.31.82:12345
error: failed to get reply to handshake packet
(lldb)