GDB (xrefs)
Classes | Functions | Variables
/home/stan/gdb/src/gdb/python/py-lazy-string.c File Reference
#include "defs.h"
#include "python-internal.h"
#include "charset.h"
#include "value.h"
#include "exceptions.h"
#include "valprint.h"
#include "language.h"
#include "gdb_assert.h"

Go to the source code of this file.

Classes

struct  lazy_string_object

Functions

static PyTypeObject
lazy_string_object_type 
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("lazy_string_object")
static PyObjectstpy_get_address (PyObject *self, void *closure)
static PyObjectstpy_get_encoding (PyObject *self, void *closure)
static PyObjectstpy_get_length (PyObject *self, void *closure)
static PyObjectstpy_get_type (PyObject *self, void *closure)
static PyObjectstpy_convert_to_value (PyObject *self, PyObject *args)
static void stpy_dealloc (PyObject *self)
PyObjectgdbpy_create_lazy_string_object (CORE_ADDR address, long length, const char *encoding, struct type *type)
int gdbpy_initialize_lazy_string (void)
int gdbpy_is_lazy_string (PyObject *result)
void gdbpy_extract_lazy_string (PyObject *string, CORE_ADDR *addr, struct type **str_type, long *length, char **encoding)

Variables

static PyMethodDef lazy_string_object_methods []
static PyGetSetDef lazy_string_object_getset []
static PyTypeObject lazy_string_object_type

Function Documentation

static PyTypeObject lazy_string_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "lazy_string_object"  ) [static]
PyObject* gdbpy_create_lazy_string_object ( CORE_ADDR  address,
long  length,
const char *  encoding,
struct type type 
)
void gdbpy_extract_lazy_string ( PyObject string,
CORE_ADDR addr,
struct type **  str_type,
long *  length,
char **  encoding 
)

Definition at line 164 of file py-lazy-string.c.

References lazy_string_object_type.

Referenced by _initialize_python().

Definition at line 176 of file py-lazy-string.c.

References lazy_string_object_type.

Referenced by gdbpy_extract_lazy_string(), and value_get_print_value().

static PyObject* stpy_convert_to_value ( PyObject self,
PyObject args 
) [static]
static void stpy_dealloc ( PyObject self) [static]

Definition at line 120 of file py-lazy-string.c.

References lazy_string_object::encoding, and xfree().

static PyObject* stpy_get_address ( PyObject self,
void *  closure 
) [static]

Definition at line 54 of file py-lazy-string.c.

References lazy_string_object::address, and gdb_py_long_from_ulongest.

static PyObject* stpy_get_encoding ( PyObject self,
void *  closure 
) [static]

Definition at line 62 of file py-lazy-string.c.

References lazy_string_object::encoding.

static PyObject* stpy_get_length ( PyObject self,
void *  closure 
) [static]

Definition at line 81 of file py-lazy-string.c.

References lazy_string_object::length.

static PyObject* stpy_get_type ( PyObject self,
void *  closure 
) [static]

Definition at line 89 of file py-lazy-string.c.

References lazy_string_object::type, and type_to_type_object().


Variable Documentation

PyGetSetDef lazy_string_object_getset[] [static]
Initial value:
 {
  { "address", stpy_get_address, NULL, "Address of the string.", NULL },
  { "encoding", stpy_get_encoding, NULL, "Encoding of the string.", NULL },
  { "length", stpy_get_length, NULL, "Length of the string.", NULL },
  { "type", stpy_get_type, NULL, "Type associated with the string.", NULL },
  { NULL }  
}

Definition at line 212 of file py-lazy-string.c.

PyMethodDef lazy_string_object_methods[] [static]
Initial value:
 {
  { "value", stpy_convert_to_value, METH_NOARGS,
    "Create a (lazy) value that contains a pointer to the string." },
  {NULL}  
}

Definition at line 205 of file py-lazy-string.c.

PyTypeObject lazy_string_object_type [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines