GDB (xrefs)
Functions
/home/stan/gdb/src/gdb/python/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)
PyObjectpython_string_to_unicode (PyObject *obj)
static char * unicode_to_encoded_string (PyObject *unicode_str, const char *charset)
static PyObjectunicode_to_encoded_python_string (PyObject *unicode_str, const char *charset)
char * unicode_to_target_string (PyObject *unicode_str)
static PyObjectunicode_to_target_python_string (PyObject *unicode_str)
char * python_string_to_target_string (PyObject *obj)
PyObjectpython_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)
PyObjectgdb_py_object_from_longest (LONGEST l)
PyObjectgdb_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)

Function Documentation

PyObject* gdb_py_generic_dict ( PyObject self,
void *  closure 
)

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

int gdb_py_int_as_long ( PyObject obj,
long *  result 
)

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

References LONGEST.

Definition at line 379 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 
)

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

References gdbpy_obj_to_string().

Referenced by cmdpy_function(), fnpy_call(), and update_dynamic_varobj_children().

char* gdbpy_obj_to_string ( PyObject obj)

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

References Py_DECREF, and python_string_to_host_string().

Referenced by gdbpy_exception_to_string().

int get_addr_from_python ( PyObject obj,
CORE_ADDR addr 
)
struct cleanup* make_cleanup_py_decref ( PyObject py) [read]
struct cleanup* make_cleanup_py_xdecref ( PyObject py) [read]

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().

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().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines