Skip to content

[NFC][lldb] Adapt LLDB to RemoteInspection's RemoteAddress changes #10981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

augusto2112
Copy link

@augusto2112 augusto2112 commented Jul 10, 2025

Now that RemoteAddress carries its address space, instead of using a
high bit to turn on the filecache optimization, use that instead. This
way we are guaranteed to not clash with any pointer authentication
masks.

adrian-prantl and others added 2 commits July 10, 2025 14:10
Adapts LLDB to the new field in RemoteAddress. This is an NFC that
maintains the current behavior. A follow up patch will be introduced
later that takes advantage of the new behavior to fix a bug in reading
metadata from files instead of the process.

rdar://148361743
(cherry picked from commit 12f429a)
@augusto2112
Copy link
Author

swiftlang/swift#82972
@swift-ci test

Now that RemoteAddress carries its address space, instead of using a
high bit to turn on the filecache optimization, use that instead. This
way we are guaranteed to not clash with any pointer authentication
masks.

rdar://148361743
(cherry picked from commit b283038e2aad625ff455a10f2590ed2501c987eb)
@augusto2112
Copy link
Author

swiftlang/swift#82972
@swift-ci test

@augusto2112
Copy link
Author

swiftlang/swift#82997
@swift-ci test

@augusto2112 augusto2112 marked this pull request as ready for review July 14, 2025 16:25
@augusto2112 augusto2112 requested a review from a team as a code owner July 14, 2025 16:25
Copy link

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

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

LGTM. The majority of these changes are mechanical. The few that aren't are matching the existing behavior.

@@ -51,7 +51,7 @@ class MemoryReaderLocalBufferHolder {

class LLDBMemoryReader : public swift::remote::MemoryReader {
public:

static constexpr uint8_t LLDBAddressSpace = 1;

Choose a reason for hiding this comment

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

Maybe add a comment here saying that anything but address space 0 is fair play and that each tool/client can define their own, so there's no risk trampling over someone else's address space.

Copy link
Author

Choose a reason for hiding this comment

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

I'll add a comment on the stable branch

@JDevlieghere JDevlieghere merged commit b6943cf into swiftlang:swift/release/6.2 Jul 14, 2025
3 checks passed
@augusto2112 augusto2112 deleted the change-remote-addr-6.2 branch July 14, 2025 20:24
@augusto2112 augusto2112 restored the change-remote-addr-6.2 branch July 14, 2025 22:45
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