Add backtrace infrastructure and binary analysis tooling#29
Add backtrace infrastructure and binary analysis tooling#29zouguangxian merged 1 commit intomainfrom
Conversation
PR SummaryHigh Risk Overview Updates Introduces a new Improves developer workflow by enhancing the Rust pre-commit hook (better exec error messages, PATH expansion, workspace check + Written by Cursor Bugbot for commit f659716. This will update automatically on new commits. Configure here. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- Only set RUST_BACKTRACE=full in DWARF mode (not in off/frame-pointers) - Fix temp file cleanup in build-backtrace.sh to include all temp files Fixes issues raised in PR #29 review.
86ff3f1 to
0993b2e
Compare
e1211f6 to
04d7b52
Compare
Add comprehensive backtrace and binary size analysis capabilities: - **New crate: zeroos-backtrace** - Frame pointer and DWARF-based backtraces - **New crate: elf-report** - Binary size analysis and symbol mapping - **New command: analyze_backtrace** - Analyze backtrace output from binaries - **New build script: build-backtrace.sh** - Build binaries with backtrace support Improve xtask tooling: - Add `check_workspace` to enforce workspace consistency rules - Add `massage` to run cargo tasks on specified packages - Add `spike_syscall_instcount` to measure syscall instruction counts - Reorganize xtask commands under `cmds/` module Other improvements: - Update pre-commit hook for better error handling - Add AGENTS.md documentation - Update runtime panic handling to support backtraces - Improve build system and linker configuration
04d7b52 to
f659716
Compare
Summary
This PR adds comprehensive backtrace and binary analysis capabilities to ZeroOS:
New Infrastructure
zeroos-backtracecrate: Frame pointer and DWARF-based backtrace supportelf-reportcrate: Binary size analysis and symbol mapping toolanalyze_backtracecommand: Analyze backtrace output from binariesbuild-backtrace.sh: Build script for backtrace-enabled binariesImproved Tooling
check_workspace: Enforce workspace consistency rules on package versionsmassage: Run common cargo tasks (fix, clippy, fmt, check, test) on packagesspike_syscall_instcount: Measure syscall instruction counts from Spike logscmds/moduleOther Improvements
Test Plan
./build-backtrace.shcargo run -p elf-report -- <binary>cargo xtask check_workspace,cargo xtask massageChanges
zeroos-backtrace,elf-report