[09/11] Remove unused deprecated_call_command_hook

Message ID 20170228145016.22604-10-prudo@linux.vnet.ibm.com
State New, archived
Headers

Commit Message

Philipp Rudo Feb. 28, 2017, 2:50 p.m. UTC
  Nobody actually uses this hook anymore. So simply remove it.

gdb/ChangeLog

	* defs.h (deprecated_call_command_hook): Remove.
	* top.c (deprecated_call_command_hook): Remove.
	(execute_command): Adjust.
	* interps.c (clear_interpreter_hooks): Adjust.
---
 gdb/defs.h    | 2 --
 gdb/interps.c | 1 -
 gdb/top.c     | 8 --------
 3 files changed, 11 deletions(-)
  

Patch

diff --git a/gdb/defs.h b/gdb/defs.h
index a52db88..b7df0dc 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_call_command_hook) (struct cmd_list_element * c,
-					     char *cmd, int from_tty);
 
 extern int (*deprecated_ui_load_progress_hook) (const char *section,
 						unsigned long num);
diff --git a/gdb/interps.c b/gdb/interps.c
index 4cc9ae5..aaab99c 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -391,7 +391,6 @@  clear_interpreter_hooks (void)
   deprecated_print_frame_info_listing_hook = 0;
   /*print_frame_more_info_hook = 0; */
   deprecated_query_hook = 0;
-  deprecated_call_command_hook = 0;
   deprecated_error_begin_hook = 0;
 }
 
diff --git a/gdb/top.c b/gdb/top.c
index e33caf4..6fac99b 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);
 
-/* Used by UI as a wrapper around command execution.  May do various
-   things like enabling/disabling buttons, etc...  */
-
-void (*deprecated_call_command_hook) (struct cmd_list_element * c, 
-				      char *cmd, int from_tty);
-
 /* The highest UI number ever assigned.  */
 static int highest_ui_num;
 
@@ -618,8 +612,6 @@  execute_command (char *p, int from_tty)
 	do_show_command (arg, from_tty, c);
       else if (!cmd_func_p (c))
 	error (_("That is not a command, just a help topic."));
-      else if (deprecated_call_command_hook)
-	deprecated_call_command_hook (c, arg, from_tty);
       else
 	cmd_func (c, arg, from_tty);