函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\dynamic_debug.c Create Date:2022-07-27 08:14:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Parse words[] as a ddebug query specification, which is a series* of (keyword, value) pairs chosen from these possibilities:* func <function-name>* file <full-pathname>* file <base-filename>* module <module-name>* format

函数原型:static int ddebug_parse_query(char *words[], int nwords, struct ddebug_query *query, const char *modname)

返回类型:int

参数:

类型参数名称
char *words
intnwords
struct ddebug_query *query
const char *modname
324  rc等于0
327  如果nwords取模2不等于0则
328  打印错误信息("expecting pairs of match-spec <value>\n")
329  返回:负EINVAL
331  memset(query, 0, query的长度)
333  如果modnamemodule等于modname
337 i小于nwords循环
338  如果非strcmp(words[i], "func")则
339  rc等于check_set( & function, words[i + 1], "func")
340  否则如果非strcmp(words[i], "file")则
341  rc等于check_set( & filename, words[i + 1], "file")
342  否则如果非strcmp(words[i], "module")则
343  rc等于check_set( & module, words[i + 1], "module")
344  否则如果非strcmp(words[i], "format")则
348  rc等于check_set( & format, words[i + 1], "format")
349  否则如果非strcmp(words[i], "line")则
350  first等于words[i + 1]
351  last等于strchr(first, '-')
352  如果first_linenolast_lineno
353  打印错误信息("match-spec: line used 2x\n")
354  返回:负EINVAL
356  如果lastlast自加等于'\0'
360  如果last
375  否则
378  否则
379  打印错误信息("unknown keyword \"%s\"\n", words[i])
380  返回:负EINVAL
382  如果rc则返回:rc
385  vpr_info_dq(query, "parsed")
386  返回:0
调用者
名称描述
ddebug_exec_query