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 want the command to be applied. To prevent this, each time the debugger stops the process, it reestablishes a static context and a dynamic context for your commands. The components of the dynamic context are dependent on this run of your program, while the components of the static context are independent of this run.
You can display the components of these contexts as debugger variables or by using other commands.
The static context consists of the following:
Current program |
info sharedlibrary (GDB mode) or listobj (IDB mode), info file |
Current file |
print $curfile |
Current line |
print $curline |
The dynamic context consists of the following:
where |
Current call frame |
print $curprocess |
Current process |
print $curthread |
Current thread |
thread |
The thread executing the event that caused the debugger to gain control of the process |
The debugger keeps the components of the static and dynamic contexts consistent as the contexts change. The debugger determines the current file and line according to where the process stops, but you can change the dynamic context directly using the following commands:
frame (GDB mode)
up or down
func (IDB mode)
process (IDB mode)
thread
You can unload the program using the file (GDB mode) or unload (IDB mode) command.
Copyright © 2001-2011, Intel Corporation. All rights reserved.