mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Split swift-refleciton-test into host and target test targets
swift-reflection-test is now the test that forks a swift executable and performs remote reflection, making it runnable on other targets, such as the iOS simulator. swift-reflection-dump is now a host-side tool that dumps the remote reflection sections for any platform binary and will continue to link in LLVM object file support. This necessitates finally moving lib/Refleciton into stdlib/public, since we're linking target-specific versions of the test tool and we would eventually like to adopt some of this functionality in the runtime anyway.
This commit is contained in:
@@ -187,8 +187,8 @@ internal func sendReflectionInfos() {
|
||||
for info in infos {
|
||||
debugLog("Sending info for \(info.imageName)")
|
||||
let imageNameBytes = Array(info.imageName.utf8)
|
||||
var imageNameLength = UInt64(imageNameBytes.count)
|
||||
fwrite(&imageNameLength, sizeof(UInt64.self), 1, stdout)
|
||||
var imageNameLength = UInt(imageNameBytes.count)
|
||||
fwrite(&imageNameLength, sizeof(UInt.self), 1, stdout)
|
||||
fflush(stdout)
|
||||
fwrite(imageNameBytes, 1, imageNameBytes.count, stdout)
|
||||
fflush(stdout)
|
||||
@@ -235,7 +235,7 @@ internal func sendSymbolAddress() {
|
||||
name.withCString {
|
||||
let handle = unsafeBitCast(Int(-2), to: UnsafeMutablePointer<Void>.self)
|
||||
let symbol = dlsym(handle, $0)
|
||||
let symbolAddress = unsafeBitCast(symbol, to: UInt64.self)
|
||||
let symbolAddress = unsafeBitCast(symbol, to: UInt.self)
|
||||
sendValue(symbolAddress)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user