diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-10-13 13:24:36 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-10-13 13:24:36 +0000 |
commit | 2d72b617c4080b4f6ad82c0212ecedd90042a289 (patch) | |
tree | 4f43b63f8c95d3e5bf6f4d8712c98e30484d3151 /gdb/varobj.c | |
parent | d66549fedb7aba7ab755452e068cc3cdb3525739 (diff) | |
download | gdb-2d72b617c4080b4f6ad82c0212ecedd90042a289.tar.gz |
gdb/
* python/py-breakpoint.c (bppy_set_condition): New comment.
* python/py-cmd.c (cmdpy_function): Call also gdbpy_print_stack for
failed PyUnicode_Decode.
(cmdpy_completer): Skip element for failed
python_string_to_host_string.
(cmdpy_init): Return -1 on failed python_string_to_host_string.
* python/py-frame.c (frapy_read_var): Extend the function comment.
* python/py-function.c (fnpy_init): Return -1 on failed
python_string_to_host_string.
* python/py-inferior.c (infpy_read_memory, infpy_write_memory): Extend
the function comment.
(infpy_search_memory): Extend the function comment. Remove the
PyErr_SetString call on already set error state.
* python/py-param.c (set_parameter_value): Extend the function
comment. Return -1 on failed python_string_to_host_string, twice.
(set_attr): Extend the function comment.
(compute_enum_values): Extend the function comment. New variable
back_to. Protect self->enumeration by BACK_TO cleanups. Return 0 on
failed python_string_to_host_string.
(get_doc_string): Call gdbpy_print_stack on failed
python_string_to_host_string.
(parmpy_init): Extend the function comment.
* python/py-prettyprint.c (pretty_print_one_value): Likewise.
(gdbpy_get_display_hint, print_children): Call gdbpy_print_stack on
failed python_string_to_host_string.
* python/py-value.c (valpy_new, valpy_getitem, valpy_call)
(valpy_binop, valpy_richcompare): Extend the function comment.
* python/python.c
(struct python_env) <error_type, error_value, error_traceback>: New
fields.
(restore_python_env): Handle PyErr_Occurred. Call PyErr_Restore.
(ensure_python_env): Call PyErr_Fetch.
* varobj.c (update_dynamic_varobj_children): Call gdbpy_print_stack on
failed convert_value_from_python.
(value_get_print_value): Call gdbpy_print_stack on failed
python_string_to_target_python_string.
gdb/testsuite/
* gdb.python/py-error.exp: New file.
* gdb.python/py-error.py: New file.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index 56cb8ae90c1..e56bbf71de8 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1052,6 +1052,8 @@ update_dynamic_varobj_children (struct varobj *var, error (_("Invalid item from the child list")); v = convert_value_from_python (py_v); + if (v == NULL) + gdbpy_print_stack (); install_dynamic_child (var, can_mention ? changed : NULL, can_mention ? new : NULL, can_mention ? unchanged : NULL, @@ -2540,6 +2542,8 @@ value_get_print_value (struct value *value, enum varobj_display_formats format, type = builtin_type (gdbarch)->builtin_char; Py_DECREF (py_str); } + else + gdbpy_print_stack (); } Py_DECREF (output); } |