diff --git a/gdb/event-top.c b/gdb/event-top.c index 37882728..fb0478f 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -185,27 +185,7 @@ rl_callback_read_char_wrapper (gdb_client_data client_data) void cli_command_loop (void) { - /* If we are using readline, set things up and display the first - prompt, otherwise just print the prompt. */ - if (async_command_editing_p) - { - int length; - char *a_prompt; - char *gdb_prompt = get_prompt (0); - - /* Tell readline what the prompt to display is and what function - it will need to call after a whole line is read. This also - displays the first prompt. */ - length = strlen (get_prefix (0)) - + strlen (gdb_prompt) + strlen (get_suffix(0)) + 1; - a_prompt = (char *) alloca (length); - strcpy (a_prompt, get_prefix (0)); - strcat (a_prompt, gdb_prompt); - strcat (a_prompt, get_suffix (0)); - rl_callback_handler_install (a_prompt, input_handler); - } - else - display_gdb_prompt (0); + display_gdb_prompt (0); /* Now it's time to start the event loop. */ start_event_loop (); diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index 919d1ac..9e34412 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -139,27 +139,7 @@ tui_exec (void *data, const char *command_str) static void tui_command_loop (void *data) { - /* If we are using readline, set things up and display the first - prompt, otherwise just print the prompt. */ - if (async_command_editing_p) - { - int length; - char *a_prompt; - char *gdb_prompt = get_prompt (0); - - /* Tell readline what the prompt to display is and what function - it will need to call after a whole line is read. This also - displays the first prompt. */ - length = strlen (get_prefix (0)) - + strlen (gdb_prompt) + strlen (get_suffix (0)) + 1; - a_prompt = (char *) alloca (length); - strcpy (a_prompt, get_prefix (0)); - strcat (a_prompt, gdb_prompt); - strcat (a_prompt, get_suffix (0)); - rl_callback_handler_install (a_prompt, input_handler); - } - else - display_gdb_prompt (0); + display_gdb_prompt (0); /* Loop until there is nothing to do. This is the entry point to the event loop engine. gdb_do_one_event, called via catch_errors()