Skip to content

[Backtracing] Local|RemoteMemoryReader only exists on macOS and Linux. #79111

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 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/public/RuntimeModule/Elf.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,9 @@ typealias Elf64Image = ElfImage<Elf64Traits>
/// Test if there is a valid ELF image at the specified address; if there is,
/// extract the address range for the text segment and the UUID, if any.
@_specialize(kind: full, where R == UnsafeLocalMemoryReader)
#if os(macOS) || os(Linux)
@_specialize(kind: full, where R == RemoteMemoryReader)
#endif
#if os(Linux)
@_specialize(kind: full, where R == MemserverMemoryReader)
#endif
Expand Down Expand Up @@ -1915,8 +1917,10 @@ func getElfImageInfo<R: MemoryReader>(at address: R.Address,

@_specialize(kind: full, where R == UnsafeLocalMemoryReader, Traits == Elf32Traits)
@_specialize(kind: full, where R == UnsafeLocalMemoryReader, Traits == Elf64Traits)
#if os(macOS) || os(Linux)
@_specialize(kind: full, where R == RemoteMemoryReader, Traits == Elf32Traits)
@_specialize(kind: full, where R == RemoteMemoryReader, Traits == Elf64Traits)
#endif
#if os(Linux)
@_specialize(kind: full, where R == MemserverMemoryReader, Traits == Elf32Traits)
@_specialize(kind: full, where R == MemserverMemoryReader, Traits == Elf64Traits)
Expand Down
12 changes: 12 additions & 0 deletions stdlib/public/RuntimeModule/FramePointerUnwinder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public struct FramePointerUnwinder<C: Context, M: MemoryReader>: Sequence, Itera
var reader: MemoryReader

@_specialize(exported: true, kind: full, where C == HostContext, M == UnsafeLocalMemoryReader)
#if os(macOS) || os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == RemoteMemoryReader)
#endif
#if os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == MemserverMemoryReader)
#endif
Expand Down Expand Up @@ -77,7 +79,9 @@ public struct FramePointerUnwinder<C: Context, M: MemoryReader>: Sequence, Itera
}

@_specialize(exported: true, kind: full, where C == HostContext, M == UnsafeLocalMemoryReader)
#if os(macOS) || os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == RemoteMemoryReader)
#endif
#if os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == MemserverMemoryReader)
#endif
Expand Down Expand Up @@ -114,7 +118,9 @@ public struct FramePointerUnwinder<C: Context, M: MemoryReader>: Sequence, Itera
}

@_specialize(exported: true, kind: full, where C == HostContext, M == UnsafeLocalMemoryReader)
#if os(macOS) || os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == RemoteMemoryReader)
#endif
#if os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == MemserverMemoryReader)
#endif
Expand All @@ -129,7 +135,9 @@ public struct FramePointerUnwinder<C: Context, M: MemoryReader>: Sequence, Itera
}

@_specialize(exported: true, kind: full, where C == HostContext, M == UnsafeLocalMemoryReader)
#if os(macOS) || os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == RemoteMemoryReader)
#endif
#if os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == MemserverMemoryReader)
#endif
Expand All @@ -138,7 +146,9 @@ public struct FramePointerUnwinder<C: Context, M: MemoryReader>: Sequence, Itera
}

@_specialize(exported: true, kind: full, where C == HostContext, M == UnsafeLocalMemoryReader)
#if os(macOS) || os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == RemoteMemoryReader)
#endif
#if os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == MemserverMemoryReader)
#endif
Expand All @@ -155,7 +165,9 @@ public struct FramePointerUnwinder<C: Context, M: MemoryReader>: Sequence, Itera
}

@_specialize(exported: true, kind: full, where C == HostContext, M == UnsafeLocalMemoryReader)
#if os(macOS) || os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == RemoteMemoryReader)
#endif
#if os(Linux)
@_specialize(exported: true, kind: full, where C == HostContext, M == MemserverMemoryReader)
#endif
Expand Down