Skip to content

[lldb] Add an extra optional did_read_live_memory to Target::ReadMemory and [lldb] Implement LLDBMemoryReader::readRemoteAddressImpl #11015

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

[lldb] Add an extra optional did_read_live_memory to Target::ReadMemory

Target::ReadMemory may or may not read live memory, but whether it did
read from live memory or from the filecache is opaque to callers. Add an
extra out parameter to indicate whether live memory was read or not.


[lldb] Implement LLDBMemoryReader::readRemoteAddressImpl

Use the new out parameter on Target::ReadMemory to set the correct
remote address space in readRemoteAddressImpl.

rdar://148361743

@augusto2112 augusto2112 requested a review from a team as a code owner July 17, 2025 04:31
@augusto2112
Copy link
Author

swiftlang/swift#83122
@swift-ci test

@augusto2112
Copy link
Author

swiftlang/swift#83122
@swift-ci test

@augusto2112
Copy link
Author

00:28:49  Failed Tests (1):
00:28:49    lldb-unit :: Expression/./ExpressionTests/DWARFExpressionMockProcessTest/DW_OP_piece_file_addr

@augusto2112
Copy link
Author

swiftlang/swift#83122
@swift-ci test

Target::ReadMemory may or may not read live memory, but whether it did
read from live memory or from the filecache is opaque to callers. Add an
extra out parameter to indicate whether live memory was read or not.
Use the new out parameter on Target::ReadMemory to set the correct
remote address space in readRemoteAddressImpl.

rdar://148361743
@augusto2112 augusto2112 force-pushed the fix-read-remote-address branch from 9cf59f4 to b7ac8fd Compare July 17, 2025 15:21
@augusto2112
Copy link
Author

swiftlang/swift#83122
@swift-ci test

@augusto2112 augusto2112 requested a review from jasonmolenda July 17, 2025 18:09
Copy link

@jasonmolenda jasonmolenda left a comment

Choose a reason for hiding this comment

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

Target:ReadMemory API changes look good, makes sense why you need this.

Copy link

@medismailben medismailben left a comment

Choose a reason for hiding this comment

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

LGTM with comments.

@augusto2112 augusto2112 merged commit bba436f into swiftlang:stable/20240723 Jul 18, 2025
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.

4 participants