Fix MI output for multi-location breakpoints
[deliverable/binutils-gdb.git] / gdb / mi / mi-main.c
index f4e5e48bc221cbd872537d20f7528f6c7b2ace88..065598517459fbffbba69a4662249e6500dafbc5 100644 (file)
@@ -2701,6 +2701,33 @@ mi_cmd_trace_frame_collected (const char *command, char **argv, int argc)
   }
 }
 
+/* Whether to use the fixed output when printing information about a
+   multi-location breakpoint (see PR 9659).  */
+
+static bool fix_multi_location_breakpoint_output = false;
+
+/* See mi/mi-main.h.  */
+
+void
+mi_cmd_fix_multi_location_breakpoint_output (const char *command, char **argv,
+                                            int argc)
+{
+  fix_multi_location_breakpoint_output = true;
+}
+
+/* See mi/mi-main.h.  */
+
+bool
+mi_multi_location_breakpoint_output_fixed (ui_out *uiout)
+{
+  mi_ui_out *mi_uiout = dynamic_cast<mi_ui_out *> (uiout);
+
+  if (mi_uiout == nullptr)
+    return false;
+
+  return mi_uiout->version () >= 3 || fix_multi_location_breakpoint_output;
+}
+
 void
 _initialize_mi_main (void)
 {
This page took 0.039461 seconds and 4 git commands to generate.