GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Functions | Variables
py-membuf.c File Reference
#include "defs.h"
#include "python-internal.h"

Go to the source code of this file.

Classes

struct  membuf_object
 

Functions

PyTypeObject membuf_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("membuf_object")
 
PyObjectgdbpy_buffer_to_membuf (gdb::unique_xmalloc_ptr< gdb_byte > buffer, CORE_ADDR address, ULONGEST length)
 
static void mbpy_dealloc (PyObject *self)
 
static PyObjectmbpy_str (PyObject *self)
 
static int get_buffer (PyObject *self, Py_buffer *buf, int flags)
 
int gdbpy_initialize_membuf (void)
 

Variables

static PyBufferProcs buffer_procs
 
PyTypeObject membuf_object_type
 

Function Documentation

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF()

PyTypeObject membuf_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "membuf_object"  )

◆ gdbpy_buffer_to_membuf()

PyObject * gdbpy_buffer_to_membuf ( gdb::unique_xmalloc_ptr< gdb_byte >  buffer,
CORE_ADDR  address,
ULONGEST  length 
)

Definition at line 44 of file py-membuf.c.

References membuf_object_type.

Referenced by disasmpy_info_read_memory(), and infpy_read_memory().

◆ gdbpy_initialize_membuf()

int gdbpy_initialize_membuf ( void  )

Definition at line 103 of file py-membuf.c.

References gdb_module, gdb_pymodule_addobject(), and membuf_object_type.

◆ get_buffer()

static int get_buffer ( PyObject self,
Py_buffer *  buf,
int  flags 
)
static

Definition at line 84 of file py-membuf.c.

References membuf_object::buffer, and membuf_object::length.

◆ mbpy_dealloc()

static void mbpy_dealloc ( PyObject self)
static

Definition at line 63 of file py-membuf.c.

References xfree().

◆ mbpy_str()

static PyObject * mbpy_str ( PyObject self)
static

Variable Documentation

◆ buffer_procs

PyBufferProcs buffer_procs
static
Initial value:
=
{
}
static int get_buffer(PyObject *self, Py_buffer *buf, int flags)
Definition py-membuf.c:84

Definition at line 113 of file py-membuf.c.

◆ membuf_object_type

PyTypeObject membuf_object_type

Definition at line 118 of file py-membuf.c.

Referenced by gdbpy_buffer_to_membuf(), and gdbpy_initialize_membuf().