Mike Ash
ef863ab00a
[RemoteMirrors] Have interop header cache address->library lookups.
...
rdar://problem/37538580
2018-03-16 16:24:54 -04:00
Mike Ash
cdf890b8be
[RemoteMirrors] Document lookupMetadata.
...
rdar://problem/37538580
2018-03-08 13:31:50 -05:00
Mike Ash
da2649a433
[RemoteMirrors] Fix the declaration of lookupMetadata.
...
rdar://problem/37538580
2018-03-08 13:29:51 -05:00
Mike Ash
ac026128d1
[RemoteMirrors] Provide interop function for converting a raw metadata pointer into a swift_metadata_interop_t.
...
rdar://problem/37538580
2018-03-08 13:25:09 -05:00
Mike Ash
0e3044bd3a
[RemoteMirrors] Provide interop types for typeinfo and childinfo.
...
rdar://problem/37538580
2018-03-08 10:28:11 -05:00
Mike Ash
c01b9e05ca
[RemoteMirrors] Fix a bunch of missing static inlines from SwiftRemoteMirrorLegacyInterop.h.
2018-03-05 10:26:36 -05:00
Mike Ash
acb4142b1a
[RemoteMirrors] Move the interop typedefs into a separate header for API clients that just want to pass the types around.
2018-03-05 09:36:44 -05:00
Mike Ash
1434fce417
[RemoteMirrors] Switch #ifdef __APPLE__ to #if defined(__APPLE__) && defined(__MACH__) to be more specific about the fact that this code is for MachO.
2018-03-02 11:03:45 -05:00
Mike Ash
83837ccd12
[RemoteMirrors] Clean up some documentation, comments and macros. Add an assert for pointer sizes that don't match what SwiftRemoteMirror.cpp was built with.
2018-03-01 15:39:14 -05:00
Mike Ash
b3522fa139
[RemoteMirrors] Read the TEXT segment into local memory when getting legacy reflection sections. Test that this works when memory is read into a dynamic buffer.
2018-03-01 13:56:29 -05:00
Mike Ash
09181712d4
[RemoteMirrors] Move up the typedef for SwiftReflectionInteropContextRef so things compile again.
2018-03-01 13:55:20 -05:00
Mike Ash
4424b2757f
[RemoteMirrors] Add some header documentation and add prototypes for the "public" interop functions.
2018-02-28 16:36:17 -05:00
Mike Ash
c059ff2a5c
[RemoteMirrors] Fix the ownership check for legacy libraries. The working implementation requires a non-legacy library to be present. Fall back to always saying "yes" otherwise.
2018-02-27 17:06:37 -05:00
Mike Ash
0b5876607e
[RemoteMirrors] Implement object ownership interop for the legacy library. This avoids crashing when inspecting newer metadata with only the legacy library loaded.
2018-02-27 15:16:16 -05:00
Mike Ash
d775f72d19
[RemoteMirrors] Support passing NULL for the FreeBytesFunction.
2018-02-27 15:16:15 -05:00
Mike Ash
71f1c391ab
[RemoteMirrors] Move FreeBytesFunction from an out-parameter on ReadBytesFunction to a function pointer passed in when creating a reflection context.
2018-02-27 12:51:04 -05:00
Mike Ash
6f887475a3
[Reflection] Lots of smaller fixes and API changes due to testing the interop code.
...
* Remove getPointerSize and getSizeSize functions, replace with a single PointerSize value.
* Remove imageLength parameter from addImage, calculate it internally instead.
* Check remote mirrors libraries' metadata version and reject them if it's too old.
* Shim GetStringLength and GetSymbolAddress for the legacy library since we don't pass the caller's context pointer through directly.
* Actually set the IsLegacy flag in the Library struct.
* Implement ownsObject by tracking each added image's data segment and checking metadata pointers against them. The previous approach didn't work.
2018-02-26 16:56:54 -05:00
Mike Ash
1ad9729bb5
[Reflection] Add the last of the interop APIs.
...
rdar://problem/37538580
2018-02-23 13:57:13 -05:00
Mike Ash
4ae7740c28
[Reflection] Fill out more remote mirror interop APIs.
...
rdar://problem/37538580
2018-02-23 13:20:18 -05:00
Mike Ash
4c7d203574
[Reflection] Implement more interop API calls.
...
rdar://problem/37538580
2018-02-23 11:47:24 -05:00
Mike Ash
89d9f2ba82
[Reflection] Start work on a header to help clients that want to use both old and new remote mirrors libraries at the same time.
...
rdar://problem/37538580
2018-02-22 12:07:39 -05:00