aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/SelfInfo/Elf.zig
AgeCommit message (Collapse)Author
2025-10-29std.debug.SelfInfo: add missing io parameter to getSymbolAndrew Kelley
2025-10-29std: fix seekBy unit testAndrew Kelley
2025-10-29std.Io: implement fileStatAndrew Kelley
2025-10-27remove all Oracle Solaris supportAlex Rønne Petersen
There is no straightforward way for the Zig team to access the Solaris system headers; to do this, one has to create an Oracle account, accept their EULA to download the installer ISO, and finally install it on a machine or VM. We do not have to jump through hoops like this for any other OS that we support, and no one on the team has expressed willingness to do it. As a result, we cannot audit any Solaris contributions to std.c or other similarly sensitive parts of the standard library. The best we would be able to do is assume that Solaris and illumos are 100% compatible with no way to verify that assumption. But at that point, the solaris and illumos OS tags would be functionally identical anyway. For Solaris especially, any contributions that involve APIs introduced after the OS was made closed-source would also be inherently more risky than equivalent contributions for other proprietary OSs due to the case of Google LLC v. Oracle America, Inc., wherein Oracle clearly demonstrated its willingness to pursue legal action against entities that merely copy API declarations. Finally, Oracle laid off most of the Solaris team in 2017; the OS has been in maintenance mode since, presumably to be retired completely sometime in the 2030s. For these reasons, this commit removes all Oracle Solaris support. Anyone who still wishes to use Zig on Solaris can try their luck by simply using illumos instead of solaris in target triples - chances are it'll work. But there will be no effort from the Zig team to support this use case; we recommend that people move to illumos instead.
2025-10-23std.Target: add arceb and xtensaeb Cpu.Arch tagsAlex Rønne Petersen
2025-10-18std.debug: add CPU context and DWARF mappings for arcAlex Rønne Petersen
2025-10-18std.debug: add CPU context and DWARF mappings for m68kAlex Rønne Petersen
2025-10-18std.debug: add CPU context and DWARF mappings for or1kAlex Rønne Petersen
2025-10-18std.debug: add CPU context and DWARF mappings for cskyAlex Rønne Petersen
2025-10-15std.debug.SelfInfo.Elf: don't support DWARF unwinding for Hexagon and PowerPCAlex Rønne Petersen
As for SPARC, FP-based unwinding is superior on these.
2025-10-10std.debug: greatly expand target support for segfault handling/unwindingAlex Rønne Petersen
I made a couple of decisions for this based on the fact that we don't expose the signal_ucontext_t type outside of the file: * Adding all the floating point and vector state to every ucontext_t and mcontext_t variant was way, way too much work, especially when we don't even use the stuff. So I deleted all that and kept only the bare minimum needed to reach into general-purpose registers. * There is no particularly compelling reason to stick to the naming and struct nesting used in the system headers. So we can actually unify the access patterns for almost all of these variants by taking some liberties here; as a result, fromPosixSignalContext() is now much nicer to read and extend.
2025-10-07std.debug: add unwind support for powerpc*-linuxAlex Rønne Petersen
2025-10-07std.debug: add unwind support for mips*-linuxAlex Rønne Petersen
2025-10-05std.debug: add unwind support for hexagon-linuxAlex Rønne Petersen
2025-10-05std.debug.SelfInfo.Elf: disable unwinding on mips n32 and x86 x32Alex Rønne Petersen
The DWARF code can't handle these yet. ref https://github.com/ziglang/zig/issues/25447
2025-10-03std.debug: Add unwind support for serenityLinus Groh
2025-10-03std.debug: add s390x-linux unwind supportAlex Rønne Petersen
2025-10-01std.debug: add riscv32-linux and riscv64-linux unwind supportAlex Rønne Petersen
2025-10-01std.debug: add loongarch64-linux unwind supportAlex Rønne Petersen
2025-10-01std.debug: some adjustments to target handlingAlex Rønne Petersen
* driverkit handling missing in a few places. * x86-solaris is a dead target. * aarch64_be does not exist on Darwin, FreeBSD, Windows.
2025-09-30std.debug.SelfInfo: remove shared logicmlugg
There were only a few dozen lines of common logic, and they frankly introduced more complexity than they eliminated. Instead, let's accept that the implementations of `SelfInfo` are all pretty different and want to track different state. This probably fixes some synchronization and memory bugs by simplifying a bunch of stuff. It also improves the DWARF unwind cache, making it around twice as fast in a debug build with the self-hosted x86_64 backend, because we no longer have to redundantly go through the hashmap lookup logic to find the module. Unwinding on Windows will also see a slight performance boost from this change, because `RtlVirtualUnwind` does not need to know the module whatsoever, so the old `SelfInfo` implementation was doing redundant work. Lastly, this makes it even easier to implement `SelfInfo` on freestanding targets; there is no longer a need to emulate a real module system, since the user controls the whole implementation! There are various other small refactors here in the `SelfInfo` implementations as well as in the DWARF unwinding logic. This change turned out to make a lot of stuff simpler!