aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/Dwarf/SelfUnwinder.zig
AgeCommit message (Collapse)Author
2025-11-12std.debug: allow fp unwind from contextMatthew Lugg
It's easy to do FP unwinding from a CPU context: you just report the captured ip/pc value first, and then unwind from the captured fp value. All this really needed was a couple of new functions on the `std.debug.cpu_context` implementations so that we don't need to rely on `std.debug.Dwarf` to access the captured registers. Resolves: #25576
2025-10-10std.debug.Dwarf.SelfUnwinder: assume same-value rule by default for all columnsAlex Rønne Petersen
This fixes leaf function unwinding, presumably among other things.
2025-10-08Merge pull request #25493 from alexrp/std-debug-mips-ppcAlex Rønne Petersen
`std.debug`: MIPS and PowerPC unwind support + some other stuff
2025-10-07std.debug.Dwarf.SelfUnwinder: add an s390x check missed in ↵Alex Rønne Petersen
95bdb0c1c65c128923ffac3f4be6b4619eb4a54b
2025-10-07std.debug.Dwarf.SelfUnwinder: skip caching rules for unsupported registersAlex Rønne Petersen
For unwinding purposes, we don't care about unsupported registers. Yet because we added these rules to the cache entry, we'd later try to evaluate them and thus fail the unwind attempt for no good reason. They'd also take up cache rule slots that would be better spent on actually relevant registers. Note that any attempt to read unsupported registers during unwinding will still fail the unwind attempt as expected.
2025-10-03std.debug.Dwarf.SelfUnwinder: default some s390x registers to the same-value ↵Alex Rønne Petersen
rule
2025-10-03std.debug: add s390x-linux unwind supportAlex Rønne Petersen
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!