| Function report | 
| Source Code: kernel\debug\kdb\kdb_main.c | Create Date:2022-07-28 11:41:15 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:kdb_parse
Proto:int kdb_parse(const char *cmdstr)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const char * | cmdstr | 
| 919 | ignore_errors = 0 , check_grep = 0 | 
| 926 | If KDB_FLAG(CMD_INTERRUPT) Then | 
| 935 | argc = 0 | 
| 939 | When Note: isspace() must return false for %NUL-terminator ( * cp) cycle | 
| 940 | cp++ | 
| 941 | If cp == '\0' || cp == '\n' || cp == '#' && Not defcmd_in_progress Then Break | 
| 945 | If cp == '|' Then | 
| 946 | check_grep++ | 
| 947 | Break | 
| 949 | If cpp >= cbuf + kdb_printf: max printline* size == 256 Then | 
| 950 | kdb_printf("kdb_parse: command buffer overflow, command ignored\n%s\n", cmdstr) | 
| 956 | kdb_printf("kdb_parse: too many arguments, command ignored\n%s\n", cmdstr) | 
| 961 | escaped = 0 | 
| 962 | quoted = '\0' | 
| 967 | If cpp >= cbuf + kdb_printf: max printline* size == 256 Then Break | 
| 969 | If escaped Then | 
| 974 | If cp == '\\' Then | 
| 986 | ++cpp | 
| 988 | cpp++ = '\0' | 
| 991 | If Not argc Then Return 0 | 
| 995 | If defcmd_in_progress Then | 
| 1005 | ignore_errors = 1 | 
| 1006 | ++argv[0] | 
| 1010 | If Command name Then | 
| 1018 | If strncmp(argv[0], Command name , Minimum legal # command* chars required ) == 0 Then | 
| 1021 | Break | 
| 1025 | If strcmp(argv[0], Command name ) == 0 Then Break | 
| 1035 | If i == kdb_max_commands Then | 
| 1037 | If Command name Then | 
| 1038 | If strncmp(argv[0], Command name , strlen - Find the length of a string*@s: The string to be sized) == 0 Then | 
| 1041 | Break | 
| 1047 | If i < kdb_max_commands Then | 
| 1050 | If Not Check whether the flags of the current command and the permissions* of the kdb console has allow a command to be run. Then Return KDB_NOPERM | 
| 1053 | KDB_STATE_SET(CMD) | 
| 1054 | result = ( * Function to execute command )(argc - 1, argv) | 
| 1055 | If result && ignore_errors && result > Kernel Debugger Command codes. Must not overlap with error codes. Then result = 0 | 
| 1057 | KDB_STATE_CLEAR(CMD) | 
| 1059 | If Command behaviour flags & Repeat the command with args Then Return result | 
| 1062 | argc = If Command behaviour flags & Repeat the command w/o arguments Then 1 Else 0 | 
| 1065 | Return result | 
| 1077 | char * name = NULL | 
| 1079 | nextarg = 0 | 
| 1086 | kdb_printf("%s = ", argv[0]) | 
| 1088 | kdb_printf("\n") | 
| 1089 | Return 0 | 
| Name | Describe | 
|---|---|
| kdb_exec_defcmd | Forward references | 
| kdb_local | kdb_local - The main code for kdb | 
| kdb_cmd_init | Execute any commands defined in kdb_cmds. | 
| kdb_bt | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |