函数逻辑报告 |
Source Code:kernel\debug\kdb\kdb_io.c |
Create Date:2022-07-27 12:43:45 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:kdb_read* This function reads a string of characters, terminated by* a newline, or by reaching the end of the supplied buffer,* from the current kernel debugger console device.* Parameters:* Returns:* Returns a pointer to the buffer containing the received
函数原型:static char *kdb_read(char *buffer, size_t bufsize)
返回类型:char
参数:
类型 | 参数 | 名称 |
---|---|---|
char * | buffer | Address of character buffer to receive input characters. |
size_t | bufsize | size, in bytes, of the character buffer |
200 | bufend等于 Address of character buffer to receive input characters.加 size, in bytes, of the character buffer减2 |
207 | tab等于0 |
214 | diag等于kdbgetintenv("DTABCOUNT", & dtab_count) |
215 | 如果diag则dtab_count等于30 |
218 | 如果len大于0则 |
220 | 如果* Address of character buffer to receive input characters.加len减1的差恒等于'\n'则cp自减 |
225 | cp等于'\0' |
227 | poll_again : |
238 | *lastchar先自减等于'\0' |
239 | cp先自减 |
240 | kdb_printf("\b%s \r", cp) |
242 | cp等于'\0' |
243 | kdb_printf(kdb_prompt_str) |
247 | 退出 |
249 | lastchar自加等于'\n' |
250 | lastchar自加等于'\0' |
251 | 如果非KDB_STATE(KGDB_TRANS)则 |
252 | KDB_STATE_SET(KGDB_TRANS) |
255 | kdb_printf("\n") |
269 | 退出 |
272 | kdb_printf("\r") |
273 | kdb_printf(kdb_prompt_str) |
276 | 退出 |
285 | kdb_printf("\b") |
286 | cp先自减 |
288 | 退出 |
290 | memset(tmpbuffer, ' ', strlen - Find the length of a string*@s: The string to be sized + (lastchar - Address of character buffer to receive input characters.)) |
292 | *tmpbuffer加strlen - Find the length of a string*@s: The string to be sized加lastchar减 Address of character buffer to receive input characters.的和等于'\0' |
294 | kdb_printf("\r%s\r", tmpbuffer) |
296 | *lastchar加1的和等于'\0' |
297 | 返回:lastchar |
305 | memset(tmpbuffer, ' ', strlen - Find the length of a string*@s: The string to be sized + (lastchar - Address of character buffer to receive input characters.)) |
307 | *tmpbuffer加strlen - Find the length of a string*@s: The string to be sized加lastchar减 Address of character buffer to receive input characters.的和等于'\0' |
309 | kdb_printf("\r%s\r", tmpbuffer) |
311 | *lastchar加1的和等于'\0' |
312 | 返回:lastchar |
318 | p_tmp自加 |
323 | p_tmp等于strrchr - Find the last occurrence of a character in a string*@s: The string to be searched*@c: The character to search for |
330 | count等于kallsyms_symbol_complete* Parameters:* prefix_name prefix of a symbol name to lookup* max_len maximum length that can be returned* Returns:* Number of symbols which match the given prefix |
332 | kdb_printf("\n%d symbols are found.", count) |
333 | 如果count大于dtab_count则 |
334 | count等于dtab_count |
335 | kdb_printf(" But only first %d symbols will be printed.\nYou can change the environment variable DTABCOUNT.", count) |
340 | kdb_printf("\n") |
345 | 如果ret不等于负E2BIG则kdb_printf("%s ", p_tmp) |
347 | 否则kdb_printf("%s... ", p_tmp) |
351 | 如果i大于等于dtab_count则kdb_printf("...") |
353 | kdb_printf("\n") |
354 | kdb_printf(kdb_prompt_str) |
362 | kdb_printf("%s", cp) |
367 | 退出 |
368 | 默认 |
373 | *lastchar先自加等于'\0' |
375 | kdb_printf("%s\r", cp) |
376 | cp先自加 |
378 | cp等于'\0' |
379 | kdb_printf(kdb_prompt_str) |
382 | 否则 |
397 | 如果lastchar减 Address of character buffer to receive input characters.大于等于5且字符串比较恒等于0则 |
399 | kdb_gdb_state_pass(lastchar - 5) |
401 | KDB_STATE_SET(DOING_KGDB) |
404 | 如果lastchar减 Address of character buffer to receive input characters.大于等于11且字符串比较恒等于0则 |
406 | kdb_gdb_state_pass(lastchar - 11) |
408 | KDB_STATE_SET(DOING_KGDB) |
412 | 退出 |
414 | 转到:poll_again |
名称 | 描述 |
---|---|
kdb_getstr | kdb_getstr* Print the prompt string and read a command from the* input device.* Parameters:* buffer Address of buffer to receive command* bufsize Size of buffer in bytes* prompt Pointer to string to use as prompt string* Returns: |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |