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);
}
{
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);
}
}