Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\dynamic_debug.c Create Date:2022-07-28 07:15:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int ddebug_parse_query(char *words[], int nwords, struct ddebug_query *query, const char *modname)

Type:int

Parameter:

TypeParameterName
char *words
intnwords
struct ddebug_query *query
const char *modname
324  rc = 0
327  If nwords % 2 != 0 Then
328  pr_err("expecting pairs of match-spec <value>\n")
329  Return -EINVAL
331  memset(query, 0, size of query )
333  If modname Then module = modname
337  When i < nwords cycle
338  If Not strcmp(words[i], "func") Then
339  rc = check_set( & function, words[i + 1], "func")
340  Else if Not strcmp(words[i], "file") Then
341  rc = check_set( & filename, words[i + 1], "file")
342  Else if Not strcmp(words[i], "module") Then
343  rc = check_set( & module, words[i + 1], "module")
344  Else if Not strcmp(words[i], "format") Then
348  rc = check_set( & format, words[i + 1], "format")
349  Else if Not strcmp(words[i], "line") Then
350  first = words[i + 1]
351  last = strchr(first, '-')
352  If first_lineno || last_lineno Then
353  pr_err("match-spec: line used 2x\n")
354  Return -EINVAL
356  If last Then last++ = '\0'
360  If last Then
375  Else
378  Else
379  pr_err("unknown keyword \"%s\"\n", words[i])
380  Return -EINVAL
382  If rc Then Return rc
385  vpr_info_dq(query, "parsed")
386  Return 0
Caller
NameDescribe
ddebug_exec_query