]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2010-11-18 Phil Muldoon <pmuldoon@redhat.com>
authorPhil Muldoon <pmuldoon@redhat.com>
Thu, 18 Nov 2010 14:40:30 +0000 (14:40 +0000)
committerPhil Muldoon <pmuldoon@redhat.com>
Thu, 18 Nov 2010 14:40:30 +0000 (14:40 +0000)
     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  <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.

gdb/ChangeLog
gdb/mi/mi-cmd-stack.c
gdb/testsuite/ChangeLog

index b224cf69acb4b3d6f8f62e9bb803280cceb1627f..93a1853f73565fc0041fd9fc4a1a82ec3b1e5272 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-18  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-11-12  Marc Khouzam  <marc.khouzam@ericsson.com>
 
        * mi/mi-main.c (mi_cmd_target_detach): Accept new
index 67970558c0d7f8f1ae70330b2f2c211efc560fc1..7ee075cb8b2a98270129dfcdf831256d5cdc0cd8 100644 (file)
@@ -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;
index 0f46bbfdd6134766108b2ce4aa33d3488e67809b..cb55849e846e24f8b1d0900441bb9d7b0dfb96c4 100644 (file)
@@ -1,3 +1,12 @@
+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.