aboutsummaryrefslogtreecommitdiff
path: root/lib/std/dwarf
AgeCommit message (Collapse)Author
2025-09-30fix compiler ftbfs from std.macho and std.dwarf changesmlugg
2025-09-30change one million thingsmlugg
2024-12-19Dwarf: remove redundant debug infoJacob Young
2024-12-16Dwarf: include comptime-only values in debug infoJacob Young
2024-08-17Dwarf: fix and test allowzero pointersJacob Young
2024-08-16Dwarf: rework self-hosted debug info from scratchJacob Young
This is in preparation for incremental and actually being able to debug executables built by the x86_64 backend.
2024-08-01std: dwarf namespace reorgAndrew Kelley
std.debug.Dwarf is the parsing/decoding logic. std.dwarf remains the unopinionated types and bits alone. If you look at this diff you can see a lot less redundancy in namespaces.
2024-07-10dwarf: use StackIterator.MemoryAccessor to check memory accesses instead of ↵kcbanner
isValidMemory
2024-07-09std: fix typos (#20560)Jora Troosh
2024-06-23Rename *[UI]LEB128 functions to *[UI]leb128Michael Bradshaw
2024-03-19extract std.posix from std.osAndrew Kelley
closes #5019
2024-02-18dwarf: optimize dwarf parsing for speedJacob Young
This code is run when printing a stack trace in a debug executable, so it has to be fast even without compiler optimizations. Adding a `@panic` to the top of `main` and running an x86_64 backend compiled compiler goes from `1m32.773s` to `0m3.232s`.
2024-02-18Dwarf: use a user tag for paddingJacob Young
2024-01-18openbsd: add proper support for aarch64Sebastien Marie
define openbsd specific elements in std/dwarf/abi.zig regBytes() work from Jasper Lievisse Adriaanse, with register values from sys/signal.h and https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst#dwarf-register-names
2023-11-19lib: correct unnecessary uses of 'var'mlugg
2023-10-31mem: fix ub in writeIntJacob Young
Use inline to vastly simplify the exposed API. This allows a comptime-known endian parameter to be propogated, making extra functions for a specific endianness completely unnecessary.
2023-10-29x86_64: fix compiler rt test failuresJacob Young
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-21x86_64: disable failing tests, enable test-std testingJacob Young
2023-10-02Add illumos OS tagStephen Gregoratto
- Adds `illumos` to the `Target.Os.Tag` enum. A new function, `isSolarish` has been added that returns true if the tag is either Solaris or Illumos. This matches the naming convention found in Rust's `libc` crate[1]. - Add the tag wherever `.solaris` is being checked against. - Check for the C pre-processor macro `__illumos__` in CMake to set the proper target tuple. Illumos distros patch their compilers to have this in the "built-in" set (verified with `echo | cc -dM -E -`). Alternatively you could check the output of `uname -o`. Right now, both Solaris and Illumos import from `c/solaris.zig`. In the future it may be worth putting the shared ABI bits in a base file, and mixing that in with specific `c/solaris.zig`/`c/illumos.zig` files. [1]: https://github.com/rust-lang/libc/tree/6e02a329a2a27f6887ea86952f389ca11e06448c/src/unix/solarish
2023-09-30solaris: add missing registersRyan Zezeski
2023-09-27Remove `@fabs`, fabs and absCast/Int from std libantlilja
Replaces occurences of @fabs absCast and absInt with new @abs builtin. Also removes the std.math.fabs alias from math.zig.
2023-08-22compiler: move unions into InternPoolAndrew Kelley
There are a couple concepts here worth understanding: Key.UnionType - This type is available *before* resolving the union's fields. The enum tag type, number of fields, and field names, field types, and field alignments are not available with this. InternPool.UnionType - This one can be obtained from the above type with `InternPool.loadUnionType` which asserts that the union's enum tag type has been resolved. This one has all the information available. Additionally: * ZIR: Turn an unused bit into `any_aligned_fields` flag to help semantic analysis know whether a union has explicit alignment on any fields (usually not). * Sema: delete `resolveTypeRequiresComptime` which had the same type signature and near-duplicate logic to `typeRequiresComptime`. - Make opaque types not report comptime-only (this was inconsistent between the two implementations of this function). * Implement accepted proposal #12556 which is a breaking change.
2023-08-15netbsd: std.dwarf.abi: disable x86_64 regBytes()Michael Dusan
We do not yet have correct implementation to access xmm registers from the world of ucontext/mcontext. Unimplement .netbsd to allow building zig compiler.
2023-08-15std: fix compilation errors in dwarf/abi.zig when targeting iOSJakub Konka
2023-08-14dwarf: add missing length check in rowColumnskcbanner
2023-07-26target: emit unwind tables if the platform supports unwindingkcbanner
2023-07-25dwarf: small code size reduction in expression runnerkcbanner
2023-07-24simplify call frame instruction parserkcbanner
2023-07-24fixup inline switchkcbanner
2023-07-20dwarf: implement aarch64 default register ruleskcbanner
2023-07-20dwarf: fix the unwinder using the incorrect row from the FDE in certain caseskcbanner
2023-07-20dwarf: add abi.stripInstructionPtrAuthCodekcbanner
2023-07-20debug: fixup last_error being printed too many timeskcbanner
2023-07-20debug: fix initialization of the optional fields on StackIteratorkcbanner
dwarf: documentation fixups target: enable unwind tables on macho
2023-07-20macho: add aarch64 implementation to unwindFramekcbanner
dwarf: map the V registers in abi.regBytes test: add test case that exercises the stack-indirect __unwind_info mode in x86_64
2023-07-20debug: add relocateContextkcbanner
dwarf: fixup tests that used a ThreadContext
2023-07-20macho: add unwindFrame which can unwind stack frames using the __unwind_info ↵kcbanner
section dwarf: fixup missing error
2023-07-20dwarf: add ExpressionError to work around the compiler not being able to ↵kcbanner
infer it dwarf: implement OP.entry_value, add tests
2023-07-20dwarf: skip register tests on unimplemented arch / os, add tests for type ↵kcbanner
convesions debug: dupeContext -> copyContext
2023-07-20dwarf: fixup default endianness in ExpressionOptions, add control flow testskcbanner
2023-07-20dwarf: fixup regBytes for the case where there is no context supportkcbanner
expressions: add more tests, fix tests for mipsel debug: add lookupModuleName implementation for macos
2023-07-20debug: add dupeContext, store a pointer to a copy of ThreadContext on ↵kcbanner
UnwindContext
2023-07-20dwarf: implement constx,addrx, begin adding DWARF expression testskcbanner
2023-07-20debug: rename StackTraceContext to ThreadContextkcbanner
dwarf: use ThreadContext instead of os.ucontext_t dwarf: add regBytes impl for windows dwarf: fixup expression types for non-native
2023-07-20dwarf: expression fixups for non-64bit arches, check call_frame_context when ↵kcbanner
writing expressions
2023-07-20dwarf: add expression writerkcbanner
2023-07-20dwarf: introduce ExpressionContext, add more expression opcodeskcbanner
2023-07-20debug: fixup base address calculations for machokcbanner
dwarf: fixup x86 register mapping logic dwarf: change the register context update to update in-place instead of copying debug: always print the unwind error type