diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2010-09-16 13:47:55 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2010-09-16 13:47:55 +0000 |
commit | 875b4ff565ff494986be7faf18f7fe575f5a5d2c (patch) | |
tree | 07d3f5ff3ef646e5aa7b24f0d4bca4e429b2d404 /gdb/mi | |
parent | d469f50fd0252d7b3f005f166d775fd8ba8d90ca (diff) | |
download | gdb-875b4ff565ff494986be7faf18f7fe575f5a5d2c.zip gdb-875b4ff565ff494986be7faf18f7fe575f5a5d2c.tar.gz gdb-875b4ff565ff494986be7faf18f7fe575f5a5d2c.tar.bz2 |
2010-09-16 Phil Muldoon <pmuldoon@redhat.com>
PR mi/11407
* mi/mi-cmd-stack.c (list_args_or_locals): Catch exceptions from
read_var_value and common_val_print and print a warning.
2010-09-16 Phil Muldoon <pmuldoon@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
PR mi/11407
* gdb.mi/dw2-ref-missing-frame-func.c: New File.
* gdb.mi/dw2-ref-missing-frame-main.c New File.
* gdb.mi/dw2-ref-missing-frame.S New File.
* gdb.mi/dw2-ref-missing-frame.exp New File.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-stack.c | 54 |
1 files changed, 37 insertions, 17 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 6797055..7ee075c 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -31,7 +31,7 @@ #include "gdb_string.h" #include "language.h" #include "valprint.h" - +#include "exceptions.h" enum what_to_list { locals, arguments, all }; @@ -334,27 +334,47 @@ list_args_or_locals (enum what_to_list what, int values, struct frame_info *fi) && TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_UNION) { - struct value_print_options opts; - - val = read_var_value (sym2, fi); - get_raw_print_options (&opts); - opts.deref_ref = 1; - common_val_print - (val, stb->stream, 0, &opts, - language_def (SYMBOL_LANGUAGE (sym2))); + volatile struct gdb_exception except; + + TRY_CATCH (except, RETURN_MASK_ERROR) + { + struct value_print_options opts; + + val = read_var_value (sym2, fi); + get_raw_print_options (&opts); + opts.deref_ref = 1; + common_val_print + (val, stb->stream, 0, &opts, + language_def (SYMBOL_LANGUAGE (sym2))); + } + if (except.reason < 0) + fprintf_filtered (stb->stream, + _("<error reading variable: %s>"), + except.message); + ui_out_field_stream (uiout, "value", stb); } break; case PRINT_ALL_VALUES: { - struct value_print_options opts; - - val = read_var_value (sym2, fi); - get_raw_print_options (&opts); - opts.deref_ref = 1; - common_val_print - (val, stb->stream, 0, &opts, - language_def (SYMBOL_LANGUAGE (sym2))); + volatile struct gdb_exception except; + + TRY_CATCH (except, RETURN_MASK_ERROR) + { + struct value_print_options opts; + + val = read_var_value (sym2, fi); + get_raw_print_options (&opts); + opts.deref_ref = 1; + common_val_print + (val, stb->stream, 0, &opts, + language_def (SYMBOL_LANGUAGE (sym2))); + } + if (except.reason < 0) + fprintf_filtered (stb->stream, + _("<error reading variable: %s>"), + except.message); + ui_out_field_stream (uiout, "value", stb); } break; |