forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb] Make GetDynamicTypeAndAddress() use host address if available #9975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
augusto2112
merged 6 commits into
swiftlang:stable/20240723
from
augusto2112:fix-gen-local-buffer
Feb 8, 2025
Merged
[lldb] Make GetDynamicTypeAndAddress() use host address if available #9975
augusto2112
merged 6 commits into
swiftlang:stable/20240723
from
augusto2112:fix-gen-local-buffer
Feb 8, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…llvm#125143) …uffer ValueObjectDynamicValue::UpdateValue() assumes that the dynamic type found by GetDynamicTypeAndAddress() would return an address in the inferior. This commit makes it so it can deal with being passed a host address instead. This is needed downstream by the Swift fork. rdar://143357274 (cherry picked from commit 0cbc498)
@adrian-prantl one commit is just a cherry-pick. The second commit is the one that needs review. |
@swift-ci test |
lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp
Outdated
Show resolved
Hide resolved
lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp
Show resolved
Hide resolved
Fixes 0cbc498. error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] 71 | in_value.GetLocalBufferSize()}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Given this is test code, I think a static cast is fine here. Tiny risk that it's actually a symptom of a bug that would happen if you did 32-bit to 64-bit debugging. I expect you'd find a lot more bugs than that though. (cherry picked from commit 52db30e)
If GetDynamicTypeAndAddress_Value cannot get back to the inferior address, but does have a host address and buffer that fits the dynamic type, return that.
GetLocalBuffer() makes more sense as an API.
b6089a3
to
dd87dff
Compare
@swift-ci test |
Windows failures are on the compiler side which shouldn't be related to these changes:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.