aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-09-13 18:26:31 +0000
committerAndrew Cagney <cagney@redhat.com>2004-09-13 18:26:31 +0000
commit362646f51708657cb5bc8886426a881f2fb56191 (patch)
treeb08c12976702c8773dc72e653058071808ab83be /gdb/mi
parent9c50426849f0e9bb15ab0b46dc18a70c1db38a90 (diff)
downloadgdb-362646f51708657cb5bc8886426a881f2fb56191.zip
gdb-362646f51708657cb5bc8886426a881f2fb56191.tar.gz
gdb-362646f51708657cb5bc8886426a881f2fb56191.tar.bz2
2004-09-13 Andrew Cagney <cagney@gnu.org>
Eliminate event_loop_p, always has the value 1. * defs.h (event_loop_p): Delete macro. * breakpoint.c (until_break_command): Simplify. * utils.c (prompt_for_continue): Simplify. * tracepoint.c (read_actions): Simplify. * top.c (throw_exception, execute_command, gdb_readline_wrapper) (gdb_rl_operate_and_get_next, command_line_input, get_prompt) (set_prompt, init_main): Simplify. (init_signals, disconnect): Delete, unused. * remote.c (remote_async_resume) (extended_remote_async_create_inferior): Simplify. * mi/mi-interp.c (mi_input): Delete, unused. (mi_interpreter_resume, mi_command_loop): Simplify. * interps.c (current_interp_command_loop): Simplify. * infrun.c (proceed): Simplify. * infcmd.c (run_command, continue_command, step_1, jump_command) (until_command, advance_command, finish_command) (interrupt_target_command): Simplify. * event-top.c (gdb_setup_readline, gdb_disable_readline): Simplify.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-interp.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 19dbda5..71abb75 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -51,7 +51,6 @@ struct mi_interp
/* These are the interpreter setup, etc. functions for the MI interpreter */
static void mi_execute_command_wrapper (char *cmd);
static void mi_command_loop (int mi_version);
-static char *mi_input (char *);
/* These are hooks that we put in place while doing interpreter_exec
so we can report interesting things that happened "behind the mi's
@@ -99,22 +98,19 @@ mi_interpreter_resume (void *data)
gdb_setup_readline ();
- if (event_loop_p)
- {
- /* These overwrite some of the initialization done in
- _intialize_event_loop. */
- call_readline = gdb_readline2;
- input_handler = mi_execute_command_wrapper;
- add_file_handler (input_fd, stdin_event_handler, 0);
- async_command_editing_p = 0;
- /* FIXME: This is a total hack for now. PB's use of the MI implicitly
- relies on a bug in the async support which allows asynchronous
- commands to leak through the commmand loop. The bug involves
- (but is not limited to) the fact that sync_execution was
- erroneously initialized to 0. Duplicate by initializing it
- thus here... */
- sync_execution = 0;
- }
+ /* These overwrite some of the initialization done in
+ _intialize_event_loop. */
+ call_readline = gdb_readline2;
+ input_handler = mi_execute_command_wrapper;
+ add_file_handler (input_fd, stdin_event_handler, 0);
+ async_command_editing_p = 0;
+ /* FIXME: This is a total hack for now. PB's use of the MI
+ implicitly relies on a bug in the async support which allows
+ asynchronous commands to leak through the commmand loop. The bug
+ involves (but is not limited to) the fact that sync_execution was
+ erroneously initialized to 0. Duplicate by initializing it thus
+ here... */
+ sync_execution = 0;
gdb_stdout = mi->out;
/* Route error and log output through the MI */
@@ -365,16 +361,7 @@ mi_command_loop (int mi_version)
/* Tell the world that we're alive */
fputs_unfiltered ("(gdb) \n", raw_stdout);
gdb_flush (raw_stdout);
- if (!event_loop_p)
- simplified_command_loop (mi_input, mi_execute_command);
- else
- start_event_loop ();
-}
-
-static char *
-mi_input (char *buf)
-{
- return gdb_readline (NULL);
+ start_event_loop ();
}
extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */