Skip to content

Conversation

@kastiglione
Copy link
Contributor

@kastiglione kastiglione commented Nov 18, 2025

Adds an overload of _DebuggerSupport.stringForPrintObject which takes a pointer and mangled typename as arguments. This will be used to improve performance and resilience of po in lldb.

The pointer and mangled typename are used to construct an Any value, which is then passed into the primary implementation of stringForPrintObject.

This allows calling stringForPrintObject without having to first construct a context that contains all necessary Swift modules. This will improve speed, and also resilience when modules cannot be loaded for whatever reason.

rdar://158968103
(cherry picked from PR #84742)

Adds an overload of `_DebuggerSupport.stringForPrintObject` which takes a pointer and mangled typename as arguments. This will be used to improve performance and resilience of `po` in lldb.

The pointer and mangled typename are used to construct an `Any` value, which is then passed into the primary implementation of `stringForPrintObject`.

This allows calling `stringForPrintObject` without having to first construct a context that contains all necessary Swift modules. This will improve speed, and also resilience when modules cannot be loaded for whatever reason.

rdar://158968103
(cherry picked from commit b6b477d)
@kastiglione kastiglione requested a review from a team as a code owner November 18, 2025 22:34
@kastiglione kastiglione changed the title [Debug] Add pointer based stringForPrintObject (#84742) [6.3][Debug] Add pointer based stringForPrintObject Nov 18, 2025
@kastiglione
Copy link
Contributor Author

@swift-ci smoke test

@kastiglione
Copy link
Contributor Author

@swift-ci smoke test windows

@kastiglione
Copy link
Contributor Author

@swift-ci smoke test macOS

@adrian-prantl
Copy link
Contributor

@swift-ci test

@adrian-prantl adrian-prantl merged commit d4ae238 into release/6.3 Nov 21, 2025
5 checks passed
@adrian-prantl adrian-prantl deleted the dl/Debug-Add-pointer-based-stringForPrintObject-84742 branch November 21, 2025 05:13
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.

3 participants