GDB (xrefs)
Loading...
Searching...
No Matches
Functions
py-utils.c File Reference
#include "defs.h"
#include "top.h"
#include "charset.h"
#include "value.h"
#include "python-internal.h"

Go to the source code of this file.

Functions

gdbpy_ref python_string_to_unicode (PyObject *obj)
 
static gdb::unique_xmalloc_ptr< char > unicode_to_encoded_string (PyObject *unicode_str, const char *charset)
 
static gdbpy_ref unicode_to_encoded_python_string (PyObject *unicode_str, const char *charset)
 
gdb::unique_xmalloc_ptr< char > unicode_to_target_string (PyObject *unicode_str)
 
static gdbpy_ref unicode_to_target_python_string (PyObject *unicode_str)
 
gdb::unique_xmalloc_ptr< char > python_string_to_target_string (PyObject *obj)
 
gdbpy_ref python_string_to_target_python_string (PyObject *obj)
 
gdb::unique_xmalloc_ptr< char > python_string_to_host_string (PyObject *obj)
 
gdbpy_ref host_string_to_python_string (const char *str)
 
int gdbpy_is_string (PyObject *obj)
 
gdb::unique_xmalloc_ptr< char > gdbpy_obj_to_string (PyObject *obj)
 
void gdbpy_convert_exception (const struct gdb_exception &exception)
 
int get_addr_from_python (PyObject *obj, CORE_ADDR *addr)
 
gdbpy_ref gdb_py_object_from_longest (LONGEST l)
 
gdbpy_ref gdb_py_object_from_ulongest (ULONGEST l)
 
int gdb_py_int_as_long (PyObject *obj, long *result)
 
PyObjectgdb_py_generic_dict (PyObject *self, void *closure)
 
int gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object)
 
void gdbpy_error (const char *fmt,...)
 
void gdbpy_handle_exception ()
 
gdb::unique_xmalloc_ptr< char > gdbpy_fix_doc_string_indentation (gdb::unique_xmalloc_ptr< char > doc)
 

Function Documentation

◆ gdb_py_generic_dict()

PyObject * gdb_py_generic_dict ( PyObject * self,
void * closure )

Definition at line 317 of file py-utils.c.

◆ gdb_py_int_as_long()

int gdb_py_int_as_long ( PyObject * obj,
long * result )

◆ gdb_py_object_from_longest()

gdbpy_ref gdb_py_object_from_longest ( LONGEST l)

◆ gdb_py_object_from_ulongest()

gdbpy_ref gdb_py_object_from_ulongest ( ULONGEST l)

◆ gdb_pymodule_addobject()

int gdb_pymodule_addobject ( PyObject * module,
const char * name,
PyObject * object )

◆ gdbpy_convert_exception()

void gdbpy_convert_exception ( const struct gdb_exception & exception)

◆ gdbpy_error()

void gdbpy_error ( const char * fmt,
... )

Definition at line 348 of file py-utils.c.

Referenced by py_object_to_mi_key(), and serialize_mi_result().

◆ gdbpy_fix_doc_string_indentation()

gdb::unique_xmalloc_ptr< char > gdbpy_fix_doc_string_indentation ( gdb::unique_xmalloc_ptr< char > doc)

Definition at line 410 of file py-utils.c.

Referenced by cmdpy_init(), and get_doc_string().

◆ gdbpy_handle_exception()

void gdbpy_handle_exception ( )

◆ gdbpy_is_string()

int gdbpy_is_string ( PyObject * obj)

◆ gdbpy_obj_to_string()

gdb::unique_xmalloc_ptr< char > gdbpy_obj_to_string ( PyObject * obj)

◆ get_addr_from_python()

int get_addr_from_python ( PyObject * obj,
CORE_ADDR * addr )

◆ host_string_to_python_string()

gdbpy_ref host_string_to_python_string ( const char * str)

◆ python_string_to_host_string()

gdb::unique_xmalloc_ptr< char > python_string_to_host_string ( PyObject * obj)

◆ python_string_to_target_python_string()

gdbpy_ref python_string_to_target_python_string ( PyObject * obj)

Definition at line 129 of file py-utils.c.

References python_string_to_unicode(), and unicode_to_target_python_string().

Referenced by print_string_repr().

◆ python_string_to_target_string()

gdb::unique_xmalloc_ptr< char > python_string_to_target_string ( PyObject * obj)

◆ python_string_to_unicode()

gdbpy_ref python_string_to_unicode ( PyObject * obj)

◆ unicode_to_encoded_python_string()

static gdbpy_ref unicode_to_encoded_python_string ( PyObject * unicode_str,
const char * charset )
static

Definition at line 80 of file py-utils.c.

Referenced by unicode_to_target_python_string().

◆ unicode_to_encoded_string()

static gdb::unique_xmalloc_ptr< char > unicode_to_encoded_string ( PyObject * unicode_str,
const char * charset )
static

Definition at line 64 of file py-utils.c.

References get().

Referenced by python_string_to_host_string(), and unicode_to_target_string().

◆ unicode_to_target_python_string()

static gdbpy_ref unicode_to_target_python_string ( PyObject * unicode_str)
static

◆ unicode_to_target_string()

gdb::unique_xmalloc_ptr< char > unicode_to_target_string ( PyObject * unicode_str)