GDB (xrefs)
Public Member Functions | Public Attributes | List of all members
gdb.xmethod.XMethodMatcher Class Reference
Inheritance diagram for gdb.xmethod.XMethodMatcher:
gdb.xmethod.SimpleXMethodMatcher gdb.xmethod.SimpleXMethodMatcher

Public Member Functions

def __init__ (self, name)
 
def match (self, class_type, method_name)
 
def __init__ (self, name)
 
def match (self, class_type, method_name)
 

Public Attributes

 name
 
 enabled
 
 methods
 

Detailed Description

Abstract base class for matching an xmethod.

When looking for xmethods, GDB invokes the `match' method of a
registered xmethod matcher to match the object type and method name.
The `match' method in concrete classes derived from this class should
return an `XMethodWorker' object, or a list of `XMethodWorker'
objects if there is a match (see below for 'XMethodWorker' class).

Attributes:
    name: The name of the matcher.
    enabled: A boolean indicating if the matcher is enabled.
    methods: A sequence of objects of type 'XMethod', or objects
        which have at least the attributes of an 'XMethod' object.
        This list is used by the 'enable'/'disable'/'info' commands to
        enable/disable/list the xmethods registered with GDB.  See
        the 'match' method below to know how this sequence is used.
        This attribute is None if the matcher chooses not have any
        xmethods managed by it.

Definition at line 51 of file xmethod.py.

Constructor & Destructor Documentation

def gdb.xmethod.XMethodMatcher.__init__ (   self,
  name 
)
Args:
    name: An identifying name for the xmethod or the group of
  xmethods returned by the `match' method.

Definition at line 72 of file xmethod.py.

Referenced by gdb.xmethod.XMethodMatcher.__init__().

def gdb.xmethod.XMethodMatcher.__init__ (   self,
  name 
)

Member Function Documentation

def gdb.xmethod.XMethodMatcher.match (   self,
  class_type,
  method_name 
)
Match class type and method name.

In derived classes, it should return an XMethodWorker object, or a
sequence of 'XMethodWorker' objects.  Only those xmethod workers
whose corresponding 'XMethod' descriptor object is enabled should be
returned.

Args:
    class_type: The class type (gdb.Type object) to match.
    method_name: The name (string) of the method to match.

Definition at line 82 of file xmethod.py.

Referenced by gdb.xmethod.XMethodMatcher.match().

def gdb.xmethod.XMethodMatcher.match (   self,
  class_type,
  method_name 
)
Match class type and method name.

In derived classes, it should return an XMethodWorker object, or a
sequence of 'XMethodWorker' objects.  Only those xmethod workers
whose corresponding 'XMethod' descriptor object is enabled should be
returned.

Args:
    class_type: The class type (gdb.Type object) to match.
    method_name: The name (string) of the method to match.

Definition at line 82 of file xmethod.py.

References gdb.xmethod.XMethodMatcher.match().

Member Data Documentation

gdb.xmethod.XMethodMatcher.enabled

Definition at line 79 of file xmethod.py.

Referenced by gdb.xmethod.XMethodMatcher.__init__().

gdb.xmethod.XMethodMatcher.methods

Definition at line 80 of file xmethod.py.

Referenced by gdb.xmethod.XMethodMatcher.__init__().

gdb.xmethod.XMethodMatcher.name

Definition at line 78 of file xmethod.py.

Referenced by gdb.xmethod.XMethodMatcher.__init__().


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