Replies: 1 comment
-
估计这由于错误的 GDB 定位到 drop ─── Assembly ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~
~
~
~
~
0x0000000080204f3a core::cell::Cell<isize>::get<isize>+0 ld a0,16(a6)
~
~
~
~
─── Breakpoints ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[1] break at 0x0000000080207dfa in src/main.rs:104 for src/main.rs:104 hit 1 time
[2] break for /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25 hit 19 times
[2.1] at 0x00000000802045ae in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.2] at 0x00000000802047f8 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.3] at 0x0000000080204a0a in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.4] at 0x0000000080204b5a in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.5] at 0x0000000080204ecc in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.6] at 0x00000000802052f2 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.7] at 0x0000000080205340 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.8] at 0x00000000802053d0 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.9] at 0x00000000802053fe in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.10] at 0x0000000080205d46 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.11] at 0x0000000080206f2a in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.12] at 0x0000000080207278 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.13] at 0x00000000802077ea in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.14] at 0x000000008020788a in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.15] at 0x0000000080207aa4 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.16] at 0x0000000080208000 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.17] at 0x000000008020844c in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.18] at 0x0000000080208abe in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.19] at 0x0000000080208d24 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.20] at 0x00000000802093a0 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
[2.21] at 0x00000000802094b6 in /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/slice/iter/macros.rs:25
─── Expressions ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
zero 0x0000000000000000 ra 0x0000000080204d7a sp 0x000000008025bef0 gp 0x0000000000000000 tp 0x0000000000000000 t0 0x00000000000000f0 t1 0x0000000000110000
t2 0x00000000000000df fp 0x000000008025bf00 s1 0x0000000000000018 a0 0x000000000000000a a1 0x0000000000000013 a2 0x0000000000000000 a3 0x0000000000000013
a4 0x000000008020e9b0 a5 0x0000000000002008 a6 0x0000000000000000 a7 0x0000000000000001 s2 0x000000008225c1c8 s3 0x000000008225c090 s4 0x000000008025c000
s5 0x0000000000000000 s6 0x0000000000000000 s7 0x0000000000000000 s8 0x0000000000000000 s9 0x0000000000000000 s10 0x0000000000000000 s11 0x0000000000000000
t3 0x0000000000000013 t4 0x000000008025c000 t5 0x000000008225c000 t6 0x000000008020e768 pc 0x0000000080204f3a
─── Source ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
516 #[inline]
517 #[stable(feature = "rust1", since = "1.0.0")]
518 pub fn get(&self) -> T {
519 // SAFETY: This can cause data races if called from a separate thread,
520 // but `Cell` is `!Sync` so this won't happen.
521 unsafe { *self.value.get() }
522 }
523
524 /// Updates the contained value using a function and returns the new value.
525 ///
─── Stack ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x0000000080204f3a in core::cell::Cell<isize>::get<isize>+0 at /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/cell.rs:521
[1] from 0x0000000080204f3a in core::cell::{impl#43}::drop+0 at /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/cell.rs:1777
[2] from 0x0000000080204f3a in core::ptr::drop_in_place<core::cell::BorrowRefMut>+0 at /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/ptr/mod.rs:514
[3] from 0x0000000080204f3a in core::ptr::drop_in_place<core::cell::RefMut<os::mm::memory_set::MemorySet>>+0 at /rustc/faefc618cf48bd794cbc808448df1bf3f59f36af/library/core/src/ptr/mod.rs:514
[4] from 0x0000000080204f3a in os::mm::memory_set::remap_test+472 at src/mm/memory_set.rs:460
[5] from 0x0000000080207e02 in os::rust_main+1576 at src/main.rs:104
[6] from 0x0000000080200010 in stext
─── Variables ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
arg self = <optimized out>
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>>> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MemorySet::from_elf
方法里添加 logmake run LOG=INFO
会造成死循环。此外,如果把这个 log 变成info!("root_ppn: {:?}", memory_set.page_table.root_ppn());
并不能造成死循环。Beta Was this translation helpful? Give feedback.
All reactions