Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
GDB can be thought of as a specialized programming language. It has variables and operators similar to those of C, and special features for debugging. This section looks at the different kinds of expressions that GDB understands.
Every time you print a value with print, GDB saves the value in the value history . You can reference these saved values by their numeric place in the history, preceded with a $. GDB reminds you of this by printing $ n = val. For example: