aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-09-30 20:18:52 +0000
committerAndrew Cagney <cagney@redhat.com>2002-09-30 20:18:52 +0000
commitc7ec4050c5b4bcb43dc3e225157cc0e37605b5f0 (patch)
treea330dfcb51dda44c514af58d6b8452396d3a2dd4 /gdb/mi
parent30458d39d6f791293f844ab9f75c4f465d52e74c (diff)
downloadgdb-c7ec4050c5b4bcb43dc3e225157cc0e37605b5f0.zip
gdb-c7ec4050c5b4bcb43dc3e225157cc0e37605b5f0.tar.gz
gdb-c7ec4050c5b4bcb43dc3e225157cc0e37605b5f0.tar.bz2
2002-09-29 Andrew Cagney <ac131313@redhat.com>
* mi-out.c (mi_version): New function. * mi-out.h (mi_version): Declare.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/ChangeLog5
-rw-r--r--gdb/mi/mi-out.c9
-rw-r--r--gdb/mi/mi-out.h3
3 files changed, 17 insertions, 0 deletions
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 86bec4a..dca5af3 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-29 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-out.c (mi_version): New function.
+ * mi-out.h (mi_version): Declare.
+
2002-09-27 Andrew Cagney <ac131313@redhat.com>
From 2002-07-12 Mo DeJong <supermo@bayarea.net>
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index 947720b..f7ed7ec 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -428,6 +428,15 @@ mi_out_put (struct ui_out *uiout,
ui_file_rewind (data->buffer);
}
+/* Current MI version. */
+
+int
+mi_version (struct ui_out *uiout)
+{
+ struct ui_out_data *data = ui_out_data (uiout);
+ return data->mi_version;
+}
+
/* initalize private members at startup */
struct ui_out *
diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h
index 1ae693f..817f2eb 100644
--- a/gdb/mi/mi-out.h
+++ b/gdb/mi/mi-out.h
@@ -30,4 +30,7 @@ extern void mi_out_put (struct ui_out *uiout, struct ui_file *stream);
extern void mi_out_rewind (struct ui_out *uiout);
extern void mi_out_buffered (struct ui_out *uiout, char *string);
+/* Return the version number of the current MI. */
+extern int mi_version (struct ui_out *uiout);
+
#endif /* MI_OUT_H */