mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Add debuginfo when using GDB in release profile
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
94550dd5c6
commit
d28292cec4
@ -77,6 +77,20 @@ pub fn execute_run_command(config: &RunConfig) {
|
||||
config.manifest.clone()
|
||||
}
|
||||
},
|
||||
cargo_args: {
|
||||
fn is_release_profile(cfg: &RunConfig) -> bool {
|
||||
cfg.cargo_args.profile == "release" || cfg.cargo_args.release
|
||||
}
|
||||
if config.gdb_server_args.is_gdb_enabled && is_release_profile(config) {
|
||||
let mut cargo_args = config.cargo_args.clone();
|
||||
cargo_args
|
||||
.override_configs
|
||||
.push("profile.release.debug=true".to_owned());
|
||||
cargo_args
|
||||
} else {
|
||||
config.cargo_args.clone()
|
||||
}
|
||||
},
|
||||
..config.clone()
|
||||
};
|
||||
let _vsc_launch_file = config.gdb_server_args.vsc_launch_file.then(|| {
|
||||
@ -110,7 +124,6 @@ pub fn execute_run_command(config: &RunConfig) {
|
||||
manifest: config.manifest.clone(),
|
||||
cargo_args: config.cargo_args.clone(),
|
||||
};
|
||||
|
||||
let bundle = create_base_and_build(
|
||||
default_bundle_directory,
|
||||
&osdk_target_directory,
|
||||
|
Reference in New Issue
Block a user