Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:parse_probe_vars

Proto:static int parse_probe_vars(char *arg, const struct fetch_type *t, struct fetch_insn *code, unsigned int flags, int offs)

Type:int

Parameter:

TypeParameterName
char *arg
const struct fetch_type *t
struct fetch_insn *code
unsigned intflags
intoffs
276  ret = 0
279  If strcmp(arg, "retval") == 0 Then
280  If flags & TPARG_FL_RETURN Then
282  Else
284  ret = -EINVAL
286  Else if len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to Then
287  If arg[len] == '\0' Then
289  Else if isdigit(arg[len]) Then
291  If ret Then
292  Go to inval_var
293  Else if flags & TPARG_FL_KERNEL && param > PARAM_MAX_STACK Then
297  Else
301  Else Go to inval_var
303  Else if strcmp(arg, "comm") == 0 Then
304  op = Current comm
319  Else Go to inval_var
322  Return ret
324  inval_var :
325  trace_probe_log_err(offs, BAD_VAR)
326  Return -EINVAL
Caller
NameDescribe
parse_probe_argRecursive argument parser