From: Phil Muldoon Date: Thu, 18 Nov 2010 14:40:30 +0000 (+0000) Subject: 2010-11-18 Phil Muldoon X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb4cfe82fd93ac12894421c7874025bf3e298055;p=thirdparty%2Fbinutils-gdb.git 2010-11-18 Phil Muldoon 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-11-18 Phil Muldoon Jan Kratochvil 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b224cf69acb..93a1853f735 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-11-18 Phil Muldoon + + 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-11-12 Marc Khouzam * mi/mi-main.c (mi_cmd_target_detach): Accept new diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 67970558c0d..7ee075cb8b2 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, + _(""), + 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, + _(""), + except.message); + ui_out_field_stream (uiout, "value", stb); } break; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0f46bbfdd61..cb55849e846 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2010-11-18 Phil Muldoon + Jan Kratochvil + + 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. + 2010-10-05 Jan Kratochvil * gdb.base/prelink-lib.c (copyreloc): New initialized variable.