static int kdb_exec_defcmd(int argc, const char **argv)
{
	int ret;
	kdbtab_t *kp;
	struct kdb_macro *kmp;
	struct kdb_macro_statement *kms;

	if (argc != 0)
		return KDB_ARGCOUNT;

	list_for_each_entry(kp, &kdb_cmds_head, list_node) {
		if (strcmp(kp->name, argv[0]) == 0)
			break;
	}
	if (list_entry_is_head(kp, &kdb_cmds_head, list_node)) {
		kdb_printf("kdb_exec_defcmd: could not find commands for %s\n",
			   argv[0]);
		return KDB_NOTIMP;
	}
	kmp = container_of(kp, struct kdb_macro, cmd);
	list_for_each_entry(kms, &kmp->statements, list_node) {
		/*
		 * Recursive use of kdb_parse, do not use argv after this point.
		 */
		argv = NULL;
		kdb_printf("[%s]kdb> %s\n", kmp->cmd.name, kms->statement);
		ret = kdb_parse(kms->statement);
		if (ret)
			return ret;
	}
	return 0;
}
static int kdb_exec_defcmd(int argc, const char **argv)
{
	int ret;
	kdbtab_t *kp;
	struct kdb_macro *kmp;
	struct kdb_macro_statement *kms;

	if (argc != 0)
		return KDB_ARGCOUNT;

	list_for_each_entry(kp, &kdb_cmds_head, list_node) {
		if (strcmp(kp->name, argv[0]) == 0)
			break;
	}
	if (list_entry_is_head(kp, &kdb_cmds_head, list_node)) {
		kdb_printf("kdb_exec_defcmd: could not find commands for %s\n",
			   argv[0]);
		return KDB_NOTIMP;
	}
	kmp = container_of(kp, struct kdb_macro, cmd);
	list_for_each_entry(kms, &kmp->statements, list_node) {
		 
		argv = NULL;
		kdb_printf("[%s]kdb> %s\n", kmp->cmd.name, kms->statement);
		ret = kdb_parse(kms->statement);
		if (ret)
			return ret;
	}
	return 0;
}