Skip to content

Conversation

@adrian-prantl
Copy link

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

@adrian-prantl adrian-prantl requested a review from a team as a code owner December 12, 2024 18:08
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

Comment on lines +2900 to +2905

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this too noisy to report as a Diagnostic? This seems pretty valuable and something we could deduplicate at the Module level perhaps?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my first draft, I had this as Debugger::ReportWarning. But the problem I see is that it could be really hard to associate the warning with the action that triggered it. You get the warning when the first Swift type system in that SymbolContext is initialized, but that might be triggered by, eg., your IDE's variable view.

@adrian-prantl
Copy link
Author

@swift-ci test linux

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
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 1274e90 into swiftlang:swift/release/6.1 Dec 16, 2024
3 checks passed
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