set args (gdb mode only)

Specify arguments for the debuggee program.

Syntax

set args [arguments] [IO_redirection]

Parameters

arguments

The arguments to pass to the debuggee.

IO_redirection

Enables you to change stdin, stdout, and stderr, which are otherwise inherited from the debugger process.

You can enter the following values:

< filename

Redirect stdin

> filename

Redirect stdout

1> filename

Redirect stdout

2> filename

Redirect stderr

>& filename

Redirect stdout and stderr to a single file

1> filename 2> filename

Redirect stdout and stderr to different files

Description

This command specifies arguments for the debuggee. If the run command does not specify any arguments, the debuggee uses the arguments from the previous run command or arguments that you set with the set args command.

If you do not include any parameters, the debugger sets the argument list to null.

The set args command does not affect processes currently running. New arguments affect only the next run.

To view default arguments, use the show args command.

Example

(idb) set args -s > prog.output
(idb) show args
Argument list to give program being debugged when it is started is "-s > prog.output".

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.