add some debug telemetry on process termination

This commit is contained in:
bunnie 2026-05-09 16:06:41 +08:00
parent 0c894b05dd
commit 2f7196679f
2 changed files with 3 additions and 0 deletions

View file

@ -555,6 +555,8 @@ pub extern "C" fn trap_handler(
println!("Program suspended. You may inspect it using gdb.");
}
#[cfg(not(feature = "gdb-stub"))]
println!("Process {:?} terminated", pid);
#[cfg(not(feature = "gdb-stub"))]
ss.terminate_process(pid).expect("couldn't terminate current process");
crate::syscall::reset_switchto_caller();
});

View file

@ -2184,6 +2184,7 @@ impl SystemServices {
/// Terminate the given process. Returns the process' parent PID.
pub fn terminate_process(&mut self, target_pid: PID) -> Result<PID, xous_kernel::Error> {
println!("terminate_process: {:?}", target_pid);
// To terminate a process, we must perform the following:
//
// 1. If we have any client connections, remove them.