Processes contain one or more threads of execution. The threads execute functions. Functions are sequences of instructions that are generated by compilers from source lines within source files.
As you enter the debugger commands to manipulate your process, it would be very tedious to have to repeatedly specify which thread, source file, and so on, to which you wish the command to be applied. To prevent this, each time the debugger stops the process, it re-establishes a static context and a dynamic context for your commands. The components of the static context are independent of this run of your program; the components of the dynamic context are dependent on this run.
The components of these contexts can be displayed as debugger variables or by other commands:
The debugger keeps the components of the static and dynamic contexts consistent as the contexts change. The current file and line are determined by where the debugger stops the process, but the dynamic context can be changed directly, using the up/down, func (dbx) or frame (gdb), process (dbx), and thread commands. The program can be unloaded using the unload (dbx) or file (gdb) command.