aboutsummaryrefslogtreecommitdiff
path: root/gdb/event-loop.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-11-27 04:15:09 +0000
committerTom Tromey <tromey@redhat.com>2001-11-27 04:15:09 +0000
commit467d85198ffb27a97ef21aa85c044a3ace19990a (patch)
treea7a6c2ce830a8954c50aa5d49113a63c54bcf557 /gdb/event-loop.c
parent88118b3abf152ba1d5a7a112918cab91674237f5 (diff)
downloadgdb-467d85198ffb27a97ef21aa85c044a3ace19990a.zip
gdb-467d85198ffb27a97ef21aa85c044a3ace19990a.tar.gz
gdb-467d85198ffb27a97ef21aa85c044a3ace19990a.tar.bz2
* NEWS: Updated.
* event-loop.c (start_event_loop): Call after_char_processing_hook. * event-top.h (after_char_processing_hook): Declare. * event-top.c (rl_callback_read_char_wrapper): Call after_char_processing_hook. (after_char_processing_hook): New global. * top.c (operate_saved_history): New global. (gdb_rl_operate_and_get_next): New function. (init_main): Add the operate-and-get-next defun. (gdb_rl_operate_and_get_next_completion): New function.
Diffstat (limited to 'gdb/event-loop.c')
-rw-r--r--gdb/event-loop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index de1f78f..ea74419 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -402,6 +402,14 @@ start_event_loop (void)
interface specific, because interfaces can display the
prompt in their own way. */
display_gdb_prompt (0);
+ /* This call looks bizarre, but it is required. If the user
+ entered a command that caused an error,
+ after_char_processing_hook won't be called from
+ rl_callback_read_char_wrapper. Using a cleanup there
+ won't work, since we want this function to be called
+ after a new prompt is printed. */
+ if (after_char_processing_hook)
+ (*after_char_processing_hook) ();
/* Maybe better to set a flag to be checked somewhere as to
whether display the prompt or not. */
}