From: Andrew Cagney Date: Mon, 30 Sep 2002 20:18:52 +0000 (+0000) Subject: 2002-09-29 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7ec4050c5b4bcb43dc3e225157cc0e37605b5f0;p=binutils-gdb.git 2002-09-29 Andrew Cagney * mi-out.c (mi_version): New function. * mi-out.h (mi_version): Declare. --- diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog index 86bec4a0632..dca5af32e5e 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,3 +1,8 @@ +2002-09-29 Andrew Cagney + + * mi-out.c (mi_version): New function. + * mi-out.h (mi_version): Declare. + 2002-09-27 Andrew Cagney From 2002-07-12 Mo DeJong diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index 947720bc10c..f7ed7ecfbdc 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 1ae693f4761..817f2eb53b9 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 */