首页 > 解决方案 > 使用输入文件进行 C++ lldb 调试

问题描述

我正在尝试使用 lldb 调试我的程序,因为在输入应该会的特定输入时出现分段错误。我通过文本文件给我的程序输入,通常我写这个命令来运行它:

./program <tests/test1.maze> program.out

如何在仍然传递文件的同时运行调试器?无法找到任何说明如何执行此操作的内容。

标签: c++debugging

解决方案


(lldb) process launch -i <file>

使用 help 命令查看所有可用选项。

(lldb) help process launch

推荐阅读