lldb运行可执行文件 - ShenYj/ShenYj.github.io GitHub Wiki
-
进入
lldb环境, 在终端内输入lldb回车lldb
-
使用
file命令, 将可执行文件包装成一个target(lldb) file test Current executable set to '/Users/shenyj/Documents/CodeForTest/staticOCLib/test' (x86_64).
-
运行可执行文件, 在刚刚的
lldb环境下继续执行r命令(lldb) r
-
会要求输入密码, 请求授权, 最终执行包装后的
targetProcess 43324 launched: '/Users/shenyj/Documents/CodeForTest/staticOCLib/test' (x86_64) 2021-01-25 09:11:22.903357+0800 test[43324:1458614] __TestExample 2021-01-25 09:11:22.903693+0800 test[43324:1458614] testApp ------ Process 43324 exited with status = 0 (0x00000000) (lldb) -
退出
在
lldb环境下通过q回车即可退出lldb环境(lldb) q