Skip to content

SetKeepInMemory is not exposed on SBExpressionOptions which prevents saving persistent variables across expressions in the Python API #10958

@BlueFalconHD

Description

@BlueFalconHD

In the source for the expr command, LLDB sets the SetKeepInMemory flag on ExpressionOptions which allows something like:

(lldb) expr -l ObjC --
int (^$double)(int) = ^int(int num) {
return num*2;
};

(lldb) expr -l ObjC -- $double(2);
(int) $1 = 4

However, doing the same via the Python API is not possible, there is no switch on SBExpressionOptions to keep a variable saved for future expressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions