Skip to content

Backtrace support#304

Draft
arihant2math wants to merge 1 commit into
hexagonal-sun:masterfrom
arihant2math:backtraces2
Draft

Backtrace support#304
arihant2math wants to merge 1 commit into
hexagonal-sun:masterfrom
arihant2math:backtraces2

Conversation

@arihant2math
Copy link
Copy Markdown
Collaborator

@arihant2math arihant2math commented May 14, 2026

Mostly glued together from the original redox implementation.

Passing --demangle will cause qemu to scan for FP and PC and will running symbol demangling on the host machine.

stdin/stdout is somewhat broken in --demangle, however it works.

Example:

/ # times
[   33.33618002] moss: Kernel panicked at src/arch/arm64/exceptions/syscall.rs:818:14: Unhandled syscall 0x99, PC: 0x7000000681a0
[   33.33619426] backtrace:   FP ffffb80000017980: PC ffff8000000acdf4
        => __rustc::rust_begin_unwind at /Users/anaren/Documents/oss/moss/src/main.rs:80
[   33.33619598] backtrace:   FP ffffb80000017ab0: PC ffff800000120b04
        => core::ptr::align_offset::<u8> at /rustc/64a965e9013a9d14e83c4d370af26f6be6bf96fb/library/core/src/ptr/mod.rs:2308
[   33.33619682] backtrace:   FP ffffb80000017af0: PC ffff8000000720f0
        => moss::arch::arm64::exceptions::syscall::handle_syscall::{closure#0} at /Users/anaren/Documents/oss/moss/src/arch/arm64/exceptions/syscall.rs:120
[   33.33619750] backtrace:   FP ffffb80000017b40: PC ffff8000000cadf4
        => moss::sched::uspc_ret::dispatch_userspace_task at /Users/anaren/Documents/oss/moss/src/sched/uspc_ret.rs:148
[   33.33619832] backtrace:   FP ffffb80000017de0: PC ffff8000000fb5dc
        => el0_sync at /Users/anaren/Documents/oss/moss/src/arch/arm64/exceptions/mod.rs:185
[   33.33619902] backtrace:   FP ffffb80000017ea0: PC ffffe000000009a0
        => ?? ??:0
[   33.33620010] backtrace:   00007fffffffff10: INVALID FRAME

@arihant2math arihant2math marked this pull request as draft May 14, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant