mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-09 05:16:47 +00:00
Fix empty backtraces when panicking
This commit is contained in:
parent
198363c2d3
commit
3c31ec35cf
@ -91,4 +91,4 @@ args = [
|
|||||||
"-device virtio-net-device,netdev=net01",
|
"-device virtio-net-device,netdev=net01",
|
||||||
"-device virtio-serial-device",
|
"-device virtio-serial-device",
|
||||||
"-device virtconsole,chardev=mux",
|
"-device virtconsole,chardev=mux",
|
||||||
]
|
]
|
||||||
|
@ -133,6 +133,9 @@ fn build_kernel_elf(
|
|||||||
"-C code-model=kernel",
|
"-C code-model=kernel",
|
||||||
"-C relocation-model=static",
|
"-C relocation-model=static",
|
||||||
"-Z relro-level=off",
|
"-Z relro-level=off",
|
||||||
|
// We do not really allow unwinding except for kernel testing. However, we need to specify
|
||||||
|
// this to show backtraces when panicking.
|
||||||
|
"-C panic=unwind",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let mut command = cargo();
|
let mut command = cargo();
|
||||||
|
@ -66,7 +66,7 @@ pub static KTEST_CRATE_WHITELIST: Option<&[&str]> = Some(&{:#?});
|
|||||||
&osdk_target_directory,
|
&osdk_target_directory,
|
||||||
&ws_target_directory,
|
&ws_target_directory,
|
||||||
&required_build_config,
|
&required_build_config,
|
||||||
&["--cfg ktest", "-C panic=unwind"],
|
&["--cfg ktest"],
|
||||||
);
|
);
|
||||||
std::env::remove_var("RUSTFLAGS");
|
std::env::remove_var("RUSTFLAGS");
|
||||||
std::env::set_current_dir(original_dir).unwrap();
|
std::env::set_current_dir(original_dir).unwrap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user