GDB (xrefs)
Classes | Functions | Variables
py-xmethods.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "extension-priv.h"
#include "objfiles.h"
#include "value.h"
#include "language.h"
#include "python.h"
#include "python-internal.h"

Go to the source code of this file.

Classes

struct  gdbpy_worker_data
 

Functions

static struct xmethod_workernew_python_xmethod_worker (PyObject *item, PyObject *py_obj_type)
 
void gdbpy_free_xmethod_worker_data (const struct extension_language_defn *extlang, void *data)
 
void * gdbpy_clone_xmethod_worker_data (const struct extension_language_defn *extlang, void *data)
 
static PyObject * invoke_match_method (PyObject *matcher, PyObject *py_obj_type, const char *xmethod_name)
 
enum ext_lang_rc gdbpy_get_matching_xmethod_workers (const struct extension_language_defn *extlang, struct type *obj_type, const char *method_name, xmethod_worker_vec **dm_vec)
 
enum ext_lang_rc gdbpy_get_xmethod_arg_types (const struct extension_language_defn *extlang, struct xmethod_worker *worker, int *nargs, struct type ***arg_types)
 
enum ext_lang_rc gdbpy_get_xmethod_result_type (const struct extension_language_defn *extlang, struct xmethod_worker *worker, struct value *obj, struct value **args, int nargs, struct type **result_type_ptr)
 
struct valuegdbpy_invoke_xmethod (const struct extension_language_defn *extlang, struct xmethod_worker *worker, struct value *obj, struct value **args, int nargs)
 
int gdbpy_initialize_xmethods (void)
 

Variables

static const char enabled_field_name [] = "enabled"
 
static const char match_method_name [] = "match"
 
static const char get_arg_types_method_name [] = "get_arg_types"
 
static const char get_result_type_method_name [] = "get_result_type"
 
static const char invoke_method_name [] = "invoke"
 
static const char matchers_attr_str [] = "xmethods"
 
static PyObject * py_match_method_name = NULL
 
static PyObject * py_get_arg_types_method_name = NULL
 
static PyObject * py_get_result_type_method_name = NULL
 
static PyObject * py_invoke_method_name = NULL
 

Function Documentation

void* gdbpy_clone_xmethod_worker_data ( const struct extension_language_defn extlang,
void *  data 
)
void gdbpy_free_xmethod_worker_data ( const struct extension_language_defn extlang,
void *  data 
)
enum ext_lang_rc gdbpy_get_matching_xmethod_workers ( const struct extension_language_defn extlang,
struct type obj_type,
const char *  method_name,
xmethod_worker_vec **  dm_vec 
)
enum ext_lang_rc gdbpy_get_xmethod_arg_types ( const struct extension_language_defn extlang,
struct xmethod_worker worker,
int nargs,
struct type ***  arg_types 
)
enum ext_lang_rc gdbpy_get_xmethod_result_type ( const struct extension_language_defn extlang,
struct xmethod_worker worker,
struct value obj,
struct value **  args,
int  nargs,
struct type **  result_type_ptr 
)
int gdbpy_initialize_xmethods ( void  )
struct value* gdbpy_invoke_xmethod ( const struct extension_language_defn extlang,
struct xmethod_worker worker,
struct value obj,
struct value **  args,
int  nargs 
)
static PyObject* invoke_match_method ( PyObject *  matcher,
PyObject *  py_obj_type,
const char *  xmethod_name 
)
static
static struct xmethod_worker * new_python_xmethod_worker ( PyObject *  item,
PyObject *  py_obj_type 
)
static

Variable Documentation

const char enabled_field_name[] = "enabled"
static

Definition at line 30 of file py-xmethods.c.

Referenced by invoke_match_method().

const char get_arg_types_method_name[] = "get_arg_types"
static

Definition at line 32 of file py-xmethods.c.

Referenced by gdbpy_get_xmethod_arg_types(), and gdbpy_initialize_xmethods().

const char get_result_type_method_name[] = "get_result_type"
static

Definition at line 33 of file py-xmethods.c.

Referenced by gdbpy_get_xmethod_result_type(), and gdbpy_initialize_xmethods().

const char invoke_method_name[] = "invoke"
static

Definition at line 34 of file py-xmethods.c.

Referenced by gdbpy_initialize_xmethods().

const char match_method_name[] = "match"
static

Definition at line 31 of file py-xmethods.c.

Referenced by gdbpy_initialize_xmethods(), and invoke_match_method().

const char matchers_attr_str[] = "xmethods"
static

Definition at line 35 of file py-xmethods.c.

Referenced by gdbpy_get_matching_xmethod_workers().

PyObject* py_get_arg_types_method_name = NULL
static

Definition at line 38 of file py-xmethods.c.

Referenced by gdbpy_get_xmethod_arg_types(), and gdbpy_initialize_xmethods().

PyObject* py_get_result_type_method_name = NULL
static

Definition at line 39 of file py-xmethods.c.

Referenced by gdbpy_initialize_xmethods().

PyObject* py_invoke_method_name = NULL
static

Definition at line 40 of file py-xmethods.c.

Referenced by gdbpy_initialize_xmethods().

PyObject* py_match_method_name = NULL
static

Definition at line 37 of file py-xmethods.c.

Referenced by gdbpy_initialize_xmethods(), and invoke_match_method().