函数逻辑报告 |
Source Code:kernel\debug\kdb\kdb_main.c |
Create Date:2022-07-27 12:45:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:kdb_defcmd
函数原型:static int kdb_defcmd(int argc, const char **argv)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
int | argc | |
const char ** | argv |
710 | 如果defcmd_in_progress则 |
711 | kdb_printf("kdb: nested defcmd detected, assuming missing endefcmd\n") |
713 | kdb_defcmd2("endefcmd", "endefcmd") |
715 | 如果argc恒等于0则 |
717 | 以s小于defcmd_set加defcmd_set_count循环 |
718 | kdb_printf("defcmd %s \"%s\" \"%s\"\n", name, usage, help) |
722 | kdb_printf("endefcmd\n") |
724 | 返回:0 |
726 | 如果argc不等于3则返回:KDB_ARGCOUNT |
728 | 如果in_dbg_master()则 |
729 | kdb_printf("Command only available during kdb_init()\n") |
730 | 返回:KDB_NOTIMP |
732 | defcmd_set = 分配数组内存 |
734 | 如果非defcmd_set则转到:fail_defcmd |
736 | 内存复制(defcmd_set, save_defcmd_set, defcmd_set_count * defcmd_set的长度) |
738 | s等于defcmd_set加defcmd_set_count |
740 | usable = true |
741 | name等于kdb_strdup(argv[1], GFP_KDB) |
744 | usage等于kdb_strdup(argv[2], GFP_KDB) |
745 | 如果非usage则转到:fail_usage |
747 | help等于kdb_strdup(argv[3], GFP_KDB) |
750 | 如果usage[0]恒等于'"'则 |
754 | 如果help[0]恒等于'"'则 |
758 | defcmd_set_count先自加 |
759 | defcmd_in_progress = true |
760 | kfree(save_defcmd_set) |
761 | 返回:0 |
762 | fail_help : |
764 | fail_usage : |
766 | fail_name : |
767 | kfree(defcmd_set) |
768 | fail_defcmd : |
769 | kdb_printf("Could not allocate new defcmd_set entry for %s\n", argv[1]) |
770 | defcmd_set = save_defcmd_set |
771 | 返回:KDB_NOTIMP |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |