Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot get mac os x lldb process to read the STDIN

Tags:

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?

like image 804
Ben Avatar asked Apr 25 '15 05:04

Ben


People also ask

How do I run an LLDB program?

Loading a Program into lldb First we need to set the program to debug. As with gdb, you can start lldb and specify the file you wish to debug on the command line: $ lldb /Projects/Sketch/build/Debug/Sketch. app Current executable set to '/Projects/Sketch/build/Debug/Sketch.

What is LLDB in Xcode?

LLDB is a debugging component used in the LLVM project which was developed by the LLVM developer group. Xcode uses the LLDB as the default debugging tool. The full form of LLDB is Low-level debugger. Breakpoints help a developer to stop the execution of the program at any point.

What is LLDB stand for?

LLDB (low-level debugger) is part of LLVM The LLVM compiler (low level virtual machine) creates programming languages. LLDB is Apple's “from the ground up” replacement for GDB. The LLDB debugger is analogous to GDB: (The GNU Project Debugger).


1 Answers

(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.

like image 180
Jim Ingham Avatar answered Oct 11 '22 11:10

Jim Ingham