Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tjw09003

macrumors newbie
Original poster
Feb 11, 2010
13
0
In terminal I'de execute my program like this:

echo "/avr/prj/test" | ./buildconvupload

But my program fails if I pipe an input into it. It works perfectly if I run it normally: ./buildconvupload

How can I simulate a pipe input in gdb so I can debug this program?

I thought this might work, but it doesn't(wild guess, wasn't expecting it to work):

(gdb) echo "/avr/prj" | run
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.