summaryrefslogtreecommitdiff
path: root/gdb/ui-out.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-07-06 03:53:11 +0000
committerAndrew Cagney <cagney@redhat.com>2001-07-06 03:53:11 +0000
commita1226bf96dbb02eb2ef465363ee00cd34fed8120 (patch)
tree73a08e7502fb48ebc5abea390346d440dbd17d79 /gdb/ui-out.h
parent51d909187856db97afa04804d794ecbafcebc9f5 (diff)
downloadgdb-a1226bf96dbb02eb2ef465363ee00cd34fed8120.tar.gz
Replace:
if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0) with: if (ui_out_is_mi_like_p (uiout))
Diffstat (limited to 'gdb/ui-out.h')
-rw-r--r--gdb/ui-out.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index e71c291fcad..797c2fe960d 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -184,6 +184,13 @@ extern void gdb_error (struct ui_out *uiout, int severity, char *format, ...);
extern void gdb_query (struct ui_out *uiout, int qflags, char *qprompt);
#endif
+/* HACK: Code in GDB is currently checking to see the type of ui_out
+ builder when determining which output to produce. This function is
+ a hack to encapsulate that test. Once GDB manages to separate the
+ CLI/MI from the core of GDB the problem should just go away .... */
+
+extern int ui_out_is_mi_like_p (struct ui_out *uiout);
+
/* From here on we have things that are only needed by implementation
routines and main.c. We should pehaps have a separate file for that,
like a ui-out-impl.h file */
@@ -253,6 +260,7 @@ struct ui_out_impl
message_ftype *message;
wrap_hint_ftype *wrap_hint;
flush_ftype *flush;
+ int is_mi_like_p;
};
extern struct ui_out_data *ui_out_data (struct ui_out *uiout);