NAME gdb.xmethod - Utilities for defining xmethods CLASSES builtins.object XMethod XMethodMatcher SimpleXMethodMatcher XMethodWorker class SimpleXMethodMatcher(XMethodMatcher) | A utility class to implement simple xmethod mathers and workers. | | See the __init__ method below for information on how instances of this | class can be used. | | For simple classes and methods, one can choose to use this class. For | complex xmethods, which need to replace/implement template methods on | possibly template classes, one should implement their own xmethod | matchers and workers. See py-xmethods.py in testsuite/gdb.python | directory of the GDB source tree for examples. | | Method resolution order: | SimpleXMethodMatcher | XMethodMatcher | builtins.object | | Methods defined here: | | __init__(self, name, class_matcher, method_matcher, method_function, *arg_types) | Args: | name: Name of the xmethod matcher. | class_matcher: A regular expression used to match the name of the | class whose method this xmethod is implementing/replacing. | method_matcher: A regular expression used to match the name of the | method this xmethod is implementing/replacing. | method_function: A Python callable which would be called via the | 'invoke' method of the worker returned by the objects of this | class. This callable should accept the object (*this) as the | first argument followed by the rest of the arguments to the | method. All arguments to this function should be gdb.Value | objects. | arg_types: The gdb.Type objects corresponding to the arguments that | this xmethod takes. It can be None, or an empty sequence, | or a single gdb.Type object, or a sequence of gdb.Type objects. | | 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. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | SimpleXMethodWorker =