| Age | Commit message (Collapse) | Author |
|
de-bitrot the BSDs
|
|
|
|
Commit ea9917d9bd921f9fc14028a8dbf9e3f0f2579120 introduced usage
of fs.Dir.realpath which eventually calls os.getFdpath which is
forbidden to be used by the compiler. It causes building zig to fail on
OpenBsd, NetBSD and older versions of FreeBSD and DragonFly.
This patch substitutes with os.realpath on libc targets and eventually
calls c.realpath and allows zig to build. Any use of realpath is not
desired but this is the lesser evil.
|
|
|
|
instead of only using DWARF if `.debug_info` is present
coff: support reading from memory loaded by the loader, or a mapped file
|
|
|
|
Before this commit, you could use readElfDebugInfo independently with
one catch: the data is not freed since the deinitialization functions
for ModuleDebugInfo are private. This change makes them public so the
users of such function and similar can free the memory after the
debug symbols have been used.
|
|
|
|
differentiate between missing info and an actual unwind error in the message
|
|
dwarf: fixup unchecked .eh_frame CIE offset subtraction
|
|
dwarf: handle signal frame CIE flag
|
|
|
|
__unwind_info directly
|
|
lookups
|
|
|
|
debug: handle the possibility of eh_frame / debug_frame being mapped in memory or loaded from disk
|
|
|
|
|
|
register
|
|
|
|
|
|
dwarf: documentation fixups
target: enable unwind tables on macho
|
|
dwarf: map the V registers in abi.regBytes
test: add test case that exercises the stack-indirect __unwind_info mode in x86_64
|
|
dwarf: fixup tests that used a ThreadContext
|
|
section
dwarf: fixup missing error
|
|
infer it
dwarf: implement OP.entry_value, add tests
|
|
convesions
debug: dupeContext -> copyContext
|
|
expressions: add more tests, fix tests for mipsel
debug: add lookupModuleName implementation for macos
|
|
UnwindContext
|
|
dwarf: use ThreadContext instead of os.ucontext_t
dwarf: add regBytes impl for windows
dwarf: fixup expression types for non-native
|
|
|
|
|
|
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
|
|
sections
dwarf: const-correctness fixups
dwarf: implement the remaining register rules
dwarf: start implmenting the DWARF expression stack machine
|
|
linux
This change enhances stack trace output to include a note that debug info was missing,
and therefore the stack trace may not be accurate. For example, if the user is using a libc
compiled with -fomit-frame-pointer and doesn't have debug symbols installed, any traces
that begin in a libc function may not unwind correctly. This allows the user to notice this and
potentially install debug symbols to improve the output.
|
|
|
|
debug: supports_context -> have_ucontext, supports_getcontext -> have_getcontext
test: rework dwarf_unwind test case to also test the non-libc path
|
|
debug: make getContext public
|
|
I had accidentally regressed support for -gdwarf in 461fb499f3cff9038a427eae120fb34defc9ab38 when I changed the logic to
use the already-mapped exe/dll image instead of loading it from disk. The string table is mapped as all zeroes by the loader,
so if a section header's name is longer than 8 bytes (like the ones generated by -gdwarf), then the name can't be read.
Now, if any section headers require the string table, the file is mapped from disk.
windows: Add NtCreateSection/NtMapViewOfSection/NtUnmapViewOfSection
|
|
match the state after it would return)
debug: fixup ucontext_t check
|
|
- Fix unwindFrame using the previous FDE row instead of the current one
- Handle unwinding through noreturn functions
- Add x86-linux getcontext
- Fixup x86_64-linux getcontext not restoring the fp env
- Fix start_addr filtering on x86-windows
|
|
available
|
|
|
|
|
|
- .eh_frame_hdr contains a binary-searchable data structure for finding an FDE. If present, we can use this
section to avoid having to parse the entire FDE/CIE list in the binary, instead only entries that are actually
required for unwinding are read.
- rework the inputs pc-relative pointer decoding to support both already-mapped sections as well as sections
mapped from a file
- store the VirtualMachine on UnwindContext so the allocations can be reused
|
|
|
|
- increase test-std max_rss to 1.1 above the CI observed amount
|
|
|
|
dumpStackTraceFromBase, update crash_report to use this for exceptions
|
|
|