References:
LLVM uses several intrinsic functions (name prefixed with “llvm.dbg”) to track source local variables through optimization and code generation.
void @llvm.dbg.addr(metadata, metadata, metadata)
. Information about a local element (e.g., variable)
DIExpression
.void @llvm.dbg.declare(metadata, metadata, metadata)
. identical to llvm.dbg.addr
, except that there can only be one call to llvm.dbg.declare
for a given concrete local variable.
llvm.dbg.declare
exists and has a valid location argument, that address is considered to be the true home of the variable across the entire lifetime.void @llvm.dbg.value(metadata, metadata, metadata)
. Provides information when a user source variable is set to a new value. Describes the value of a source variable directly, not its address.
DIExpression
.Reference:
References: LLVM langRef – DIExpression DIExpression nodes: expressions that are inspired by the DWARF expression language. Used to describe how the referenced LLVM variable relates to the source language variable. Debug intrinsics are interpreted left-to-right: start by pushing the value/address operand of the intrinsic onto a stack, then repeatedly push and evaluate opcodes from the DIExpression until the final variable description is produced. Example opcodes: DW_OP_deref: deferences the top of the expression stack; DW_OP_plus: pops the last two entries from the expression stack, adds them together and appends the result to the expression stack.
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?