OSDN Git Service

gdb
authortromey <tromey>
Sat, 13 Nov 2010 05:49:40 +0000 (05:49 +0000)
committertromey <tromey>
Sat, 13 Nov 2010 05:49:40 +0000 (05:49 +0000)
commit22ca1d290ff5ad91e1ce690eb90b3e35d1b7a543
tree77656e7e0a4c2d29a261baa2bfc8a7fd83f193b0
parent45294880e028ea0089ee1cd216cfc51a02999178
gdb
* varobj.c (value_get_print_value): Rearrange.  Pass stream to
apply_varobj_pretty_printer.
* c-lang.c: Include exceptions.h.
(c_get_string): Throw MEMORY_ERROR when appropriate.
* python/py-prettyprint.c (enum string_repr_result): New.
(print_stack_unless_memory_error): New function.
(print_string_repr): Change return type.  Use
print_stack_unless_memory_error.
(print_children): Use print_stack_unless_memory_error.
(apply_val_pretty_printer): Update.  Don't print children if
string representation threw an exception.
(apply_varobj_pretty_printer): Add 'stream' argument.  Use
print_stack_unless_memory_error.
* python/python.c (gdbpy_gdb_error, gdbpy_gdb_memory_error): New
globals.
(_initialize_python): Initialize them.
* python/python-internal.h (GDB_PY_HANDLE_EXCEPTION): Use
gdbpy_convert_exception.
(GDB_PY_SET_HANDLE_EXCEPTION): Likewise.
(gdbpy_gdb_error, gdbpy_gdb_memory_error): Declare.
(gdbpy_convert_exception): Declare.
(apply_varobj_pretty_printer): Update.
* python/py-utils.c (gdbpy_convert_exception): New function.
gdb/doc
* gdb.texinfo (Basic Python): Update.  Add xref.
(Exception Handling): Document new exception classes.
(Types In Python): Update.
(Frames In Python): Update.
gdb/testsuite
* gdb.python/py-prettyprint.c (main): Add new 'ns2' local.
* gdb.python/py-prettyprint.exp (run_lang_tests): Add test for
MemoryError.
* gdb.python/python.exp (gdb_py_test_multiple): Update exception
type.
* gdb.python/py-value.exp (test_value_in_inferior): Add test for
MemoryError.
(test_subscript_regression): Update exception type.
14 files changed:
gdb/ChangeLog
gdb/c-lang.c
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/python/py-prettyprint.c
gdb/python/py-utils.c
gdb/python/python-internal.h
gdb/python/python.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-prettyprint.c
gdb/testsuite/gdb.python/py-prettyprint.exp
gdb/testsuite/gdb.python/py-value.exp
gdb/testsuite/gdb.python/python.exp
gdb/varobj.c