* [RFA] Remove simplified_command_loop.
@ 2008-03-10 17:01 Vladimir Prus
2008-03-10 18:49 ` Joel Brobecker
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Prus @ 2008-03-10 17:01 UTC (permalink / raw)
To: gdb-patches
I cannot find any use of simplified_command_loop neither in
gdb proper, nor in gdbtk, from which I conclude this is
not longer needed. OK?
- Volodya
* top.c (simplified_command_loop): Remove.
---
gdb/top.c | 35 -----------------------------------
1 files changed, 0 insertions(+), 35 deletions(-)
diff --git a/gdb/top.c b/gdb/top.c
index b1efb2b..8867c7a 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -632,41 +632,6 @@ command_loop (void)
}
}
}
-
-/* Read commands from `instream' and execute them until end of file or
- error reading instream. This command loop doesnt care about any
- such things as displaying time and space usage. If the user asks
- for those, they won't work. */
-void
-simplified_command_loop (char *(*read_input_func) (char *),
- void (*execute_command_func) (char *, int))
-{
- struct cleanup *old_chain;
- char *command;
- int stdin_is_tty = ISATTY (stdin);
-
- while (instream && !feof (instream))
- {
- quit_flag = 0;
- if (instream == stdin && stdin_is_tty)
- reinitialize_more_filter ();
- old_chain = make_cleanup (null_cleanup, 0);
-
- /* Get a command-line. */
- command = (*read_input_func) (instream == stdin ?
- get_prompt () : (char *) NULL);
-
- if (command == 0)
- return;
-
- (*execute_command_func) (command, instream == stdin);
-
- /* Do any commands attached to breakpoint we stopped at. */
- bpstat_do_actions (&stop_bpstat);
-
- do_cleanups (old_chain);
- }
-}
\f
/* Commands call this if they do not want to be repeated by null lines. */
--
1.5.3.5
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [RFA] Remove simplified_command_loop.
2008-03-10 17:01 [RFA] Remove simplified_command_loop Vladimir Prus
@ 2008-03-10 18:49 ` Joel Brobecker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Brobecker @ 2008-03-10 18:49 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
> I cannot find any use of simplified_command_loop neither in
> gdb proper, nor in gdbtk, from which I conclude this is
> not longer needed. OK?
It appears that this function used to be used in MI (mi-interp.c,
function mi_command_loop), and is no longer used since gdb-6.3,
which was released end of 2004. It's been 3 years, and also it
looks like the event loops between CLI and MI mode have been
better reconciled. So:
> * top.c (simplified_command_loop): Remove.
This is OK.
--
Joel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-10 18:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-10 17:01 [RFA] Remove simplified_command_loop Vladimir Prus
2008-03-10 18:49 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox