Skip to content

[LLDB] Add an API to check whether a variable is writable (#208042)#13343

Open
adrian-prantl wants to merge 2 commits into
swiftlang:swift/release/6.4.xfrom
adrian-prantl:142358140-6.4.x
Open

[LLDB] Add an API to check whether a variable is writable (#208042)#13343
adrian-prantl wants to merge 2 commits into
swiftlang:swift/release/6.4.xfrom
adrian-prantl:142358140-6.4.x

Conversation

@adrian-prantl

Copy link
Copy Markdown

IDEs may offer functionality to set a variable to a specific value. There are many situations where this isn't actually possible, for example, if the variable's value is a constant or the result of a complex DWARF expression. Instead of offering to change a value only to have it fail with an error, this API lets the IDE query whether setting a value is generally feasible so it can hide the action where it isn't applicable.

rdar://142358140

Assisted-by: claude
(cherry picked from commit 349375a)

Conflicts:
lldb/source/Expression/DWARFExpressionList.cpp
lldb/source/ValueObject/ValueObjectVariable.cpp
lldb/unittests/Expression/DWARFExpressionTest.cpp

@adrian-prantl adrian-prantl requested a review from a team as a code owner July 8, 2026 23:17
@adrian-prantl

Copy link
Copy Markdown
Author

@swift-ci test

@adrian-prantl

Copy link
Copy Markdown
Author

@swift-ci test

IDEs may offer functionality to set a variable to a specific value.
There are many situations where this isn't actually possible, for
example, if the variable's value is a constant or the result of a
complex DWARF expression. Instead of offering to change a value only to
have it fail with an error, this API lets the IDE query whether setting
a value is generally feasible so it can hide the action where it isn't
applicable.

rdar://142358140

Assisted-by: claude
(cherry picked from commit 349375a)

 Conflicts:
	lldb/source/Expression/DWARFExpressionList.cpp
	lldb/source/ValueObject/ValueObjectVariable.cpp
	lldb/unittests/Expression/DWARFExpressionTest.cpp
@adrian-prantl

Copy link
Copy Markdown
Author

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant