GDB (xrefs)

Public Member Functions | Public Attributes | List of all members
gdb.xmethod.XMethodMatcher Class Reference
Inheritance diagram for gdb.xmethod.XMethodMatcher:

## 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

## ◆ __init__() [1/2]

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__().

## ◆ __init__() [2/2]

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.

References gdb.xmethod.XMethodMatcher.__init__(), gdb.unwinder.Unwinder.enabled, gdb.xmethod.XMethod.enabled, gdb.printing.PrettyPrinter.enabled, gdb.printing.SubPrettyPrinter.enabled, gdb.xmethod.XMethodMatcher.enabled, gdb.types.TypePrinter.enabled, bp_location.enabled, gdb.xmethod.XMethodMatcher.methods, exsummary.Function.name, gdb.unwinder.Unwinder.name, gdb.xmethod.XMethod.name, cmd_list_element.name, gdb.printing.PrettyPrinter.name, subfile.name, gdb.printing.SubPrettyPrinter.name, name, gdb.xmethod.XMethodMatcher.name, ada_task_info.name, gdb.types.TypePrinter.name, context_stack.name, subfile_stack.name, aop_map.name, cache_entry.name, ada_exc_info.name, and loaded_script.name.

## Member Function Documentation

## ◆ match() [1/2]

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().

## ◆ match() [2/2]

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

## ◆ enabled

gdb.xmethod.XMethodMatcher.enabled

Definition at line 79 of file xmethod.py.

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

## ◆ methods

gdb.xmethod.XMethodMatcher.methods

Definition at line 80 of file xmethod.py.

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

## ◆ name

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:

- /tmp/gdb-8.1/gdb/data-directory/python/gdb/xmethod.py