Cannot get mac os x lldb process to read the STDIN

自闭症网瘾萝莉.ら 提交于 2020-01-01 07:32:06

问题


Is it me or lldb for mac os x (replacing gdb) does not allow you to pipe a file into the stdin, to be used by the process being debugged?

reading the instructions there is no reference to it.

I've gone through and installed gnu gdb, but would like to take advantage of what I suppose is improved lldb capability?


回答1:


(lldb) process launch -i <file>

Should do the trick. Note you can't say:

(lldb) run -i <file>

since run is an alias for process launch -- so all its arguments are passed to the process being launched.

There's a general "help" facility that can show you more about all the lldb commands.

(lldb) help process launch

would have shown you this option.



来源:https://stackoverflow.com/questions/29861242/cannot-get-mac-os-x-lldb-process-to-read-the-stdin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!