[lldb][android] Fix management of Android specific pointer tagging in LLDB #12050
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.
Explanation:
Swift uses pointer tagging. On Android, the OS uses pointer tagging as well and Swift cannot use the same bits as on other platforms. On Swift stdlib, there are Android specific implementations for everything related to pointer tagging, mainly in Strings and Arrays. However, LLDB is not aware of these platform specific things and, when debugging Android apps, is not able to handle these types correctly. This PR addresses this gap.
Scope:
These changes only affect debugging on Android. Swift debugging on Android is in an early stage and this is one of the fundamental things to be fixed.
Issues:
LLDB, when used to debug Android APKs, is not able to display Short Strings and Array items.
Original PRs:
This is part on an effort to get lldb working for debugging Swift on Android: Get this lldb working for Android debugging #10831
Risk:
Changes are small and gated behind
if android–type conditions.Testing:
I don’t know if there are automated tests for lldb when used for remote debugging an Android apps
Reviewers:
No sure who should be