From 1868c04ebae02e64e51631c2614703b4a294be6b Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 18 Mar 2002 02:26:32 +0000 Subject: * cli/cli-decode.c (cmd_type): New function. * command.h (cmd_type): Declare. * infrun.c (set_schedlock_func): Call function cmd_type. * kod.c (kod_set_os): Call cmd_type. * cris-tdep.c (cris_version_update): Use function cmd_type. (cris_mode_update, cris_abi_update): Ditto. --- gdb/infrun.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gdb/infrun.c') diff --git a/gdb/infrun.c b/gdb/infrun.c index 466305f..2415e8a 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -749,7 +749,15 @@ static const char *scheduler_enums[] = static void set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c) { - if (c->type == set_cmd) + /* NOTE: cagney/2002-03-17: The add_show_from_set() function clones + the set command passed as a parameter. The clone operation will + include (BUG?) any ``set'' command callback, if present. + Commands like ``info set'' call all the ``show'' command + callbacks. Unfortunatly, for ``show'' commands cloned from + ``set'', this includes callbacks belonging to ``set'' commands. + Making this worse, this only occures if add_show_from_set() is + called after add_cmd_sfunc() (BUG?). */ + if (cmd_type (c) == set_cmd) if (!target_can_lock_scheduler) { scheduler_mode = schedlock_off; -- cgit v1.1