我最近切换到LLDB来调试(并使用)我的C程序。
这是调试可执行文件的常用流程:
lldb <name_of_exec>
run <arguments>
我希望能够像在GDB中一样将shell命令作为参数传递。
F.ex。
run $(python -c "print 'Some sample argument'")
但是,这似乎没有达到预期的效果;该参数仅被视为多个字符串。
我发现run
是process launch -X true --
的缩写。
-X: Set whether to shell expand arguments to the process when launching.
因此,根据文档,应该有效。
发生了什么事?
编辑:
这似乎在Linux上可以正常工作,但在Mac OSX上却不能。