[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: debugging a C++ executable w/ command line parameters

Giuseppe.G. wrote:
Hi, I have this code I'm trying to understand. There's no documentation, so the idea was to run it step-by-step and check what's in the variables as it goes, and so on.

The compiled executable requires some command line arguments, plus an input data file.

Normally I would call it this way

/myEXE -struct BloomMap -falsepos 8 -values 8 -output-prefix model < inputfile.txt

Now, if I wanted to run it step-by-step in eclipse where should I specify the parameters?

I managed to insert the "-struct BloomMap -falsepos 8 -values 8 -output-prefix model" in "manage and run configurations" under "run" in eclipse, but it still complains about the inputfile.txt. Is there a way to feed it with that somehow?

Note that "< inputfile.txt" is not a command line argument, but a shell IO redirection. Therefore without shell (or GDB) to interpret the stdin redirection, this won't work.
Perhaps the input file can also be specified using normal command line arguments?
Alternatively, you can try the GDB "set args" command in a .gdbinit file, though I am not sure if IO redirection is supported in this case.


HTH
--
Anton Leherbauer
Wind River CDT Team, Austria