Commit Graph

6 Commits

Author SHA1 Message Date
Alastair Houghton c27e93fc8e [Backtracing][Win32] Scan the global symbol stream and deduplicate.
While for Swift symbols, they always exist in the module streams, the
PDBs that Microsoft serves from its symbol servers don't work that
way, and contain symbols that don't show up in the module streams.

Thus we need to add function data for each of those.

That then creates a problem where the symbol is in both places, so we
need to de-duplicate as well.

rdar://176547291
2026-05-08 16:37:22 +01:00
Doug Gregor 453277eb74 Mark the various with* functions as @safe
Functions like withUnsafeBufferPointer are, by themselves, safe to
call. It's only the operations on the unsafe pointers passed into the
closure that are the safety issue.

This was the intent spelled out in SE-0458 but was not fully realized
in the library.

Fixes rdar://174519372.
2026-04-16 22:37:54 -07:00
Allan Shortlidge ec6bb44c74 stdlib: Adopt #if os(anyAppleOS).
Replace error prone and verbose compilation conditionals like

```
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
```

with

```
#if os(anyAppleOS)
```
2026-03-26 10:19:00 -07:00
Alastair Houghton 19b823c9db [Backtracing][PDB] Fix 32-bit Intel build. (#87304) 2026-02-18 07:14:00 -08:00
Alastair Houghton 487e173a26 [Backtracing][PDB] Scan the main symbol stream as well.
Without scanning the main symbol stream, we get weird names for the
Swift functions in the backtrace, because the compiler generates C++-style
names for them.  We actually want the mangled names, if possible, which
only seem to be in the symbol stream, so scan that as well and use it
to find mangled names.

rdar://168454023
2026-02-17 10:50:56 +00:00
Alastair Houghton acdaeef626 [Backtracing][PDB] Add PDB code and SymbolLocator.
Added the PDB reading code and also a `SymbolLocator` type that
allows us to locate symbols for a given image.

rdar://168454023
2026-02-17 10:50:55 +00:00