Skip to main content



      Home
Home » Newcomers » Newcomers » debugging a C++ executable w/ command line parameters
debugging a C++ executable w/ command line parameters [message #260039] Fri, 04 July 2008 07:02 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Really disable Team/CVS
Next Topic:class file there but Eclipse misses it, errantly says "build path is incomplete.
Goto Forum:
  


Current Time: Fri May 09 01:51:47 EDT 2025

Powered by FUDForum. Page generated in 0.34599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top