public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove use of deprecated_command_loop_hook
@ 2013-08-22  0:11 Andrew Burgess
  2013-09-04 22:17 ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Burgess @ 2013-08-22  0:11 UTC (permalink / raw)
  To: insight

I posted a patch for gdb to remove deprecated_command_loop_hook, it was
pointed out to me that this is used by gdbtk.  The patch below removes
the use of deprecated_command_loop_hook from gdbtk in the same way I've
removed its final use from the core gdb.

The gdb patch is here:
  http://sourceware.org/ml/gdb-patches/2013-08/msg00605.html

This patch could be applied to gdbtk before the above patch is
applied to gdb.  I built and tested on x86-64 linux with no regressions.

I have commit access to gdb, but I have no idea if that extends to
gdb/gdbtk, and even if it did I obviously wouldn't commit without
approval :)

What do you think?

Thanks,
Andrew

gdb/gdbtk/ChangeLog

2013-08-22  Andrew Burgess  <aburgess@broadcom.com>

	* generic/gdbtk-interp.c (gdbtk_command_loop): Change signature to
	take interpreter cookie (ignored), mention parameter in comment.
	(gdb_interpreter_resume): Remove use of
	deprecated_command_loop_hook.
	(_initialize_gdbtk_interp): Fill in logging proc and command loop
	proc pointers.

diff -u -p -r1.12 gdbtk-interp.c
--- ./gdb/gdbtk/generic/gdbtk-interp.c	10 Mar 2012 21:51:51 -0000	1.12
+++ ./gdb/gdbtk/generic/gdbtk-interp.c	21 Aug 2013 23:54:49 -0000
@@ -40,7 +40,7 @@
 #endif
 
 
-static void gdbtk_command_loop (void);
+static void gdbtk_command_loop (void *);
 static void hack_disable_interpreter_exec (char *, int);
 void _initialize_gdbtk_interp (void);
 
@@ -101,8 +101,6 @@ gdbtk_interpreter_resume (void *data)
   gdb_stdtarg = d->_stdtarg;
   gdb_stdtargin = d->_stdtargin;
 
-  deprecated_command_loop_hook = gdbtk_command_loop;
-
   /* 2003-02-11 keiths: We cannot actually source our main Tcl file in
      our interpreter's init function because any errors that may
      get generated will go to the wrong gdb_stderr. Instead of hacking
@@ -138,10 +136,11 @@ gdbtk_interpreter_exec (void *data, cons
 
 /* This function is called instead of gdb's internal command loop.  This is the
    last chance to do anything before entering the main Tk event loop. 
-   At the end of the command, we enter the main loop. */
+   At the end of the command, we enter the main loop.
+   DATA is the interpreter cookie, currently unused.  */
 
 static void
-gdbtk_command_loop (void)
+gdbtk_command_loop (void *data)
 {
   extern FILE *instream;
 
@@ -187,7 +186,9 @@ _initialize_gdbtk_interp (void)
     gdbtk_interpreter_suspend,	        /* suspend_proc */
     gdbtk_interpreter_exec,             /* exec_proc */
     gdbtk_interpreter_display_prompt_p, /* prompt_proc_p */
-    gdbtk_interpreter_ui_out		/* ui_out_proc */
+    gdbtk_interpreter_ui_out,		/* ui_out_proc */
+    NULL,                               /* set_logging_proc */
+    gdbtk_command_loop                  /* command_loop_proc */
   };
   interp_add (interp_new ("insight", &procs));
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove use of deprecated_command_loop_hook
  2013-08-22  0:11 [PATCH] Remove use of deprecated_command_loop_hook Andrew Burgess
@ 2013-09-04 22:17 ` Keith Seitz
  2013-09-05 12:56   ` Andrew Burgess
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Seitz @ 2013-09-04 22:17 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: insight

Sorry for the delay on this: I've been out of the office for a bit.

On 08/21/2013 05:11 PM, Andrew Burgess wrote:
> I have commit access to gdb, but I have no idea if that extends to
> gdb/gdbtk, and even if it did I obviously wouldn't commit without
> approval :)

I handle insight as an extension of gdb. Pretty much the same policies 
w.r.t. obvious patches, build errors, etc. If you have 
commit-after-approval on gdb, you do here, too.

> What do you think?

I actually wonder how something this simple has been overlooked for so 
long? Well, actually, I do know. Thank you for thinking about us!

Please commit.

Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove use of deprecated_command_loop_hook
  2013-09-04 22:17 ` Keith Seitz
@ 2013-09-05 12:56   ` Andrew Burgess
  2013-09-05 13:00     ` Andrew Burgess
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Burgess @ 2013-09-05 12:56 UTC (permalink / raw)
  To: insight; +Cc: Keith Seitz

On 04/09/2013 11:17 PM, Keith Seitz wrote:
> Sorry for the delay on this: I've been out of the office for a bit.
> 
> On 08/21/2013 05:11 PM, Andrew Burgess wrote:
>> I have commit access to gdb, but I have no idea if that extends to
>> gdb/gdbtk, and even if it did I obviously wouldn't commit without
>> approval :)
> 
> I handle insight as an extension of gdb. Pretty much the same policies
> w.r.t. obvious patches, build errors, etc. If you have
> commit-after-approval on gdb, you do here, too.
> 
>> What do you think?
> 
> I actually wonder how something this simple has been overlooked for so
> long? Well, actually, I do know. Thank you for thinking about us!
> 
> Please commit.

Committed.

Thanks,
Andrew


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove use of deprecated_command_loop_hook
  2013-09-05 12:56   ` Andrew Burgess
@ 2013-09-05 13:00     ` Andrew Burgess
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2013-09-05 13:00 UTC (permalink / raw)
  To: insight, Keith Seitz

On 05/09/2013 1:56 PM, Andrew Burgess wrote:
> On 04/09/2013 11:17 PM, Keith Seitz wrote:
>> Sorry for the delay on this: I've been out of the office for a bit.
>>
>> On 08/21/2013 05:11 PM, Andrew Burgess wrote:
>>> I have commit access to gdb, but I have no idea if that extends to
>>> gdb/gdbtk, and even if it did I obviously wouldn't commit without
>>> approval :)
>>
>> I handle insight as an extension of gdb. Pretty much the same policies
>> w.r.t. obvious patches, build errors, etc. If you have
>> commit-after-approval on gdb, you do here, too.
>>
>>> What do you think?
>>
>> I actually wonder how something this simple has been overlooked for so
>> long? Well, actually, I do know. Thank you for thinking about us!
>>
>> Please commit.
> 
> Committed.

Gah! The date I used in the ChangeLog was the original date I posted the
patch, not the date I actually made the commit.

Given that this date is still later than the previous change in the file
I'm going to leave it alone, unless I'm asked to change it.

Sorry for that.

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-05 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-22  0:11 [PATCH] Remove use of deprecated_command_loop_hook Andrew Burgess
2013-09-04 22:17 ` Keith Seitz
2013-09-05 12:56   ` Andrew Burgess
2013-09-05 13:00     ` Andrew Burgess

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).