Skip to content

Conversation

@gmondada
Copy link

@gmondada gmondada commented Dec 29, 2025

  • 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

@gmondada gmondada marked this pull request as ready for review December 29, 2025 10:55
@gmondada gmondada requested a review from a team as a code owner December 29, 2025 10:55
@finagolfin
Copy link
Member

Thanks, I'll take a look at this, since I added that Android AArch64-specific tagging shift years ago.

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.

2 participants