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

Go to the source code of this file.

Functions

static void py_decref (void *p)
 
struct cleanupmake_cleanup_py_decref (PyObject *py)
 
static void py_xdecref (void *p)
 
struct cleanupmake_cleanup_py_xdecref (PyObject *py)
 
PyObject * python_string_to_unicode (PyObject *obj)
 
static char * unicode_to_encoded_string (PyObject *unicode_str, const char *charset)
 
static PyObject * unicode_to_encoded_python_string (PyObject *unicode_str, const char *charset)
 
char * unicode_to_target_string (PyObject *unicode_str)
 
static PyObject * unicode_to_target_python_string (PyObject *unicode_str)
 
char * python_string_to_target_string (PyObject *obj)
 
PyObject * python_string_to_target_python_string (PyObject *obj)
 
char * python_string_to_host_string (PyObject *obj)
 
int gdbpy_is_string (PyObject *obj)
 
char * gdbpy_obj_to_string (PyObject *obj)
 
char * gdbpy_exception_to_string (PyObject *ptype, PyObject *pvalue)
 
void gdbpy_convert_exception (struct gdb_exception exception)
 
int get_addr_from_python (PyObject *obj, CORE_ADDR *addr)
 
PyObject * gdb_py_object_from_longest (LONGEST l)
 
PyObject * gdb_py_object_from_ulongest (ULONGEST l)
 
int gdb_py_int_as_long (PyObject *obj, long *result)
 
PyObject * gdb_py_generic_dict (PyObject *self, void *closure)
 
int gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object)
 

Function Documentation

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

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

int gdb_py_int_as_long ( PyObject *  obj,
long *  result 
)
PyObject* gdb_py_object_from_longest ( LONGEST  l)
PyObject* gdb_py_object_from_ulongest ( ULONGEST  l)

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

Referenced by blpy_get_end(), and blpy_get_start().

int gdb_pymodule_addobject ( PyObject *  module,
const char *  name,
PyObject *  object 
)
void gdbpy_convert_exception ( struct gdb_exception  exception)
char* gdbpy_exception_to_string ( PyObject *  ptype,
PyObject *  pvalue 
)
int gdbpy_is_string ( PyObject *  obj)
char* gdbpy_obj_to_string ( PyObject *  obj)
int get_addr_from_python ( PyObject *  obj,
CORE_ADDR addr 
)
struct cleanup* make_cleanup_py_decref ( PyObject *  py)
struct cleanup* make_cleanup_py_xdecref ( PyObject *  py)

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

References make_cleanup(), and py_xdecref().

Referenced by py_mi_print_variables(), py_print_args(), and py_print_locals().

static void py_decref ( void *  p)
static

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

References Py_DECREF.

Referenced by make_cleanup_py_decref().

static void py_xdecref ( void *  p)
static

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

Referenced by make_cleanup_py_xdecref().

char* python_string_to_host_string ( PyObject *  obj)
PyObject* python_string_to_target_python_string ( PyObject *  obj)

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

References Py_DECREF, python_string_to_unicode(), and unicode_to_target_python_string().

Referenced by print_string_repr().

char* python_string_to_target_string ( PyObject *  obj)
PyObject* python_string_to_unicode ( PyObject *  obj)
static PyObject* unicode_to_encoded_python_string ( PyObject *  unicode_str,
const char *  charset 
)
static

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

Referenced by unicode_to_target_python_string().

static char* unicode_to_encoded_string ( PyObject *  unicode_str,
const char *  charset 
)
static

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

References Py_DECREF, and string.

Referenced by python_string_to_host_string(), and unicode_to_target_string().

static PyObject* unicode_to_target_python_string ( PyObject *  unicode_str)
static
char* unicode_to_target_string ( PyObject *  unicode_str)

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

References python_gdbarch, target_charset(), and unicode_to_encoded_string().

Referenced by python_string_to_target_string().