Next: Lazy Strings In Python, Previous: Symbols In Python, Up: Python API
Access to symbol table data maintained by gdb on the inferior
is exposed to Python via two objects: gdb.Symtab_and_line and
gdb.Symtab.  Symbol table and line data for a frame is returned
from the find_sal method in gdb.Frame object. 
See Frames In Python.
   
For more information on gdb's symbol table management, see Examining the Symbol Table, for more information.
A gdb.Symtab_and_line object has the following attributes:
     
The symbol table object (
gdb.Symtab) for this frame. This attribute is not writable.
A gdb.Symtab_and_line object has the following methods:
     
Returns
Trueif thegdb.Symtab_and_lineobject is valid,Falseif not. Agdb.Symtab_and_lineobject can become invalid if the Symbol table and line object it refers to does not exist in gdb any longer. All othergdb.Symtab_and_linemethods will throw an exception if it is invalid at the time the method is called.
A gdb.Symtab object has the following attributes:
     
The symbol table's backing object file. See Objfiles In Python. This attribute is not writable.
A gdb.Symtab object has the following methods:
     
Returns
Trueif thegdb.Symtabobject is valid,Falseif not. Agdb.Symtabobject can become invalid if the symbol table it refers to does not exist in gdb any longer. All othergdb.Symtabmethods will throw an exception if it is invalid at the time the method is called.