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

dancks

macrumors regular
Original poster
Nov 8, 2009
100
0
with a file that requires input?

I tried running it and it just says reading source from library with trailing "..."
 

kpua

macrumors 6502
Jul 25, 2006
294
0
This is how I do it from the command line:

Code:
$ gdb /path/to/my/program
… license and loading info …
(gdb) run /path/to/my/inputfile

You can even attach the file to standard input by doing

Code:
(gdb) run < /path/to/my/inputfile

like you normally would from the command line.

If you're using Xcode, you get info on your executable and set the arguments in there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.