vm: Log VM debuggability
There has been some confusion where users of vm run-microdroid expected
the command without `--debug full` to spawn a non-debuggable VM but the
command instead defaults to debuggable VMs so log the debuggability of
the VM being run.
Bug: 284443878
Bug: 289173497
Test: m apps_only dist
Change-Id: Ic80aa51eca72ce17382f20c1c9617ddf3ac89b2d
diff --git a/vm/src/run.rs b/vm/src/run.rs
index 54c1de4..fc503f7 100644
--- a/vm/src/run.rs
+++ b/vm/src/run.rs
@@ -308,8 +308,13 @@
.context("Failed to create VM")?;
vm.start().context("Failed to start VM")?;
+ let debug_level = match config {
+ VirtualMachineConfig::AppConfig(config) => config.debugLevel,
+ _ => DebugLevel::NONE,
+ };
println!(
- "Created VM from {} with CID {}, state is {}.",
+ "Created {} from {} with CID {}, state is {}.",
+ if debug_level == DebugLevel::FULL { "debuggable VM" } else { "VM" },
payload_config,
vm.cid(),
state_to_str(vm.state()?)