This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [event-loop] Can command_loop_marker() be replaced by null_cleanup()?
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: Re: [event-loop] Can command_loop_marker() be replaced by null_cleanup()?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 05 Jul 2000 20:35:24 +1000
- References: <3928C1A3.DFECB9E0@cygnus.com>
Andrew Cagney wrote:
>
> Hello,
>
> Looking at it, the two look very similar. Perhaphs,
> command_loop_marker() is used so that the specific cleanup is easier to
> identify?
FYI,
I've checked in the attatched.
Andrew
Wed Jul 5 20:28:32 2000 Andrew Cagney <cagney@b1.cygnus.com>
* top.h (command_loop_marker), top.c (command_loop_marker):
Delete.
* event-top.c (command_handler), top.c (simplified_command_loop,
command_loop): Use null_cleanup instead of command_loop_marker.
Index: event-top.c
===================================================================
RCS file: /cvs/src/src/gdb/event-top.c,v
retrieving revision 1.6
diff -p -r1.6 event-top.c
*** event-top.c 2000/05/22 05:43:39 1.6
--- event-top.c 2000/07/05 10:32:43
*************** command_handler (char *command)
*** 487,493 ****
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
! old_chain = make_cleanup (command_loop_marker, 0);
#if defined(TUI)
insert_mode = 0;
--- 487,493 ----
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
! old_chain = make_cleanup (null_cleanup, 0);
#if defined(TUI)
insert_mode = 0;
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.14
diff -p -r1.14 top.c
*** top.c 2000/06/04 00:41:09 1.14
--- top.c 2000/07/05 10:32:52
*************** static char *line_completion_function (c
*** 73,83 ****
static char *readline_line_completion_function (char *, int);
- /* NOTE 1999-04-29: this function will be static again, after we make the
- event loop be the default command loop for gdb, and we merge
- event-top.c into this file, top.c */
- /* static */ void command_loop_marker (void *);
-
static void while_command (char *, int);
static void if_command (char *, int);
--- 73,78 ----
*************** extern void serial_log_command (const ch
*** 1581,1595 ****
}
}
- /* ARGSUSED */
- /* NOTE 1999-04-29: This function will be static again, once we modify
- gdb to use the event loop as the default command loop and we merge
- event-top.c into this file, top.c */
- /* static */ void
- command_loop_marker (void *foo)
- {
- }
-
/* Read commands from `instream' and execute them
until end of file or error reading instream. */
--- 1576,1581 ----
*************** command_loop ()
*** 1617,1623 ****
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
! old_chain = make_cleanup (command_loop_marker, 0);
#if defined(TUI)
/* A bit of paranoia: I want to make sure the "insert_mode" global
--- 1603,1609 ----
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
! old_chain = make_cleanup (null_cleanup, 0);
#if defined(TUI)
/* A bit of paranoia: I want to make sure the "insert_mode" global
*************** simplified_command_loop (read_input_func
*** 1698,1704 ****
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
! old_chain = make_cleanup (command_loop_marker, 0);
/* Get a command-line. */
command = (*read_input_func) (instream == stdin ?
--- 1684,1690 ----
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 ?
Index: top.h
===================================================================
RCS file: /cvs/src/src/gdb/top.h,v
retrieving revision 1.3
diff -p -r1.3 top.h
*** top.h 2000/05/28 01:12:32 1.3
--- top.h 2000/07/05 10:32:52
*************** extern void simplified_command_loop (cha
*** 40,46 ****
extern int quit_confirm (void);
extern void quit_force (char *, int);
extern void quit_command (char *, int);
- extern void command_loop_marker (void *);
extern int quit_cover (PTR);
extern void execute_command (char *, int);
--- 40,45 ----