GDB (xrefs)
Classes | Defines | Typedefs | Functions | Variables
/home/stan/gdb/src/gdb/python/py-arch.c File Reference
#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 gdbarcharch_object_to_gdbarch (PyObject *obj)
PyObjectgdbarch_to_arch_object (struct gdbarch *gdbarch)
static PyObjectarchpy_name (PyObject *self, PyObject *args)
static PyObjectarchpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
int gdbpy_initialize_arch (void)

Variables

static struct gdbarch_dataarch_object_data = NULL
static PyMethodDef arch_object_methods []
static PyTypeObject arch_object_type

Define Documentation

#define ARCHPY_REQUIRE_VALID (   arch_obj,
  arch 
)
Value:
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 Documentation


Function Documentation

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


Variable Documentation

struct gdbarch_data* arch_object_data = NULL [static]

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

PyMethodDef arch_object_methods[] [static]
Initial value:
 {
  { "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}  
}

Definition at line 272 of file py-arch.c.

PyTypeObject arch_object_type [static]

Definition at line 284 of file py-arch.c.

Referenced by arch_object_data_init(), and gdbpy_initialize_arch().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines