mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 02:37:23 +08:00
2010-02-24 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * python/python.c (_initialize_python): Call gdbpy_initialize_symtabs, gdbpy_initialize_symbols and gdbpy_initialize_blocks. * python/python-internal.h: Declare struct symbol, block and symtab_and_line. Declare block_object_type and symbol_object_type (gdbpy_lookup_symbol gdbpy_block_for_pc) (symtab_and_line_to_sal_object, symtab_to_symtab_object) (symbol_to_symbol_object, block_to_block_object) (gdbpy_initialize_symtabs,gdbpy_initialize_symbols) (gdbpy_initialize_blocks ): Declare. * python/py-frame.c (frapy_block, frapy_function, frapy_find_sal) (frapy_select): Add methods. (frapy_read_var): Add symbol branch. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-symbol, py-symtab, py-block. (SUBDIR_PYTHON_SRCS): Likewise. (py-symbol.o): New rule. (py-symtab.o): Likewise. (py-block.o): Likewise. * python/py-symbol.c: New file. * python/py-symtab.c: Likewise. * python/py-block.c: Likewise. 2010-02-24 Phil Muldoon <pmuldoon@redhat.com> * Makefile.in: Add py-block and py-symbol. * gdb.python/py-symbol.exp: New File. * gdb.python/py-symtab.exp: New File. * gdb.python/py-block.exp: New File. * gdb.python/py-symbol.c: New File. * gdb.python/py-block.c: New File. 2010-02-24 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Frames In Python): Add block, find_sal, function and select method descriptions. (Python API): Add Blocks In Python, Symbols in Python and Symbol Tables in Python to menu. (Blocks In Python): New node. (Symbols In Python): New node. (Symbol Tables in Python): New node.
This commit is contained in:
@ -644,6 +644,9 @@ Enables or disables auto-loading of Python code when an object is opened."),
|
||||
gdbpy_initialize_values ();
|
||||
gdbpy_initialize_frames ();
|
||||
gdbpy_initialize_commands ();
|
||||
gdbpy_initialize_symbols ();
|
||||
gdbpy_initialize_symtabs ();
|
||||
gdbpy_initialize_blocks ();
|
||||
gdbpy_initialize_functions ();
|
||||
gdbpy_initialize_types ();
|
||||
gdbpy_initialize_objfile ();
|
||||
@ -724,7 +727,14 @@ Return a string explaining unwind stop reason." },
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"lookup_type (name [, block]) -> type\n\
|
||||
Return a Type corresponding to the given name." },
|
||||
|
||||
{ "lookup_symbol", (PyCFunction) gdbpy_lookup_symbol,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"lookup_symbol (name [, block] [, domain]) -> (symbol, is_field_of_this)\n\
|
||||
Return a tuple with the symbol corresponding to the given name (or None) and\n\
|
||||
a boolean indicating if name is a field of the current implied argument\n\
|
||||
`this' (when the current language is object-oriented)." },
|
||||
{ "block_for_pc", gdbpy_block_for_pc, METH_VARARGS,
|
||||
"Return the block containing the given pc value, or None." },
|
||||
{ "parse_and_eval", gdbpy_parse_and_eval, METH_VARARGS,
|
||||
"parse_and_eval (String) -> Value.\n\
|
||||
Parse String as an expression, evaluate it, and return the result as a Value."
|
||||
|
Reference in New Issue
Block a user