gdb: Remove use of deprecated_interactive_hook

Message ID 20190618140740.1872-1-andrew.burgess@embecosm.com
State New, archived
Headers

Commit Message

Andrew Burgess June 18, 2019, 2:07 p.m. UTC
  The deprecated_interactive_hook is not used within GDB.  It is used in
gdbtk, however this patch removes that use:

  https://sourceware.org/ml/insight/2019-q2/msg00001.html

So I think there is no longer a reason to keep this hook around.

This patch removes it.  There should be no user visible changes after
this commit.

gdb/ChangeLog:

	* defs.h (deprecated_interactive_hook): Delete declaration.
	* interps.c (clear_interpreter_hooks): Remove use of
	deprecated_interactive_hook.
	* top.c (deprecated_interactive_hook): Delete definition.
	* utils.c (maybe_quit): Remove use of deprecated_interactive_hook.
---
 gdb/ChangeLog | 8 ++++++++
 gdb/defs.h    | 1 -
 gdb/interps.c | 1 -
 gdb/top.c     | 5 -----
 gdb/utils.c   | 3 ---
 5 files changed, 8 insertions(+), 10 deletions(-)
  

Comments

Tom Tromey June 18, 2019, 4:04 p.m. UTC | #1
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> The deprecated_interactive_hook is not used within GDB.  It is used in
Andrew> gdbtk, however this patch removes that use:

Andrew>   https://sourceware.org/ml/insight/2019-q2/msg00001.html

Andrew> So I think there is no longer a reason to keep this hook around.

Thanks for doing this.  It looks good to me.  I always appreciate
removals of deprecated things :-)

Tom
  

Patch

diff --git a/gdb/defs.h b/gdb/defs.h
index e95d0d43480..3d878c84e3f 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -600,7 +600,6 @@  extern int (*deprecated_query_hook) (const char *, va_list)
      ATTRIBUTE_FPTR_PRINTF(1,0);
 extern void (*deprecated_warning_hook) (const char *, va_list)
      ATTRIBUTE_FPTR_PRINTF(1,0);
-extern void (*deprecated_interactive_hook) (void);
 extern void (*deprecated_readline_begin_hook) (const char *, ...)
      ATTRIBUTE_FPTR_PRINTF_1;
 extern char *(*deprecated_readline_hook) (const char *);
diff --git a/gdb/interps.c b/gdb/interps.c
index 363502e7677..3495dcb53c3 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -353,7 +353,6 @@  clear_interpreter_hooks (void)
   /*print_frame_more_info_hook = 0; */
   deprecated_query_hook = 0;
   deprecated_warning_hook = 0;
-  deprecated_interactive_hook = 0;
   deprecated_readline_begin_hook = 0;
   deprecated_readline_hook = 0;
   deprecated_readline_end_hook = 0;
diff --git a/gdb/top.c b/gdb/top.c
index 857207c3767..be736b0a87d 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -240,11 +240,6 @@  void (*deprecated_readline_end_hook) (void);
 void (*deprecated_attach_hook) (void);
 void (*deprecated_detach_hook) (void);
 
-/* Called during long calculations to allow GUI to repair window
-   damage, and to check for stop buttons, etc...  */
-
-void (*deprecated_interactive_hook) (void);
-
 /* Called when going to wait for the target.  Usually allows the GUI
    to run while waiting for target events.  */
 
diff --git a/gdb/utils.c b/gdb/utils.c
index c7922cf7f56..7120a922584 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -678,9 +678,6 @@  maybe_quit (void)
     quit ();
 
   quit_handler ();
-
-  if (deprecated_interactive_hook)
-    deprecated_interactive_hook ();
 }