#include "gdb_string.h"
#include "language.h"
#include "valprint.h"
-
+#include "exceptions.h"
enum what_to_list { locals, arguments, all };
&& 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;
+2010-11-18 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.
+
2010-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/prelink-lib.c (copyreloc): New initialized variable.