OccupyMars2025 / 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
0 stars 0 forks source link

[debug] How to step into source code of user crate in branch ch2 when debugging with GDB ? #7

Open OccupyMars2025 opened 1 year ago

OccupyMars2025 commented 1 year ago

This is my failed attempt

(gdb) directory /home/occupymars2025/Desktop/rCore-Tutorial-v3/user/
Source directories searched: /home/occupymars2025/Desktop/rCore-Tutorial-v3/user:$cdir:$cwd
(gdb) show directories 
Source directories searched: /home/occupymars2025/Desktop/rCore-Tutorial-v3/user:$cdir:$cwd
(gdb) break /home/occupymars2025/Desktop/rCore-Tutorial-v3/user/src/lib.rs:17
Breakpoint 1 at 0x8020588c: file src/lib.rs, line 454.
(gdb) c
Continuing.

Breakpoint 1, log::{impl#0}::clone (self=0x80243640) at src/lib.rs:454