debugging a C++ executable w/ command line parameters [message #260039] |
Fri, 04 July 2008 07:02  |
Eclipse User |
|
|
|
Originally posted by: giuseppegalloneNIENTE.SPAMgmail.com
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?
Thanks so much
Giuseppe
|
|
|
Re: debugging a C++ executable w/ command line parameters [message #260200 is a reply to message #260039] |
Mon, 07 July 2008 03:18  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.34599 seconds