Macos gdb将流解析为参数
执行Macos gdb将流解析为参数,macos,gdb,macos-sierra,Macos,Gdb,Macos Sierra,执行/foo 0 1 2>out.txt时参数0、1和2被传递到foo,stdout被流式传输到out.txt 在gdb中运行时:run01 2>out.txt所有内容都作为参数传递给foo,包括“>”和“out.txt” AFAIK,gdb使用的shell是/bin/bash,gdb版本7.10(来自brew)。运行MacOS Sierra(10.12.2)。在El Capitan(10.11.6)和我们尝试的任何Linux上正确运行 编辑:如果我在El Capitan上添加set start
/foo 0 1 2>out.txt时
参数0、1和2被传递到foo
,stdout被流式传输到out.txt
在gdb中运行时:run01 2>out.txt
所有内容都作为参数传递给foo
,包括“>”和“out.txt”
AFAIK,gdb使用的shell是/bin/bash,gdb版本7.10(来自brew)。运行MacOS Sierra(10.12.2)。在El Capitan(10.11.6)和我们尝试的任何Linux上正确运行
编辑:如果我在El Capitan上添加set startup with shell off
,就会发生这种情况。在El Capitan上设置为,效果良好,但会导致启动过程中程序以未知信号信号终止。
在Sierra上