From 5c1de4ce26deb5b39671428aad5623e96784aabb Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 24 Jan 2024 23:33:54 -0700 Subject: [PATCH] Try to flesh out our panic stacks more Although we now usually get the .ips file alongside a panic, when we don't it's much harder to track down where panics happen because we're not showing inlined frames. Try iterating over all symbols in a frame to see if that improves panic reporting. --- crates/zed/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 5abb046165..fc8c282b42 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -543,7 +543,12 @@ fn init_panic_hook(app: &App, installation_id: Option, session_id: Strin let mut backtrace = backtrace .frames() .iter() - .filter_map(|frame| Some(format!("{:#}", frame.symbols().first()?.name()?))) + .flat_map(|frame| { + frame + .symbols() + .iter() + .filter_map(|frame| Some(format!("{:#}", frame.name()?))) + }) .collect::>(); // Strip out leading stack frames for rust panic-handling.