aboutsummaryrefslogtreecommitdiff
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
commit9dc5e2a93611891cdef625066665571ee0007d07 (patch)
treebaa6097f28affd552596446f3d31c404b50c3da2 /gdb/ui-out.h
parent7fb088be89cfb0c624cb9e4498808d69e1719568 (diff)
downloadgdb-9dc5e2a93611891cdef625066665571ee0007d07.zip
gdb-9dc5e2a93611891cdef625066665571ee0007d07.tar.gz
gdb-9dc5e2a93611891cdef625066665571ee0007d07.tar.bz2
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 e71c291..797c2fe 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);