Skip to content
Commit 877d5678 authored by Douglas Raillard's avatar Douglas Raillard
Browse files

tools/trace-parser: Support use of kallsyms in C expression

FEATURE

Allow C expressions to refer to kallsyms, such as this snippet from
the irq_enable event, where _stext is a symbol (modelled as void *) and
REC->caller_offs a signed integer:

    (void *)((unsigned long)(_stext) + REC->caller_offs)

This is achieved by introducing a ParseEnv::variable_typ() method and
matching EvalEnv::variable_value(), with some modification of the parser
to disambiguate (x)(y)+1 differently depending whether y is a a type or
a variable recognized by ParseEnv::variable_typ().
parent 15801d5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment