rcore-os / rCore-Tutorial-v3

Let's write an OS which can run on RISC-V in Rust from scratch!
https://rcore-os.github.io/rCore-Tutorial-Book-v3/index.html
GNU General Public License v3.0
1.58k stars 452 forks source link

stack backtrace #105

Open Godones opened 1 year ago

Godones commented 1 year ago
  1. Update the stack backtrace method
  2. Turn off the -C force-frame-pointers flag, which may cause unnecessary overhead.
  3. The new method should be able to run normally on the alloc-enabled branch

A simple test looks like this:

[kernel] Panicked at src/mm/page_table.rs:178 translated_str: not implemented
---START BACKTRACE---
0x80010a64 (+638) backtrace
0x80010914 (+188) rust_begin_unwind
0x80021624 (+44) core::panicking::panic_fmt
0x8000fb1c (+364) os::mm::page_table::translated_str
0x800072ee (+44) os::syscall::process::sys_exec
0x800067f4 (+456) trap_handler
---END   BACKTRACE---
chyyuu commented 1 year ago

Very Good! @Godones