Skip to content

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

Merged
merged 3 commits into from
Apr 29, 2016
Merged

swift-reflection-test: Target SwiftRemoteMirror C API #2335

merged 3 commits into from
Apr 29, 2016

Conversation

bitjammer
Copy link
Contributor

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.

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

@bitjammer
Copy link
Contributor Author

LLDB needs to update its use of readBytes.

@bitjammer
Copy link
Contributor Author

LLDB change: apple/swift-lldb#25

@rjmccall
Copy link
Contributor

This doesn't need to change the C++ MemoryReader API; you can just change the C interfaces.

@bitjammer
Copy link
Contributor Author

Fair enough.

@bitjammer
Copy link
Contributor Author

@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;
Copy link
Contributor

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.

Copy link
Contributor Author

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.
@bitjammer bitjammer merged commit 30c2e05 into swiftlang:master Apr 29, 2016
@bitjammer bitjammer deleted the swift-reflection-test-C branch April 29, 2016 02:44
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