mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-30 21:34:42 +08:00
Introduce display_mi_prompt
Just a refactor. gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> * mi/mi-interp.c (display_mi_prompt): New function.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2016-06-21 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* mi/mi-interp.c (display_mi_prompt): New function.
|
||||||
|
|
||||||
2016-06-21 Pedro Alves <palves@redhat.com>
|
2016-06-21 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* target.c (target_terminal_inferior): Bail out after
|
* target.c (target_terminal_inferior): Bail out after
|
||||||
|
@ -89,6 +89,15 @@ static void mi_on_sync_execution_done (void);
|
|||||||
|
|
||||||
static int report_initial_inferior (struct inferior *inf, void *closure);
|
static int report_initial_inferior (struct inferior *inf, void *closure);
|
||||||
|
|
||||||
|
/* Display the MI prompt. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
display_mi_prompt (void)
|
||||||
|
{
|
||||||
|
fputs_unfiltered ("(gdb) \n", raw_stdout);
|
||||||
|
gdb_flush (raw_stdout);
|
||||||
|
}
|
||||||
|
|
||||||
/* Returns the INTERP's data cast as mi_interp if INTERP is an MI, and
|
/* Returns the INTERP's data cast as mi_interp if INTERP is an MI, and
|
||||||
returns NULL otherwise. */
|
returns NULL otherwise. */
|
||||||
|
|
||||||
@ -300,10 +309,7 @@ mi_on_sync_execution_done (void)
|
|||||||
/* If MI is sync, then output the MI prompt now, indicating we're
|
/* If MI is sync, then output the MI prompt now, indicating we're
|
||||||
ready for further input. */
|
ready for further input. */
|
||||||
if (!mi_async_p ())
|
if (!mi_async_p ())
|
||||||
{
|
display_mi_prompt ();
|
||||||
fputs_unfiltered ("(gdb) \n", raw_stdout);
|
|
||||||
gdb_flush (raw_stdout);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mi_execute_command_wrapper wrapper suitable for INPUT_HANDLER. */
|
/* mi_execute_command_wrapper wrapper suitable for INPUT_HANDLER. */
|
||||||
@ -319,10 +325,7 @@ mi_execute_command_input_handler (char *cmd)
|
|||||||
'synchronous_command_done' observer when the target next
|
'synchronous_command_done' observer when the target next
|
||||||
stops. */
|
stops. */
|
||||||
if (!sync_execution)
|
if (!sync_execution)
|
||||||
{
|
display_mi_prompt ();
|
||||||
fputs_unfiltered ("(gdb) \n", raw_stdout);
|
|
||||||
gdb_flush (raw_stdout);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -333,8 +336,7 @@ mi_command_loop (void *data)
|
|||||||
sevenbit_strings = 1;
|
sevenbit_strings = 1;
|
||||||
|
|
||||||
/* Tell the world that we're alive. */
|
/* Tell the world that we're alive. */
|
||||||
fputs_unfiltered ("(gdb) \n", raw_stdout);
|
display_mi_prompt ();
|
||||||
gdb_flush (raw_stdout);
|
|
||||||
|
|
||||||
start_event_loop ();
|
start_event_loop ();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user