public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: insight@sourceware.org
Cc: Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCH] gdbtk: Remove use deprecated_interactive_hook
Date: Tue, 18 Jun 2019 10:32:00 -0000	[thread overview]
Message-ID: <20190618103217.18629-1-andrew.burgess@embecosm.com> (raw)

The deprecated_interactive_hook is currently setup to point to an
empty function.  Removing this will allow a small clean up in GDB.
The empty function used by deprecated_interactive_hook currently looks
like this:

    /* Come here during long calculations to check for GUI events.  Usually invoked
       via the QUIT macro.  */

    void
    gdbtk_interactive (void)
    {
      /* Tk_DoOneEvent (TK_DONT_WAIT|TK_IDLE_EVENTS); */
    }

As far as I can tell this function has been empty for years.  If in
the future we do ever want or need to implement something like
gdbtk_interactive, then we would be better off adding a new observable
to GDB, but I don't see a reason to add one at this point just so that
gdbtk can call an empty function.

ChangeLog:

	* gdbtk/generic/gdbtk-hooks.c (gdbtk_add_hooks): Don't setup
	deprecated_interactive_hook.
	* gdbtk/generic/gdbtk.c (gdbtk_interactive): Delete.
	* gdbtk/generic/gdbtk.h (gdbtk_interactive): Delete declaration.
---
 gdbtk/generic/gdbtk-hooks.c |  1 -
 gdbtk/generic/gdbtk.c       | 11 -----------
 gdbtk/generic/gdbtk.h       |  1 -
 3 files changed, 13 deletions(-)

diff --git a/gdbtk/generic/gdbtk-hooks.c b/gdbtk/generic/gdbtk-hooks.c
index f2a5771..f973c79 100644
--- a/gdbtk/generic/gdbtk-hooks.c
+++ b/gdbtk/generic/gdbtk-hooks.c
@@ -143,7 +143,6 @@ gdbtk_add_hooks (void)
   deprecated_query_hook = gdbtk_query;
   deprecated_warning_hook = gdbtk_warning;
 
-  deprecated_interactive_hook = gdbtk_interactive;
   deprecated_target_wait_hook = gdbtk_wait;
   deprecated_ui_load_progress_hook = gdbtk_load_hash;
 
diff --git a/gdbtk/generic/gdbtk.c b/gdbtk/generic/gdbtk.c
index 977c47d..b7b99c3 100644
--- a/gdbtk/generic/gdbtk.c
+++ b/gdbtk/generic/gdbtk.c
@@ -112,8 +112,6 @@ extern
 
 void gdbtk_init (void);
 
-void gdbtk_interactive (void);
-
 static void tk_command (const char *, int);
 
 static int target_should_use_timer (struct target_ops *t);
@@ -578,15 +576,6 @@ gdbtk_uninstall_notifier (void)
  * The rest of this file contains the start-up, and event handling code for gdbtk.
  */
 
-/* Come here during long calculations to check for GUI events.  Usually invoked
-   via the QUIT macro.  */
-
-void
-gdbtk_interactive (void)
-{
-  /* Tk_DoOneEvent (TK_DONT_WAIT|TK_IDLE_EVENTS); */
-}
-
 /* Start a timer which will keep the GUI alive while in target_wait. */
 void
 gdbtk_start_timer (void)
diff --git a/gdbtk/generic/gdbtk.h b/gdbtk/generic/gdbtk.h
index 8cd5482..7bb1f79 100644
--- a/gdbtk/generic/gdbtk.h
+++ b/gdbtk/generic/gdbtk.h
@@ -156,7 +156,6 @@ extern void gdbtk_stop_timer (void);
 extern void gdbtk_start_timer (void);
 extern long gdbtk_getpid(void);
 extern void gdbtk_ignorable_warning (const char *, const char *);
-extern void gdbtk_interactive (void);
 extern int x_event (int);
 extern int gdbtk_two_elem_cmd (char *, const char *);
 extern int target_is_native (struct target_ops *t);
-- 
2.14.5

             reply	other threads:[~2019-06-18 10:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 10:32 Andrew Burgess [this message]
2019-06-22 17:28 ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190618103217.18629-1-andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=insight@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).