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]

[PATCH 08/11] Remove unused deprecated_{attach|detach}_hook


Nobody actually uses these hooks anymore. So simply remove them.

gdb/ChangeLog

	* defs.h (deprecated_attach_hook, deprecated_detach_hook): Remove.
	* top.c (deprecated_attach_hook, deprecated_detach_hook): Remove.
	* infcmd.c (attach_post_wait, detach_command)
	(disconnect_command): Adjust.
	* target.c (generic_mourn_inferior): Adjust.
---
 gdb/defs.h   | 2 --
 gdb/infcmd.c | 7 -------
 gdb/target.c | 3 ---
 gdb/top.c    | 6 ------
 4 files changed, 18 deletions(-)

diff --git a/gdb/defs.h b/gdb/defs.h
index 3c97825..a52db88 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -672,8 +672,6 @@ extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
 							 int noerror);
 extern int (*deprecated_query_hook) (const char *, va_list)
      ATTRIBUTE_FPTR_PRINTF(1,0);
-extern void (*deprecated_attach_hook) (void);
-extern void (*deprecated_detach_hook) (void);
 extern void (*deprecated_call_command_hook) (struct cmd_list_element * c,
 					     char *cmd, int from_tty);
 
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index d836162..93d8c3e 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2752,8 +2752,6 @@ attach_post_wait (char *args, int from_tty, enum attach_post_wait_mode mode)
 
       /* Tell the user/frontend where we're stopped.  */
       normal_stop ();
-      if (deprecated_attach_hook)
-	deprecated_attach_hook ();
     }
 }
 
@@ -3008,9 +3006,6 @@ detach_command (char *args, int from_tty)
      threads.  */
   if (!have_inferiors ())
     init_thread_list ();
-
-  if (deprecated_detach_hook)
-    deprecated_detach_hook ();
 }
 
 /* Disconnect from the current target without resuming it (leaving it
@@ -3030,8 +3025,6 @@ disconnect_command (char *args, int from_tty)
   target_disconnect (args, from_tty);
   no_shared_libraries (NULL, from_tty);
   init_thread_list ();
-  if (deprecated_detach_hook)
-    deprecated_detach_hook ();
 }
 
 void 
diff --git a/gdb/target.c b/gdb/target.c
index 0ff8515..3820fb7 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3336,9 +3336,6 @@ generic_mourn_inferior (void)
 
   reopen_exec_file ();
   reinit_frame_cache ();
-
-  if (deprecated_detach_hook)
-    deprecated_detach_hook ();
 }
 
 /* Convert a normal process ID to a string.  Returns the string in a
diff --git a/gdb/top.c b/gdb/top.c
index 0ddef13..e33caf4 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -194,12 +194,6 @@ void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
 
 int (*deprecated_query_hook) (const char *, va_list);
 
-/* Called as appropriate to notify the interface that we have attached
-   to or detached from an already running process.  */
-
-void (*deprecated_attach_hook) (void);
-void (*deprecated_detach_hook) (void);
-
 /* Used by UI as a wrapper around command execution.  May do various
    things like enabling/disabling buttons, etc...  */
 
-- 
2.8.4


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