fix to_open debug setting
This is a follow-on to the patch to auto-generate target debug methods.
While working on that patch I noticed that the to_open debug setting
will never work. There is no path by which debug_to_open can be
called.
This patch fixes the problem by using a generic function as the
implementation of the various "target" subcommands, and then putting
the debug printing there.
This is also a tiny step toward fixing PR 7250 (and apparently why
command contexts were introduced).
Built and regtested on x86-64 Fedora 20.
2014-07-30 Tom Tromey <tromey@redhat.com>
* target.c (open_target): New function.
(add_target_with_completer, add_deprecated_target_alias): Use
set_cmd_sfunc, set_cmd_context.
(debug_to_open): Remove.
(setup_target_debug): Update.