|
GDB (xrefs)
|
#include "defs.h"#include "block.h"#include "exceptions.h"#include "frame.h"#include "symtab.h"#include "python-internal.h"#include "objfiles.h"Go to the source code of this file.
| #define SYMPY_REQUIRE_VALID | ( | symbol_obj, | |
| symbol | |||
| ) |
do { \ symbol = symbol_object_to_symbol (symbol_obj); \ if (symbol == NULL) \ { \ PyErr_SetString (PyExc_RuntimeError, \ _("Symbol is invalid.")); \ return NULL; \ } \ } while (0)
Definition at line 42 of file py-symbol.c.
Referenced by sympy_get_addr_class(), sympy_get_linkage_name(), sympy_get_name(), sympy_get_print_name(), sympy_get_symtab(), sympy_get_type(), sympy_is_argument(), sympy_is_constant(), sympy_is_function(), sympy_is_variable(), sympy_line(), sympy_needs_frame(), sympy_str(), and sympy_value().
| typedef struct sympy_symbol_object symbol_object |
| static void del_objfile_symbols | ( | struct objfile * | objfile, |
| void * | datum | ||
| ) | [static] |
Definition at line 462 of file py-symbol.c.
References sympy_symbol_object::next, sympy_symbol_object::prev, and sympy_symbol_object::symbol.
Referenced by gdbpy_initialize_symbols().
| int gdbpy_initialize_symbols | ( | void | ) |
Definition at line 478 of file py-symbol.c.
References del_objfile_symbols(), FUNCTIONS_DOMAIN, gdb_module, gdb_pymodule_addobject(), LABEL_DOMAIN, LOC_ARG, LOC_BLOCK, LOC_COMPUTED, LOC_CONST, LOC_CONST_BYTES, LOC_LABEL, LOC_LOCAL, LOC_OPTIMIZED_OUT, LOC_REF_ARG, LOC_REGISTER, LOC_REGPARM_ADDR, LOC_STATIC, LOC_TYPEDEF, LOC_UNDEF, LOC_UNRESOLVED, STRUCT_DOMAIN, symbol_object_type, sympy_objfile_data_key, TYPES_DOMAIN, UNDEF_DOMAIN, VAR_DOMAIN, and VARIABLES_DOMAIN.
Referenced by _initialize_python().
| PyObject* gdbpy_lookup_global_symbol | ( | PyObject * | self, |
| PyObject * | args, | ||
| PyObject * | kw | ||
| ) |
Definition at line 422 of file py-symbol.c.
References GDB_PY_HANDLE_EXCEPTION, lookup_symbol_global(), name, RETURN_MASK_ALL, symbol_to_symbol_object(), TRY_CATCH, and VAR_DOMAIN.
| PyObject* gdbpy_lookup_symbol | ( | PyObject * | self, |
| PyObject * | args, | ||
| PyObject * | kw | ||
| ) |
Definition at line 355 of file py-symbol.c.
References _, block_object_to_block(), block_object_type, GDB_PY_HANDLE_EXCEPTION, get_frame_block(), get_selected_frame(), lookup_symbol(), name, Py_DECREF, RETURN_MASK_ALL, selected_frame, symbol_to_symbol_object(), TRY_CATCH, field_of_this_result::type, and VAR_DOMAIN.
| static void set_symbol | ( | symbol_object * | obj, |
| struct symbol * | symbol | ||
| ) | [static] |
Definition at line 290 of file py-symbol.c.
References sympy_symbol_object::next, sympy_symbol_object::prev, sympy_symbol_object::symbol, SYMBOL_SYMTAB, and sympy_objfile_data_key.
Referenced by symbol_to_symbol_object().
| struct symbol* symbol_object_to_symbol | ( | PyObject * | obj | ) | [read] |
Definition at line 324 of file py-symbol.c.
References symbol_object_type.
Referenced by extract_sym(), frapy_read_var(), and sympy_is_valid().
| PyObject* symbol_to_symbol_object | ( | struct symbol * | sym | ) |
Definition at line 311 of file py-symbol.c.
References set_symbol(), and symbol_object_type.
Referenced by blpy_block_syms_iternext(), blpy_get_function(), frapy_function(), gdbpy_lookup_global_symbol(), and gdbpy_lookup_symbol().
| static void sympy_dealloc | ( | PyObject * | obj | ) | [static] |
Definition at line 332 of file py-symbol.c.
References sympy_symbol_object::next, sympy_symbol_object::prev, sympy_symbol_object::symbol, SYMBOL_SYMTAB, and sympy_objfile_data_key.
| static PyObject* sympy_get_addr_class | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 125 of file py-symbol.c.
References SYMBOL_CLASS, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_get_linkage_name | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 105 of file py-symbol.c.
References SYMBOL_LINKAGE_NAME, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_get_name | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 95 of file py-symbol.c.
References SYMBOL_NATURAL_NAME, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_get_print_name | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 115 of file py-symbol.c.
References SYMPY_REQUIRE_VALID, and sympy_str().
| static PyObject* sympy_get_symtab | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 85 of file py-symbol.c.
References SYMBOL_SYMTAB, SYMPY_REQUIRE_VALID, and symtab_to_symtab_object().
| static PyObject* sympy_get_type | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 69 of file py-symbol.c.
References SYMBOL_TYPE, SYMPY_REQUIRE_VALID, and type_to_type_object().
| static PyObject* sympy_is_argument | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 135 of file py-symbol.c.
References SYMBOL_IS_ARGUMENT, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_is_constant | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 145 of file py-symbol.c.
References LOC_CONST, LOC_CONST_BYTES, SYMBOL_CLASS, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_is_function | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 158 of file py-symbol.c.
References LOC_BLOCK, SYMBOL_CLASS, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_is_valid | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 226 of file py-symbol.c.
References symbol_object_to_symbol().
| static PyObject* sympy_is_variable | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 171 of file py-symbol.c.
References LOC_COMPUTED, LOC_LOCAL, LOC_OPTIMIZED_OUT, LOC_REGISTER, LOC_STATIC, SYMBOL_CLASS, SYMBOL_IS_ARGUMENT, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_line | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 213 of file py-symbol.c.
References SYMBOL_LINE, and SYMPY_REQUIRE_VALID.
| static PyObject* sympy_needs_frame | ( | PyObject * | self, |
| void * | closure | ||
| ) | [static] |
Definition at line 190 of file py-symbol.c.
References GDB_PY_HANDLE_EXCEPTION, RETURN_MASK_ALL, symbol_read_needs_frame(), SYMPY_REQUIRE_VALID, and TRY_CATCH.
Definition at line 56 of file py-symbol.c.
References SYMBOL_PRINT_NAME, and SYMPY_REQUIRE_VALID.
Referenced by sympy_get_print_name().
| static PyObject* sympy_value | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 241 of file py-symbol.c.
References _, error(), frame_object_to_frame_info(), frame_object_type, GDB_PY_HANDLE_EXCEPTION, LOC_TYPEDEF, read_var_value(), RETURN_MASK_ALL, SYMBOL_CLASS, symbol_read_needs_frame(), SYMPY_REQUIRE_VALID, TRY_CATCH, and value_to_value_object().
PyGetSetDef symbol_object_getset[] [static] |
{
{ "type", sympy_get_type, NULL,
"Type of the symbol.", NULL },
{ "symtab", sympy_get_symtab, NULL,
"Symbol table in which the symbol appears.", NULL },
{ "name", sympy_get_name, NULL,
"Name of the symbol, as it appears in the source code.", NULL },
{ "linkage_name", sympy_get_linkage_name, NULL,
"Name of the symbol, as used by the linker (i.e., may be mangled).",
NULL },
{ "print_name", sympy_get_print_name, NULL,
"Name of the symbol in a form suitable for output.\n\
This is either name or linkage_name, depending on whether the user asked GDB\n\
to display demangled or mangled names.", NULL },
{ "addr_class", sympy_get_addr_class, NULL, "Address class of the symbol." },
{ "is_argument", sympy_is_argument, NULL,
"True if the symbol is an argument of a function." },
{ "is_constant", sympy_is_constant, NULL,
"True if the symbol is a constant." },
{ "is_function", sympy_is_function, NULL,
"True if the symbol is a function or method." },
{ "is_variable", sympy_is_variable, NULL,
"True if the symbol is a variable." },
{ "needs_frame", sympy_needs_frame, NULL,
"True if the symbol requires a frame for evaluation." },
{ "line", sympy_line, NULL,
"The source line number at which the symbol was defined." },
{ NULL }
}
Definition at line 540 of file py-symbol.c.
PyMethodDef symbol_object_methods[] [static] |
{
{ "is_valid", sympy_is_valid, METH_NOARGS,
"is_valid () -> Boolean.\n\
Return true if this symbol is valid, false if not." },
{ "value", sympy_value, METH_VARARGS,
"value ([frame]) -> gdb.Value\n\
Return the value of the symbol." },
{NULL}
}
Definition at line 570 of file py-symbol.c.
| PyTypeObject symbol_object_type |
Definition at line 580 of file py-symbol.c.
Referenced by frapy_read_var(), gdbpy_initialize_symbols(), symbol_object_to_symbol(), and symbol_to_symbol_object().
struct objfile_data* sympy_objfile_data_key [static] |
Definition at line 53 of file py-symbol.c.
Referenced by gdbpy_initialize_symbols(), set_symbol(), and sympy_dealloc().
1.7.6.1