|
|
This discussion describes the information available without -g and introduces several new commands for viewing the state of the program. Although these commands are used most frequently for debugging at the assembly language level, they can be useful even when debugging at the source level; for example, by dumping the registers you can see the return value of a function even if the return value is not saved in a variable.
The examples were run on the Intel386 family of processors. If you are debugging on another type of machine the output from several commands (most notably dis and regs) will look entirely different from the output here, but the debugging principles and the behavior of the commands will be the same.