Remove EXT_LANG_BT_COMPLETED
authorTom Tromey <tom@tromey.com>
Sun, 23 Apr 2017 17:07:26 +0000 (11:07 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 27 Mar 2018 03:57:11 +0000 (21:57 -0600)
While looking at the frame filter code, I noticed that
EXT_LANG_BT_COMPLETED is not really needed.  Semantically there is no
difference between the "completed" and "ok" results.  So, this patch
removes this constant.

gdb/ChangeLog
2018-03-26  Tom Tromey  <tom@tromey.com>

* python/py-framefilter.c (py_print_frame): Return
EXT_LANG_BT_OK.
(gdbpy_apply_frame_filter): Update comment.
* extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
Remove.
<EXT_LANG_BT_NO_FILTERS>: Change value.

gdb/ChangeLog
gdb/extension.h
gdb/python/py-framefilter.c

index 8f8059335c017eb6281c141219f56e51791fd72b..ed5d5bedcb194ce505a4c3fa2a50d659558863b1 100644 (file)
@@ -1,3 +1,12 @@
+2018-03-26  Tom Tromey  <tom@tromey.com>
+
+       * python/py-framefilter.c (py_print_frame): Return
+       EXT_LANG_BT_OK.
+       (gdbpy_apply_frame_filter): Update comment.
+       * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
+       Remove.
+       <EXT_LANG_BT_NO_FILTERS>: Change value.
+
 2018-03-26  Tom Tromey  <tom@tromey.com>
 
        PR backtrace/15582:
index a97292875a64f98b580e6e3a89c22e9516c1e25c..c675ae24463c4c19f403956de55856215a452bd5 100644 (file)
@@ -76,13 +76,9 @@ enum ext_lang_bt_status
        succeeded.  */
     EXT_LANG_BT_OK = 1,
 
-    /* Return when the frame filter process is complete, and all
-       operations have succeeded.  */
-    EXT_LANG_BT_COMPLETED = 2,
-
     /* Return when the frame filter process is complete, but there
        were no filter registered and enabled to process.  */
-    EXT_LANG_BT_NO_FILTERS = 3
+    EXT_LANG_BT_NO_FILTERS = 2
   };
 
 /* Flags to pass to apply_extlang_frame_filter.  */
index aae8d5decf1720bdaa0d6a9ba98f6edd3fb560f1..1dc15ae14e4f7f709065718514e0a9f3efb6a7bb 100644 (file)
@@ -916,7 +916,7 @@ py_print_args (PyObject *filter,
     containing all the frames level that have already been printed.
     If a frame level has been printed, do not print it again (in the
     case of elided frames).  Returns EXT_LANG_BT_ERROR on error, with any
-    GDB exceptions converted to a Python exception, or EXT_LANG_BT_COMPLETED
+    GDB exceptions converted to a Python exception, or EXT_LANG_BT_OK
     on success.  It can also throw an exception RETURN_QUIT.  */
 
 static enum ext_lang_bt_status
@@ -969,7 +969,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
       if (py_mi_print_variables (filter, out, &opts,
                                 args_type, frame) == EXT_LANG_BT_ERROR)
        return EXT_LANG_BT_ERROR;
-      return EXT_LANG_BT_COMPLETED;
+      return EXT_LANG_BT_OK;
     }
 
   gdb::optional<ui_out_emit_tuple> tuple;
@@ -1270,7 +1270,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
        }
     }
 
-  return EXT_LANG_BT_COMPLETED;
+  return EXT_LANG_BT_OK;
 }
 
 /* Helper function to initiate frame filter invocation at starting
@@ -1328,7 +1328,7 @@ bootstrap_python_frame_filters (struct frame_info *frame,
     format, OUT is the output stream to print.  FRAME_LOW is the
     beginning of the slice of frames to print, and FRAME_HIGH is the
     upper limit of the frames to count.  Returns EXT_LANG_BT_ERROR on error,
-    or EXT_LANG_BT_COMPLETED on success.  */
+    or EXT_LANG_BT_OK on success.  */
 
 enum ext_lang_bt_status
 gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
This page took 0.042328 seconds and 4 git commands to generate.