diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-11-05 22:38:11 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-11-05 22:38:11 +0000 |
commit | 7d5b6fdd3bcba79509e2d2dcc04f49a85534670b (patch) | |
tree | d7be68f7f385262ea5e96cd14f7beb26be1f7d05 /gdb | |
parent | f80a3b5fb48e8b2cf3cbad04fc1ff38e82bf64fa (diff) | |
download | gdb-7d5b6fdd3bcba79509e2d2dcc04f49a85534670b.zip gdb-7d5b6fdd3bcba79509e2d2dcc04f49a85534670b.tar.gz gdb-7d5b6fdd3bcba79509e2d2dcc04f49a85534670b.tar.bz2 |
2002-11-05 Elena Zannoni <ezannoni@redhat.com>
From Jim Ingham <jingham@apple.com>:
* event-top.c (gdb_disable_readline): New function.
(_initialize_event_loop): Move comment.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/event-top.c | 33 |
2 files changed, 35 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 87efdd4..dc7f7eb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -19,6 +19,12 @@ get_saved_register. 2002-11-05 Elena Zannoni <ezannoni@redhat.com> + + From Jim Ingham <jingham@apple.com>: + * event-top.c (gdb_disable_readline): New function. + (_initialize_event_loop): Move comment. + +2002-11-05 Elena Zannoni <ezannoni@redhat.com> * event-loop.c (start_event_loop): Add comment. Update copyright. diff --git a/gdb/event-top.c b/gdb/event-top.c index 9d871d6..8f39998 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -1168,14 +1168,39 @@ gdb_setup_readline (void) } } +/* Disable command input through the standard CLI channels. Used in + the suspend proc for interpreters that use the standard gdb readline + interface, like the cli & the mi. */ +void +gdb_disable_readline (void) +{ + if (event_loop_p) + { + /* FIXME - It is too heavyweight to delete and remake these + every time you run an interpreter that needs readline. + It is probably better to have the interpreters cache these, + which in turn means that this needs to be moved into interpreter + specific code. */ + +#if 0 + ui_file_delete (gdb_stdout); + ui_file_delete (gdb_stderr); + gdb_stdlog = NULL; + gdb_stdtarg = NULL; +#endif + + rl_callback_handler_remove (); + delete_file_handler (input_fd); + } +} + void _initialize_event_loop (void) { gdb_setup_readline (); + /* Tell gdb to use the cli_command_loop as the main loop. */ if (event_loop_p && command_loop_hook == NULL) - { - /* Tell gdb to use the cli_command_loop as the main loop. */ - command_loop_hook = cli_command_loop; - } + command_loop_hook = cli_command_loop; } + |