Within each frame, gdb maintains information on each block
stored in that frame. These blocks are organized hierarchically, and
are represented individually in Python as a gdb.Block.
Please see Frames In Python, for a more in-depth discussion on
frames. Furthermore, see Examining the Stack, for more
detailed technical information on gdb's book-keeping of the
stack.
The following block-related functions are available in the gdb
module:
Return the
gdb.Blockcontaining the given pc value. If the block cannot be found for the pc value specified, the function will returnNone.
A gdb.Block object has the following methods:
Returns
Trueif thegdb.Blockobject is valid,Falseif not. A block object can become invalid if the block it refers to doesn't exist anymore in the inferior. All othergdb.Blockmethods will throw an exception if it is invalid at the time the method is called. This method is also made available to the Python iterator object thatgdb.Blockprovides in an iteration context and via the Pythoniterbuilt-in function.
A gdb.Block object has the following attributes: