GDB (xrefs)
Loading...
Searching...
No Matches
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
gdb.FrameDecorator.FrameDecorator Class Reference
Inheritance diagram for gdb.FrameDecorator.FrameDecorator:

Public Member Functions

def __init__ (self, base)
 
def elided (self)
 
def function (self)
 
def address (self)
 
def filename (self)
 
def frame_args (self)
 
def frame_locals (self)
 
def line (self)
 
def inferior_frame (self)
 
def __init__ (self, base)
 
def elided (self)
 
def function (self)
 
def address (self)
 
def filename (self)
 
def frame_args (self)
 
def frame_locals (self)
 
def line (self)
 
def inferior_frame (self)
 

Static Protected Member Functions

def _is_limited_frame (frame)
 
def _is_limited_frame (frame)
 

Protected Attributes

 _base
 

Detailed Description

Basic implementation of a Frame Decorator
 This base frame decorator decorates a frame or another frame
decorator, and provides convenience methods.  If this object is
wrapping a frame decorator, defer to that wrapped object's method
if it has one.  This allows for frame decorators that have
sub-classed FrameDecorator object, but also wrap other frame
decorators on the same frame to correctly execute.

E.g

If the result of frame filters running means we have one gdb.Frame
wrapped by multiple frame decorators, all sub-classed from
FrameDecorator, the resulting hierarchy will be:

Decorator1
  -- (wraps) Decorator2
    -- (wraps) FrameDecorator
      -- (wraps) gdb.Frame

In this case we have two frame decorators, both of which are
sub-classed from FrameDecorator.  If Decorator1 just overrides the
'function' method, then all of the other methods are carried out
by the super-class FrameDecorator.  But Decorator2 may have
overriden other methods, so FrameDecorator will look at the
'base' parameter and defer to that class's methods.  And so on,
down the chain.

Definition at line 19 of file FrameDecorator.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

def gdb.FrameDecorator.FrameDecorator.__init__ (   self,
  base 
)

Definition at line 52 of file FrameDecorator.py.

◆ __init__() [2/2]

def gdb.FrameDecorator.FrameDecorator.__init__ (   self,
  base 
)

Definition at line 52 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base.

Member Function Documentation

◆ _is_limited_frame() [1/2]

def gdb.FrameDecorator.FrameDecorator._is_limited_frame (   frame)
staticprotected
Internal utility to determine if the frame is special or
limited.

Definition at line 56 of file FrameDecorator.py.

Referenced by gdb.FrameDecorator.FrameDecorator.frame_args(), gdb.FrameDecorator.FrameDecorator.frame_locals(), and gdb.FrameDecorator.FrameDecorator.line().

◆ _is_limited_frame() [2/2]

def gdb.FrameDecorator.FrameDecorator._is_limited_frame (   frame)
staticprotected
Internal utility to determine if the frame is special or
limited.

Definition at line 56 of file FrameDecorator.py.

Referenced by gdb.FrameDecorator.FrameDecorator.frame_args(), gdb.FrameDecorator.FrameDecorator.frame_locals(), and gdb.FrameDecorator.FrameDecorator.line().

◆ address() [1/2]

def gdb.FrameDecorator.FrameDecorator.address (   self)

◆ address() [2/2]

def gdb.FrameDecorator.FrameDecorator.address (   self)

◆ elided() [1/2]

def gdb.FrameDecorator.FrameDecorator.elided (   self)
Return any elided frames that this class might be
wrapping, or None.

Definition at line 72 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, and gdb.FrameDecorator.FrameDecorator.elided().

Referenced by gdb.FrameDecorator.FrameDecorator.elided().

◆ elided() [2/2]

def gdb.FrameDecorator.FrameDecorator.elided (   self)
Return any elided frames that this class might be
wrapping, or None.

Definition at line 72 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, and gdb.FrameDecorator.FrameDecorator.elided().

◆ filename() [1/2]

def gdb.FrameDecorator.FrameDecorator.filename (   self)
Return the filename associated with this frame, detecting
and returning the appropriate library name is this is a shared
library.

Definition at line 126 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator.filename(), gdb.FrameDecorator.FrameDecorator.inferior_frame(), and gdb.solib_name().

Referenced by gdb.FrameDecorator.FrameDecorator.filename().

◆ filename() [2/2]

def gdb.FrameDecorator.FrameDecorator.filename (   self)
Return the filename associated with this frame, detecting
and returning the appropriate library name is this is a shared
library.

Definition at line 126 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator.filename(), gdb.FrameDecorator.FrameDecorator.inferior_frame(), and gdb.solib_name().

