Home | History | Annotate | Line # | Download | only in mi
mi-interp.h revision 1.1.1.4
      1      1.1  christos /* MI Interpreter Definitions and Commands for GDB, the GNU debugger.
      2      1.1  christos 
      3  1.1.1.4  christos    Copyright (C) 2017-2023 Free Software Foundation, Inc.
      4      1.1  christos 
      5      1.1  christos    This file is part of GDB.
      6      1.1  christos 
      7      1.1  christos    This program is free software; you can redistribute it and/or modify
      8      1.1  christos    it under the terms of the GNU General Public License as published by
      9      1.1  christos    the Free Software Foundation; either version 3 of the License, or
     10      1.1  christos    (at your option) any later version.
     11      1.1  christos 
     12      1.1  christos    This program is distributed in the hope that it will be useful,
     13      1.1  christos    but WITHOUT ANY WARRANTY; without even the implied warranty of
     14      1.1  christos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15      1.1  christos    GNU General Public License for more details.
     16      1.1  christos 
     17      1.1  christos    You should have received a copy of the GNU General Public License
     18      1.1  christos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
     19      1.1  christos 
     20  1.1.1.2  christos #ifndef MI_MI_INTERP_H
     21  1.1.1.2  christos #define MI_MI_INTERP_H
     22      1.1  christos 
     23  1.1.1.4  christos #include "interps.h"
     24  1.1.1.4  christos 
     25  1.1.1.4  christos struct mi_console_file;
     26  1.1.1.4  christos 
     27  1.1.1.4  christos /* An MI interpreter.  */
     28  1.1.1.4  christos 
     29  1.1.1.4  christos class mi_interp final : public interp
     30  1.1.1.4  christos {
     31  1.1.1.4  christos public:
     32  1.1.1.4  christos   mi_interp (const char *name)
     33  1.1.1.4  christos     : interp (name)
     34  1.1.1.4  christos   {}
     35  1.1.1.4  christos 
     36  1.1.1.4  christos   void init (bool top_level) override;
     37  1.1.1.4  christos   void resume () override;
     38  1.1.1.4  christos   void suspend () override;
     39  1.1.1.4  christos   gdb_exception exec (const char *command_str) override;
     40  1.1.1.4  christos   ui_out *interp_ui_out () override;
     41  1.1.1.4  christos   void set_logging (ui_file_up logfile, bool logging_redirect,
     42  1.1.1.4  christos 		    bool debug_redirect) override;
     43  1.1.1.4  christos   void pre_command_loop () override;
     44  1.1.1.4  christos 
     45  1.1.1.4  christos   /* MI's output channels */
     46  1.1.1.4  christos   mi_console_file *out;
     47  1.1.1.4  christos   mi_console_file *err;
     48  1.1.1.4  christos   mi_console_file *log;
     49  1.1.1.4  christos   mi_console_file *targ;
     50  1.1.1.4  christos   mi_console_file *event_channel;
     51  1.1.1.4  christos 
     52  1.1.1.4  christos   /* Raw console output.  */
     53  1.1.1.4  christos   struct ui_file *raw_stdout;
     54  1.1.1.4  christos 
     55  1.1.1.4  christos   /* Save the original value of raw_stdout here when logging, and the
     56  1.1.1.4  christos      file which we need to delete, so we can restore correctly when
     57  1.1.1.4  christos      done.  */
     58  1.1.1.4  christos   struct ui_file *saved_raw_stdout;
     59  1.1.1.4  christos   ui_file_up logfile_holder;
     60  1.1.1.4  christos   ui_file_up stdout_holder;
     61  1.1.1.4  christos 
     62  1.1.1.4  christos   /* MI's builder.  */
     63  1.1.1.4  christos   struct ui_out *mi_uiout;
     64  1.1.1.4  christos 
     65  1.1.1.4  christos   /* MI's CLI builder (wraps OUT).  */
     66  1.1.1.4  christos   struct ui_out *cli_uiout;
     67  1.1.1.4  christos };
     68  1.1.1.4  christos 
     69      1.1  christos /* Output the shared object attributes to UIOUT.  */
     70      1.1  christos 
     71      1.1  christos void mi_output_solib_attribs (ui_out *uiout, struct so_list *solib);
     72      1.1  christos 
     73  1.1.1.2  christos #endif /* MI_MI_INTERP_H */
     74