* [PATCH] gdbtk: Remove use deprecated_interactive_hook
@ 2019-06-18 10:32 Andrew Burgess
2019-06-22 17:28 ` Keith Seitz
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Burgess @ 2019-06-18 10:32 UTC (permalink / raw)
To: insight; +Cc: Andrew Burgess
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gdbtk: Remove use deprecated_interactive_hook
2019-06-18 10:32 [PATCH] gdbtk: Remove use deprecated_interactive_hook Andrew Burgess
@ 2019-06-22 17:28 ` Keith Seitz
0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2019-06-22 17:28 UTC (permalink / raw)
To: Andrew Burgess, insight
On 6/18/19 3:32 AM, Andrew Burgess wrote:
> 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.
Wowser, how time flies when you're working on a release!
I would approve this, but it appears that Patrick has already adjusted the code
based on the related patch getting into gdb:
commit d8772263cdb55564e93528cf16248d3479d23346 (HEAD -> master, origin/master, origin/HEAD)
Author: Patrick Monnerat <patrick@monnerat.net>
Date: Thu Jun 20 14:58:09 2019 +0200
Upgrade submodule, sync code.
deprecated_interactive hook has disappeared: remove its (noop) use.
* gdbtk/generic/gdbtk-hooks.c (gdbtk_add_hooks): remove setting of
deprecated_interactive_hook.
* gdbtk/generic/gdbtk.[ch] (gdbtk_interactive): remove.
I appreciate that you took the time to take a look, and, of course, thanks for
the patch.
Keith
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-22 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 10:32 [PATCH] gdbtk: Remove use deprecated_interactive_hook Andrew Burgess
2019-06-22 17:28 ` Keith Seitz
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).