clang -shared -o /tmp/test-dylib.dylib test-dylib.c
export DYLD_INSERT_LIBRARIES=/tmp/test-dylib.dylib
| #ifdef _WIN32 | |
| #include <ws2tcpip.h> | |
| #include <in6addr.h> | |
| #else | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netdb.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> | |
| #endif |
| #include <assert.h> | |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/mman.h> | |
| #include <unistd.h> | |
| int main() |
| #include <dispatch/dispatch.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| #include <errno.h> | |
| #include <stdlib.h> | |
| int main() | |
| { | |
| int pipes[2] = {0, 0}; | |
| int err = pipe(pipes); |
| // | |
| // WemoControl.swift | |
| // WemoSchedule | |
| // | |
| // Created by Johannes Weiß on 12/03/2016. | |
| // Copyright © 2016 Johannes Weiß. All rights reserved. | |
| // | |
| import Foundation |
| //===----------------------------------------------------------------------===// | |
| // | |
| // This source file is part of the SwiftNIO open source project | |
| // | |
| // Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors | |
| // Licensed under Apache License v2.0 | |
| // | |
| // See LICENSE.txt for license information | |
| // See CONTRIBUTORS.txt for the list of SwiftNIO project authors | |
| // |
| import Foundation | |
| public struct SandwichError: Error, Equatable, CustomStringConvertible { | |
| private enum SandwichErrorCode: Int { | |
| case tooLittleSalami = 1 | |
| case tooLittleMustard | |
| case noTomatoes | |
| case noBread | |
| } |
| lldb --batch -o run -k "image list" -k "register read" -k "bt all" -k "exit 134" ./my-program |