llvm / llvm/llvm-project

There should be an SBTarget equivalent of SBFrame::FindValues(name, lldb.eValueTypeConstantResult)

Open
#201,952 1 comment 0 reactions 0 assignees View on GitHub
lldb
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

You can create a "persistent value" in lldb, for instance by doing (this is a Python example):

some_target.EvaluateExpression("SomeType $my_var = MakeASomeType()")

And then you can use that in future expressions. You can also get it as an SBValue from the Python side using:

value = some_frame.FindValues("$my_var", lldb.eValueTypeConstResult)

However, that is a strange API because it requires a frame, but the persistent values are stored in the Target and aren't really relative to any given frame. So it would have been more logical to give access specifically to persistent variables through an SBTarget API. It would also be nice to have something less cryptic than giving a ValueType of eValueTypeConstResult.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.