函数逻辑报告 |
Source Code:kernel\trace\trace_probe.c |
Create Date:2022-07-27 13:53:59 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Recursive argument parser
函数原型:static int parse_probe_arg(char *arg, const struct fetch_type *type, struct fetch_insn **pcode, struct fetch_insn *end, unsigned int flags, int offs)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
char * | arg | |
const struct fetch_type * | type | |
struct fetch_insn ** | pcode | |
struct fetch_insn * | end | |
unsigned int | flags | |
int | offs |
360 | deref等于 Dereference: .offset |
361 | offset等于0 |
363 | ret等于0 |
372 | 如果ret大于等于0则 |
376 | 否则trace_probe_log_err(offs, BAD_REG_NAME) |
378 | 退出 |
381 | 如果是数字则 |
383 | 如果ret则 |
385 | 退出 |
388 | op等于 Immediate : .immediate |
390 | 否则如果arg[1]恒等于'+'则 |
392 | 如果flags按位与TPARG_FL_KERNEL则 |
394 | 返回:负EINVAL |
397 | 如果ret则 |
399 | 退出 |
402 | op等于 File offset: .immediate |
404 | 否则 |
406 | 如果非flags按位与TPARG_FL_KERNEL的值则 |
408 | 返回:负EINVAL |
411 | op等于 Unresolved Symbol holder |
412 | data等于kstrdup(arg + 1, GFP_KERNEL) |
417 | 返回:负EINVAL |
419 | op等于 Immediate : .immediate |
420 | immediate等于0 |
425 | 返回:负EINVAL |
428 | op等于 Dereference: .offset |
430 | 退出 |
434 | 如果arg[1]恒等于'u'则 |
441 | tmp等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for |
442 | 如果非tmp则 |
444 | 返回:负EINVAL |
446 | tmp等于'\0' |
448 | 如果ret则 |
450 | 退出 |
454 | tmp等于strrchr - Find the last occurrence of a character in a string*@s: The string to be searched*@c: The character to search for |
455 | 如果非tmp则 |
456 | trace_probe_log_err(offs + strlen - Find the length of a string*@s: The string to be sized, DEREF_OPEN_BRACE) |
458 | 返回:负EINVAL |
459 | 否则 |
460 | t2等于find_fetch_type(NULL) |
462 | tmp等于'\0' |
466 | 如果op恒等于 Current comm 或op恒等于 Allocated data: .data 则 |
469 | 返回:负EINVAL |
473 | 返回:负EINVAL |
480 | 退出 |
482 | 如果arg[1]恒等于'"'则 |
483 | ret等于__parse_imm_string(arg + 2, & tmp, offs + 2) |
486 | op等于 Allocated data: .data |
488 | 否则 |
489 | ret等于str_to_immediate(arg + 1, & immediate) |
490 | 如果ret则trace_probe_log_err(offs + 1, BAD_IMM) |
492 | 否则op等于 Immediate : .immediate |
495 | 退出 |
497 | 如果非ret且op恒等于FETCH_OP_NOP则 |
502 | 返回:ret |
名称 | 描述 |
---|---|
parse_probe_arg | Recursive argument parser |
traceprobe_parse_probe_arg_body | String length checking wrapper |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |