Debugging with stdin

General questions regarding the usage of CodeLite
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Debugging with stdin

Post by foxmuldr »

In CodeLite and GDB, how would I debug a process that expects input from stdin as would typically be re-directed from the command line?

Code: Select all

ls -l > myprog
In my case I've captured the output from "ls -l" to file.txt, and would like to do something like...

Code: Select all

ls -l > file.txt
cat file.txt > myprog
...so the results are reproducible over and over during testing. I can write my own code to read from the file rather than stdin, but if there's a way to read stdin that way I'd prefer it.

Ordinarily it would be:

Code: Select all

gdb myprog
run < file.txt
Thank you in advance.

Best regards,
Rick C. Hodgin
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging with stdin

Post by eranif »

You can't do this with codelite

Eran
Make sure you have read the HOW TO POST thread
Post Reply