[PATCH] Remove use of deprecated_command_loop_hook
"Andrew Burgess" <[email protected]> Thu, 22 Aug 2013 01:11:06 +0100
| Newsgroups | gmane.comp.debugging.insight |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> * 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)); }