◆ frame_args() [1/2]

def gdb.FrameDecorator.FrameDecorator.frame_args (   self)
Return an iterable of frame arguments for this frame, if
any.  The iterable object contains objects conforming with the
Symbol/Value interface.  If there are no frame arguments, or
if this frame is deemed to be a special case, return None.

Definition at line 142 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator._is_limited_frame(), gdb.FrameDecorator.FrameDecorator.frame_args(), and gdb.FrameDecorator.FrameDecorator.inferior_frame().

Referenced by gdb.FrameDecorator.FrameDecorator.frame_args().

◆ frame_args() [2/2]

def gdb.FrameDecorator.FrameDecorator.frame_args (   self)
Return an iterable of frame arguments for this frame, if
any.  The iterable object contains objects conforming with the
Symbol/Value interface.  If there are no frame arguments, or
if this frame is deemed to be a special case, return None.

Definition at line 142 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator._is_limited_frame(), gdb.FrameDecorator.FrameDecorator.frame_args(), and gdb.FrameDecorator.FrameDecorator.inferior_frame().

◆ frame_locals() [1/2]

def gdb.FrameDecorator.FrameDecorator.frame_locals (   self)
Return an iterable of local variables for this frame, if
any.  The iterable object contains objects conforming with the
Symbol/Value interface.  If there are no frame locals, or if
this frame is deemed to be a special case, return None.

Definition at line 158 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator._is_limited_frame(), gdb.FrameDecorator.FrameDecorator.frame_locals(), and gdb.FrameDecorator.FrameDecorator.inferior_frame().

Referenced by gdb.FrameDecorator.FrameDecorator.frame_locals().

◆ frame_locals() [2/2]

def gdb.FrameDecorator.FrameDecorator.frame_locals (   self)
Return an iterable of local variables for this frame, if
any.  The iterable object contains objects conforming with the
Symbol/Value interface.  If there are no frame locals, or if
this frame is deemed to be a special case, return None.

Definition at line 158 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator._is_limited_frame(), gdb.FrameDecorator.FrameDecorator.frame_locals(), and gdb.FrameDecorator.FrameDecorator.inferior_frame().

◆ function() [1/2]

def gdb.FrameDecorator.FrameDecorator.function (   self)
Return the name of the frame's function or an address of
the function of the frame.  First determine if this is a
special frame.  If not, try to determine filename from GDB's
frame internal function API.  Finally, if a name cannot be
determined return the address.  If this function returns an
address, GDB will attempt to determine the function name from
its internal minimal symbols store (for example, for inferiors
without debug-info).

Definition at line 80 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, and gdb.FrameDecorator.FrameDecorator.inferior_frame().

◆ function() [2/2]

def gdb.FrameDecorator.FrameDecorator.function (   self)
Return the name of the frame's function or an address of
the function of the frame.  First determine if this is a
special frame.  If not, try to determine filename from GDB's
frame internal function API.  Finally, if a name cannot be
determined return the address.  If this function returns an
address, GDB will attempt to determine the function name from
its internal minimal symbols store (for example, for inferiors
without debug-info).

Definition at line 80 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, and gdb.FrameDecorator.FrameDecorator.inferior_frame().

◆ inferior_frame() [1/2]

def gdb.FrameDecorator.FrameDecorator.inferior_frame (   self)

◆ inferior_frame() [2/2]

def gdb.FrameDecorator.FrameDecorator.inferior_frame (   self)

◆ line() [1/2]

def gdb.FrameDecorator.FrameDecorator.line (   self)
Return line number information associated with the frame's
pc.  If symbol table/line information does not exist, or if
this frame is deemed to be a special case, return None

Definition at line 174 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator._is_limited_frame(), gdb.FrameDecorator.FrameDecorator.inferior_frame(), and gdb.FrameDecorator.FrameDecorator.line().

Referenced by gdb.FrameDecorator.FrameDecorator.line().

◆ line() [2/2]

def gdb.FrameDecorator.FrameDecorator.line (   self)
Return line number information associated with the frame's
pc.  If symbol table/line information does not exist, or if
this frame is deemed to be a special case, return None

Definition at line 174 of file FrameDecorator.py.

References gdb.FrameDecorator.FrameDecorator._base, gdb.FrameDecorator.FrameDecorator._is_limited_frame(), gdb.FrameDecorator.FrameDecorator.inferior_frame(), and gdb.FrameDecorator.FrameDecorator.line().

Member Data Documentation

◆ _base

gdb.FrameDecorator.FrameDecorator._base
protected

The documentation for this class was generated from the following files: