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
-
会要求输入密码, 请求授权, 最终执行包装后的
target
Process 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