GDB (xrefs)
|
#include "defs.h"
#include "gdbarch.h"
#include "arch-utils.h"
#include "disasm.h"
#include "python-internal.h"
Go to the source code of this file.
Classes | |
struct | arch_object_type_object |
Defines | |
#define | ARCHPY_REQUIRE_VALID(arch_obj, arch) |
Typedefs | |
typedef struct arch_object_type_object | arch_object |
Functions | |
static PyTypeObject arch_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("arch_object") |
static void * | arch_object_data_init (struct gdbarch *gdbarch) |
struct gdbarch * | arch_object_to_gdbarch (PyObject *obj) |
PyObject * | gdbarch_to_arch_object (struct gdbarch *gdbarch) |
static PyObject * | archpy_name (PyObject *self, PyObject *args) |
static PyObject * | archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw) |
int | gdbpy_initialize_arch (void) |
Variables | |
static struct gdbarch_data * | arch_object_data = NULL |
static PyMethodDef | arch_object_methods [] |
static PyTypeObject | arch_object_type |
#define ARCHPY_REQUIRE_VALID | ( | arch_obj, | |
arch | |||
) |
do { \ arch = arch_object_to_gdbarch (arch_obj); \ if (arch == NULL) \ { \ PyErr_SetString (PyExc_RuntimeError, \ _("Architecture is invalid.")); \ return NULL; \ } \ } while (0)
Definition at line 34 of file py-arch.c.
Referenced by archpy_disassemble(), and archpy_name().
typedef struct arch_object_type_object arch_object |
static void* arch_object_data_init | ( | struct gdbarch * | gdbarch | ) | [static] |
Definition at line 52 of file py-arch.c.
References arch_object_type, and arch_object_type_object::gdbarch.
Referenced by gdbpy_initialize_arch().
struct gdbarch* arch_object_to_gdbarch | ( | PyObject * | obj | ) | [read] |
Definition at line 68 of file py-arch.c.
References arch_object_type_object::gdbarch.
static PyObject* archpy_disassemble | ( | PyObject * | self, |
PyObject * | args, | ||
PyObject * | kw | ||
) | [static] |
Definition at line 116 of file py-arch.c.
References _, ARCHPY_REQUIRE_VALID, gdb_print_insn(), GDB_PY_LLU_ARG, gdb_py_long_from_ulongest, gdbpy_convert_exception(), mem_fileopen(), Py_DECREF, gdb_exception::reason, RETURN_MASK_ALL, TRY_CATCH, ui_file_delete(), ui_file_xstrdup(), and xfree().
static PyObject* archpy_name | ( | PyObject * | self, |
PyObject * | args | ||
) | [static] |
Definition at line 95 of file py-arch.c.
References ARCHPY_REQUIRE_VALID, gdbarch_bfd_arch_info(), and name.
static PyTypeObject arch_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "arch_object" | ) | [static] |
PyObject* gdbarch_to_arch_object | ( | struct gdbarch * | gdbarch | ) |
Definition at line 80 of file py-arch.c.
Referenced by frapy_arch().
int gdbpy_initialize_arch | ( | void | ) |
Definition at line 261 of file py-arch.c.
References arch_object_data_init(), arch_object_type, gdb_module, gdb_pymodule_addobject(), and gdbarch_data_register_post_init().
Referenced by _initialize_python().
struct gdbarch_data* arch_object_data = NULL [static] |
PyMethodDef arch_object_methods[] [static] |
{ { "name", archpy_name, METH_NOARGS, "name () -> String.\n\ Return the name of the architecture as a string value." }, { "disassemble", (PyCFunction) archpy_disassemble, METH_VARARGS | METH_KEYWORDS, "disassemble (start_pc [, end_pc [, count]]) -> List.\n\ Return a list of at most COUNT disassembled instructions from START_PC to\n\ END_PC." }, {NULL} }
PyTypeObject arch_object_type [static] |
Definition at line 284 of file py-arch.c.
Referenced by arch_object_data_init(), and gdbpy_initialize_arch().