diff options
Diffstat (limited to 'gdb/cli/cli-cmds.c')
-rw-r--r-- | gdb/cli/cli-cmds.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index b415267..b0f1bdf 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1245,8 +1245,7 @@ show_user (char *args, int from_tty) const char *comname = args; c = lookup_cmd (&comname, cmdlist, "", 0, 1); - /* c->user_commands would be NULL if it's a python/scheme command. */ - if (c->class != class_user || !c->user_commands) + if (!cli_user_command_p (c)) error (_("Not a user command.")); show_user_1 (c, "", args, gdb_stdout); } @@ -1254,7 +1253,7 @@ show_user (char *args, int from_tty) { for (c = cmdlist; c; c = c->next) { - if (c->class == class_user || c->prefixlist != NULL) + if (cli_user_command_p (c) || c->prefixlist != NULL) show_user_1 (c, "", c->name, gdb_stdout); } } |