proc/tests: testing apparatus for complex location expressions

This commit is contained in:
aarzilli
2017-08-22 16:40:01 +02:00
committed by Derek Parker
parent 25b19c77c2
commit f098915192
12 changed files with 863 additions and 11 deletions

View File

@ -763,11 +763,12 @@ func (scope *EvalScope) extractVarInfoFromEntry(entry *dwarf.Entry) (*Variable,
}
addr, err := op.ExecuteStackProgram(op.DwarfRegisters{CFA: scope.CFA}, instructions)
if err != nil {
return nil, err
}
return scope.newVariable(n, uintptr(addr), t), nil
v := scope.newVariable(n, uintptr(addr), t)
if err != nil {
v.Unreadable = err
}
return v, nil
}
// If v is a pointer a new variable is returned containing the value pointed by v.