| 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). |
| |
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” |
| |
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 |
| |
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