GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Functions | Variables
py-lazy-string.c File Reference
#include "defs.h"
#include "python-internal.h"
#include "charset.h"
#include "value.h"
#include "valprint.h"
#include "language.h"

Go to the source code of this file.

Classes

struct  lazy_string_object
 

Functions

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)
 
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_lazy_string (void)
 
int gdbpy_is_lazy_string (PyObject *result)
 
static struct typestpy_lazy_string_elt_type (lazy_string_object *lazy)
 
void gdbpy_extract_lazy_string (PyObject *string, CORE_ADDR *addr, struct type **str_elt_type, long *length, gdb::unique_xmalloc_ptr< char > *encoding)
 
static PyObjectstpy_str (PyObject *self)
 
 GDBPY_INITIALIZE_FILE (gdbpy_initialize_lazy_string)
 

Variables

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

Function Documentation

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF()

PyTypeObject lazy_string_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "lazy_string_object" )
extern

◆ gdbpy_create_lazy_string_object()

PyObject * gdbpy_create_lazy_string_object ( CORE_ADDR address,
long length,
const char * encoding,
struct type * type )

◆ gdbpy_extract_lazy_string()

void gdbpy_extract_lazy_string ( PyObject * string,
CORE_ADDR * addr,
struct type ** str_elt_type,
long * length,
gdb::unique_xmalloc_ptr< char > * encoding )

◆ GDBPY_INITIALIZE_FILE()

GDBPY_INITIALIZE_FILE ( gdbpy_initialize_lazy_string )

◆ gdbpy_initialize_lazy_string()

static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_lazy_string ( void )
static

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

References lazy_string_object_type.

◆ gdbpy_is_lazy_string()

int gdbpy_is_lazy_string ( PyObject * result)

◆ stpy_convert_to_value()

static PyObject * stpy_convert_to_value ( PyObject * self,
PyObject * args )
static

◆ stpy_dealloc()

static void stpy_dealloc ( PyObject * self)
static

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

References lazy_string_object::encoding, and xfree().

◆ stpy_get_address()

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

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

References lazy_string_object::address, and gdb_py_object_from_ulongest().

◆ stpy_get_encoding()

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

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

References lazy_string_object::encoding.

◆ stpy_get_length()

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

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

References gdb_py_object_from_longest(), and lazy_string_object::length.

◆ stpy_get_type()

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

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

References lazy_string_object::type.

◆ stpy_lazy_string_elt_type()

static struct type * stpy_lazy_string_elt_type ( lazy_string_object * lazy)
static

◆ stpy_str()

static PyObject * stpy_str ( PyObject * self)
static

Variable Documentation

◆ lazy_string_object_getset

gdb_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 }
}
static PyObject * stpy_get_address(PyObject *self, void *closure)
static PyObject * stpy_get_length(PyObject *self, void *closure)
static PyObject * stpy_get_type(PyObject *self, void *closure)
static PyObject * stpy_get_encoding(PyObject *self, void *closure)

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

◆ lazy_string_object_methods

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}
}
static PyObject * stpy_convert_to_value(PyObject *self, PyObject *args)

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

◆ lazy_string_object_type

PyTypeObject lazy_string_object_type