binutils-gdb/gdb/tui
Simon Marchi 5538b03c98 gdb: remove cmd_list_element::function::sfunc
I don't understand what the sfunc function type in
cmd_list_element::function is for.  Compared to cmd_simple_func_ftype,
it has an extra cmd_list_element parameter, giving the callback access
to the cmd_list_element for the command being invoked.  This allows
registering the same callback with many commands, and alter the behavior
using the cmd_list_element's context.

From the comment in cmd_list_element, it sounds like at some point it
was the callback function type for set and show functions, hence the
"s".  But nowadays, it's used for many more commands that need to access
the cmd_list_element object (see add_catch_command for example).

I don't really see the point of having sfunc at all, since do_sfunc is
just a trivial shim that changes the order of the arguments.  All
commands using sfunc could just as well set cmd_list_element::func to
their callback directly.

Therefore, remove the sfunc field in cmd_list_element and everything
that goes with it.  Rename cmd_const_sfunc_ftype to cmd_func_ftype and
use it for cmd_list_element::func, as well as for the add_setshow
commands.

Change-Id: I1eb96326c9b511c293c76996cea0ebc51c70fac0
2021-07-23 15:38:54 -04:00
..
ChangeLog-1998-2003
tui-command.c
tui-command.h
tui-data.c
tui-data.h Initial TUI mouse support 2021-06-04 16:15:01 +02:00
tui-disasm.c gdb: convert obj_section macros to methods 2021-06-28 15:28:26 -04:00
tui-disasm.h
tui-file.c
tui-file.h
tui-hooks.c gdbsupport, gdb: give names to observers 2021-04-24 19:26:41 -04:00
tui-hooks.h
tui-interp.c gdbsupport, gdb: give names to observers 2021-04-24 19:26:41 -04:00
tui-io.c Make the TUI command window support the mouse 2021-06-17 11:57:56 +01:00
tui-io.h
tui-layout.c gdb: remove cmd_list_element::function::sfunc 2021-07-23 15:38:54 -04:00
tui-layout.h
tui-location.c
tui-location.h
tui-out.c
tui-out.h
tui-regs.c
tui-regs.h
tui-source.c
tui-source.h
tui-stack.c
tui-stack.h
tui-win.c Make the TUI command window support the mouse 2021-06-17 11:57:56 +01:00
tui-win.h
tui-wingeneral.c
tui-wingeneral.h
tui-winsource.c gdb: remove iterate_over_breakpoints function 2021-05-27 14:58:37 -04:00
tui-winsource.h
tui.c Make the TUI command window support the mouse 2021-06-17 11:57:56 +01:00
tui.h