This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

garbage collect INF_QUIT_REQ


If we were to move this to common code somehow, we're probably
call target_stop directly.  As is, it just adds unnecessary
obfuscation, and breaks the abstraction for nothing.

Applied.

-- 
Pedro Alves

2011-05-30  Pedro Alves  <pedro@codesourcery.com>

	gdb/
	* target.h (enum inferior_event_type): Delete INF_QUIT_REQ.
	* inf-loop.h (inferior_event_handler_wrapper): Delete.
	* inf-loop.c (inferior_event_handler_wrapper): Delete.
	(inferior_event_handler): Don't handle INF_QUIT_REQ.
	* remote.c (_initialize_remote): Register
	async_remote_interrupt_twice directly as
	sigint_remote_twice_token event.

---
 gdb/inf-loop.c |   13 -------------
 gdb/inf-loop.h |    1 -
 gdb/remote.c   |    2 +-
 gdb/target.h   |    2 --
 4 files changed, 1 insertion(+), 17 deletions(-)

Index: src/gdb/target.h
===================================================================
--- src.orig/gdb/target.h	2011-05-30 22:14:18.000000000 +0100
+++ src/gdb/target.h	2011-05-30 22:14:39.644986447 +0100
@@ -201,8 +201,6 @@ extern char *target_waitstatus_to_string
    deal with.  */
 enum inferior_event_type
   {
-    /* There is a request to quit the inferior, abandon it.  */
-    INF_QUIT_REQ,
     /* Process a normal inferior event which will result in target_wait
        being called.  */
     INF_REG_EVENT,
Index: src/gdb/inf-loop.h
===================================================================
--- src.orig/gdb/inf-loop.h	2011-01-13 15:07:23.000000000 +0000
+++ src/gdb/inf-loop.h	2011-05-30 22:06:44.174986611 +0100
@@ -23,6 +23,5 @@
 
 extern void inferior_event_handler (enum inferior_event_type event_type, 
 				    void* client_data);
-extern void inferior_event_handler_wrapper (void *client_data);
 
 #endif /* #ifndef INF_LOOP_H */
Index: src/gdb/inf-loop.c
===================================================================
--- src.orig/gdb/inf-loop.c	2011-05-30 21:23:16.000000000 +0100
+++ src/gdb/inf-loop.c	2011-05-30 22:05:43.454986632 +0100
@@ -32,12 +32,6 @@
 
 static int fetch_inferior_event_wrapper (gdb_client_data client_data);
 
-void
-inferior_event_handler_wrapper (gdb_client_data client_data)
-{
-  inferior_event_handler (INF_QUIT_REQ, client_data);
-}
-
 /* General function to handle events in the inferior.  So far it just
    takes care of detecting errors reported by select() or poll(),
    otherwise it assumes that all is OK, and goes on reading data from
@@ -143,13 +137,6 @@ inferior_event_handler (enum inferior_ev
 	do_all_intermediate_continuations (0);
       break;
 
-    case INF_QUIT_REQ: 
-      /* FIXME: ezannoni 1999-10-04.  This call should really be a
-	 target vector entry, so that it can be used for any kind of
-	 targets.  */
-      async_remote_interrupt_twice (NULL);
-      break;
-
     case INF_TIMER:
     default:
       printf_unfiltered (_("Event type not recognized.\n"));
Index: src/gdb/remote.c
===================================================================
--- src.orig/gdb/remote.c	2011-05-30 16:58:50.000000000 +0100
+++ src/gdb/remote.c	2011-05-30 22:01:47.674986713 +0100
@@ -10627,7 +10627,7 @@ _initialize_remote (void)
   sigint_remote_token =
     create_async_signal_handler (async_remote_interrupt, NULL);
   sigint_remote_twice_token =
-    create_async_signal_handler (inferior_event_handler_wrapper, NULL);
+    create_async_signal_handler (async_remote_interrupt_twice, NULL);
 
 #if 0
   init_remote_threadtests ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]