HP gnu source-level debugger 5992-4701 User Manual

Page 40

Advertising
background image

variable substitution) in describing the
arguments. On Unix systems, you can control
which shell is used with the SHELL environment
variable. GDB uses the C shell (/usr/bin/csh).
See

“Arguments To Your Program” (page 41)

.

environment.

Your program inherits its environment from
GDB. However, you can use the GDB commands
set environment

and unset environment

to change parts of the environment that affect
your program. See

“Program Environment”

(page 41)

.

working directory.

Your program inherits its working directory from
GDB. You can set the GDB working directory
with the cd command in GDB. See

“Working

directory” (page 43)

.

standard input and output.

Your program as default uses the same device
for standard input and standard output as GDB
is using. You can redirect input and output in
the run command line, or you can use the tty
command to set a different device for your

40

Running Programs Under GDB

Advertising