- /* This is to trick readline into not trying to display the
- prompt. Even though we display the prompt using this
- function, readline still tries to do its own display if we
- don't call rl_callback_handler_install and
- rl_callback_handler_remove (which readline detects because a
- global variable is not set). If readline did that, it could
- mess up gdb signal handlers for SIGINT. Readline assumes
- that between calls to rl_set_signals and rl_clear_signals gdb
- doesn't do anything with the signal handlers. Well, that's
- not the case, because when the target executes we change the
- SIGINT signal handler. If we allowed readline to display the
- prompt, the signal handler change would happen exactly
- between the calls to the above two functions.
- Calling rl_callback_handler_remove(), does the job. */
-
- rl_callback_handler_remove ();
- return;
- }
-
- /* If the observer changed the prompt, ACTUAL_GDB_PROMPT will not be
- NULL. Otherwise, either copy the existing prompt, or set it to
- NEW_PROMPT. */
- if (! actual_gdb_prompt)
- {
- if (! new_prompt)