gdb: Remove a non-const reference parameter
[deliverable/binutils-gdb.git] / gdb / python / py-framefilter.c
index 7f416cb6d30e720458f1e7c7300046e297ede4ca..a351ac5aec879c5d1995ef62598067dffee0ba3f 100644 (file)
@@ -30,7 +30,7 @@
 #include "demangle.h"
 #include "mi/mi-cmds.h"
 #include "python-internal.h"
-#include "common/gdb_optional.h"
+#include "gdbsupport/gdb_optional.h"
 
 enum mi_print_types
 {
@@ -54,7 +54,7 @@ enum mi_print_types
 
 static enum ext_lang_bt_status
 extract_sym (PyObject *obj, gdb::unique_xmalloc_ptr<char> *name,
-            struct symbol **sym, struct block **sym_block,
+            struct symbol **sym, const struct block **sym_block,
             const struct language_defn **language)
 {
   gdbpy_ref<> result (PyObject_CallMethod (obj, "symbol", NULL));
@@ -449,7 +449,7 @@ enumerate_args (PyObject *iter,
       const struct language_defn *language;
       gdb::unique_xmalloc_ptr<char> sym_name;
       struct symbol *sym;
-      struct block *sym_block;
+      const struct block *sym_block;
       struct value *val;
       enum ext_lang_bt_status success = EXT_LANG_BT_ERROR;
 
@@ -481,7 +481,8 @@ enumerate_args (PyObject *iter,
              return EXT_LANG_BT_ERROR;
            }
 
-         read_frame_arg (sym, frame, &arg, &entryarg);
+         read_frame_arg (user_frame_print_options,
+                         sym, frame, &arg, &entryarg);
 
          gdb::unique_xmalloc_ptr<char> arg_holder (arg.error);
          gdb::unique_xmalloc_ptr<char> entry_holder (entryarg.error);
@@ -567,7 +568,7 @@ enumerate_locals (PyObject *iter,
       struct value *val;
       enum ext_lang_bt_status success = EXT_LANG_BT_ERROR;
       struct symbol *sym;
-      struct block *sym_block;
+      const struct block *sym_block;
       int local_indent = 8 + (8 * indent);
       gdb::optional<ui_out_emit_tuple> tuple;
 
@@ -1081,16 +1082,15 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
   if (!gdb_python_initialized)
     return EXT_LANG_BT_NO_FILTERS;
 
-  TRY
+  try
     {
       gdbarch = get_frame_arch (frame);
     }
-  CATCH (except, RETURN_MASK_ERROR)
+  catch (const gdb_exception_error &except)
     {
       /* Let gdb try to print the stack trace.  */
       return EXT_LANG_BT_NO_FILTERS;
     }
-  END_CATCH
 
   gdbpy_enter enter_py (gdbarch, current_language);
 
@@ -1166,17 +1166,16 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
            }
        }
 
-      TRY
+      try
        {
          success = py_print_frame (item.get (), flags, args_type, out, 0,
                                    levels_printed.get ());
        }
-      CATCH (except, RETURN_MASK_ERROR)
+      catch (const gdb_exception_error &except)
        {
          gdbpy_convert_exception (except);
          success = EXT_LANG_BT_ERROR;
        }
-      END_CATCH
 
       /* Do not exit on error printing a single frame.  Print the
         error and continue with other frames.  */
This page took 0.024488 seconds and 4 git commands to generate.