C and C++ SoftBench User's Guide

Using SoftBench Debugger
Loading or Rerunning an Executable Program
Chapter 7 167
"Execution: Get Current Program Info…" displays a dialog box
containing useful information about the current program, including the
values set in the above dialog boxes.
Specifying the Working Directory and Program Arguments
By default, the loaded executable runs in the project's local workspace
root. When you start SoftBench Debugger from the command line, the
executable runs in the current working directory.
If you want the program to run in another directory, choose "File:
Change Working Directory…" and specify the desired directory in the
"Working Directory" input box. Setting the working directory does not
affect SoftBench Debugger's or DDE's working directory.
To send program arguments, choose "Options: Default Load/Rerun
Settings…". Enter your desired arguments in the "Program Arguments"
input box. You can also specify these arguments from the SoftBench
main window using "Target: Modify Properties…" and selecting the
"Execution/Debug Properties" tab.
Specifying Standard I/O
By default, your program's stdin, stdout, and stderr are intercepted
by the User Program I/O area on the SoftBench Debugger window. To
attach the standard I/O to a different file:
1. Choose "Options: Default Load/Rerun Settings…".
2. Enter the desired files in the "Redirect" input boxes. Select the
button to display a file selection dialog box.
3. Select the appropriate "Replace" or "Append" radio button.
Selecting the " Replace" button on the stdout line is equivalent to
"
program
>
filename
". Selecting the " Append" button is equivalent to
"
program
>>
filename
".
When you redirect stdin, stdout, and stderr, you have no access to
your program's I/O from SoftBench Debugger. The User Program I/O
area is removed to indicate this. You can also specify this information
from the SoftBench main window using "Target: Modify Properties…"
and selecting the "Execution/Debug Properties" tab.
Setting Environment Variables
The "Program Environment Variables" list on the "Set Default