struct tl_interp_info;
+/* Prompt state. */
+
+enum prompt_state
+{
+ /* The command line is blocked simulating synchronous execution.
+ This is used to implement the foreground execution commands
+ ('run', 'continue', etc.). We won't display the prompt and
+ accept further commands until the execution is actually over. */
+ PROMPT_BLOCKED,
+
+ /* The command finished; display the prompt before returning back to
+ the top level. */
+ PROMPT_NEEDED,
+
+ /* We've displayed the prompt already, ready for input. */
+ PROMPTED,
+};
+
/* All about a user interface instance. Each user interface has its
own I/O files/streams, readline state, its own top level
interpreter (for the main UI, this is the interpreter specified
processing. */
void (*input_handler) (char *);
+ /* True if this UI is using the readline library for command
+ editing; false if using GDB's own simple readline emulation, with
+ no editing support. */
+ int command_editing;
+
/* Each UI has its own independent set of interpreters. */
struct ui_interp_info *interp_info;
"start" -ex "next"') are processed. */
int async;
+ /* The number of nested readline secondary prompts that are
+ currently active. */
+ int secondary_prompt_depth;
+
/* stdio stream that command input is being read from. Set to stdin
normally. Set by source_command to the file we are sourcing.
Set to NULL if we are executing a user-defined command or
it with the event loop. */
int input_fd;
+ /* See enum prompt_state's description. */
+ enum prompt_state prompt_state;
+
/* The fields below that start with "m_" are "private". They're
meant to be accessed through wrapper macros that make them look
like globals. */
*_unfiltered. In the very near future that restriction shall be
removed - either call shall be unfiltered. (cagney 1999-06-13). */
struct ui_file *m_gdb_stdlog;
+
+ /* The current ui_out. */
+ struct ui_out *m_current_uiout;
};
/* The main UI. This is the UI that is bound to stdin/stdout/stderr.
switch_thru_all_uis_cond (&STATE); \
switch_thru_all_uis_next (&STATE))
+/* Traverse over all UIs. */
+#define ALL_UIS(UI) \
+ for (UI = ui_list; UI; UI = UI->next) \
+
+/* Cleanup that restores the current UI. */
+extern void restore_ui_cleanup (void *data);
+
/* From top.c. */
extern char *saved_command_line;
extern int in_user_command;
by gdb for its command prompt. */
extern void set_prompt (const char *s);
-/* Return 1 if the current input handler is a secondary prompt, 0 otherwise. */
+/* Return 1 if UI's current input handler is a secondary prompt, 0
+ otherwise. */
-extern int gdb_in_secondary_prompt_p (void);
+extern int gdb_in_secondary_prompt_p (struct ui *ui);
/* From random places. */
extern int readnow_symbol_files;