gdb/guile: use return values of add_setshow functions in add_setshow_generic
Use the set_show_commands objects returned by the add_setshow functions
in add_setshow_generic. This lets us avoid looking up the commands
after creating them, instead using the return objects directly.
Make add_setshow_generic return a set_show_commands object, which is a
bit nicer than returning both commands by parameter.
Finally, store using that object in param_smob.
Equivalent of
7bd22f56a3cf ("gdb/python: use return values of
add_setshow functions in add_setshow_generic"), but for guile.
gdb/ChangeLog:
* guile/scm-param.c (struct param_smob) <set_command,
show_command>: Remove.
<commands>: New.
(pascm_is_valid): Adjust.
(add_setshow_generic): Use return values of add_setshow
functions, return a set_show_commands.
(gdbscm_register_parameter_x): Adjust.
Change-Id: I18ed9e7dd5646529491c86749a5cb20763acd1f0