-
Notifications
You must be signed in to change notification settings - Fork 10.5k
swift-reflection-test: Target SwiftRemoteMirror C API #2335
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
swift-reflection-test: Target SwiftRemoteMirror C API #2335
Conversation
@swift-ci Please smoke test |
LLDB needs to update its use of readBytes. |
LLDB change: apple/swift-lldb#25 |
This doesn't need to change the C++ MemoryReader API; you can just change the C interfaces. |
Fair enough. |
@swift-ci Please smoke test |
@@ -72,7 +72,7 @@ class CMemoryReader final : public MemoryReader { | |||
|
|||
bool readBytes(RemoteAddress address, uint8_t *dest, uint64_t size) override { | |||
return Impl.readBytes(Impl.reader_context, | |||
address.getAddressData(), dest, size); | |||
address.getAddressData(), dest, size) == 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevailing C convention is that you should be testing != 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool - I'll fix it up before merging.
This tool should test the usage from SwiftRemoteMirror dylib and the C API, since that is the public interface from which we're vending the remote reflection functionality.
These tools are always architecture-specific and always match the architecture of the built Swift binary that links against SwiftReflectionTest, so they can statically reference the size of their pointer types.
This tool should test the usage from SwiftRemoteMirror dylib and
the C API, since that is the public interface from which we're
vending the remote reflection functionality.