Can't get lldb to read file input

I use lldb as a standalone debugger in OSX. I am trying to debug a C executable using a text file as input. The lldb documentation specifies the following command to change stdin to a given file:

process launch -i <file> 

Using this command, lldb seems to ignore the specified file, instead it waits for keyboard input.

Is this the intended behavior? If so; What do I need to do to actually make the process work with my desired input file?

tl; dr: How do I get lldb to simulate the execution of a standard terminal, for example:

 ./executable < <file> 
+9
c lldb stdin macos
Feb 23 '16 at 16:29
source share
1 answer

I got it to work as follows:

 lldb <executable> (lldb) settings set target.input-path <file> (lldb) process launch 

It solves my problem, but in fact I have no explanation why the method in my question does not work.

+13
Feb 26 '16 at 16:22
source share



All Articles