Skip to content

Conversation

@adrian-prantl
Copy link

commit 9bc04d3df93fdd25c3c161fb07489d40f4eb5902
Author: Adrian Prantl <aprantl@apple.com>
Date:   Thu Dec 12 10:00:19 2024 -0800

    [lldb] Make sure triple and SDK always match.
    
    This is particularly important in simulator processes, when stopped in
    a symbol context that has no Swift, or no debug info, for example in
    libsystem_kernel. In that case we used to take the precise triple from
    the dylib (which would be macosx, not ios-simulator). Since we don’t
    find debug info in the current dylib we would select the SDK from the
    first dylib with debug info, which is ios-simulator.
    
    This patch avoids this situation by
    1. preferring the target triple if there is no Swift debug info
    2. ensuring that the SDK always matches the triple
    
    rdar://141173613

This is particularly important in simulator processes, when stopped in
a symbol context that has no Swift, or no debug info, for example in
libsystem_kernel. In that case we used to take the precise triple from
the dylib (which would be macosx, not ios-simulator). Since we don’t
find debug info in the current dylib we would select the SDK from the
first dylib with debug info, which is ios-simulator.

This patch avoids this situation by
1. preferring the target triple if there is no Swift debug info
2. ensuring that the SDK always matches the triple

rdar://141173613
(cherry picked from commit 9bc04d3)
@adrian-prantl adrian-prantl merged commit df15e94 into swiftlang:next Dec 16, 2024
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