Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix script/symbolicate for Linux panic reports (#33822)
Cole Millerdef8bab5a82d
diff --git a/crates/remote_server/src/unix.rs b/crates/remote_server/src/unix.rsindex 48b4e483b4e..84ce08ff25b 100644--- a/crates/remote_server/src/unix.rs+++ b/crates/remote_server/src/unix.rs@@ -164,7 +164,7 @@ fn init_panic_hook() {}),app_version: format!("remote-server-{version}"),app_commit_sha: option_env!("ZED_COMMIT_SHA").map(|sha| sha.into()),- release_channel: release_channel.display_name().into(),+ release_channel: release_channel.dev_name().into(),target: env!("TARGET").to_owned().into(),os_name: telemetry::os_name(),os_version: Some(telemetry::os_version()),diff --git a/script/symbolicate b/script/symbolicateindex 743b5872ab5..5e818626fa9 100755--- a/script/symbolicate+++ b/script/symbolicate@@ -11,24 +11,29 @@ fiinput_file=$1;if [[ "$input_file" == *.json ]]; then- version=$(cat $input_file | jq -r .app_version)- channel=$(cat $input_file | jq -r .release_channel)- target_triple=$(cat $input_file | jq -r .target)+ version=$(cat $input_file | jq -r .panic.app_version)+ channel=$(cat $input_file | jq -r .panic.release_channel)+ target_triple=$(cat $input_file | jq -r .panic.target)- which llvm-symbolizer rustfilt >dev/null || echo Need to install llvm-symbolizer and rustfilt+ which llvm-symbolizer rustfilt >/dev/null || (echo Need to install llvm-symbolizer and rustfilt && exit 1)echo $channel;mkdir -p target/dsyms/$channel- dsym="$channel/zed-$version-$target_triple.dbg"+ if [[ "$version" == "remote-server-"* ]]; then+ version="${version#remote-server-}"+ dsym="$channel/remote_server-$version-$target_triple.dbg"+ else+ dsym="$channel/zed-$version-$target_triple.dbg"+ fiif [[ ! -f target/dsyms/$dsym ]]; thenecho "Downloading $dsym..."curl -o target/dsyms/$dsym.gz "https://zed-debug-symbols.nyc3.digitaloceanspaces.com/$dsym.gz"gunzip target/dsyms/$dsym.gzfi- cat $input_file | jq -r .backtrace[] | sed s'/.*+//' | llvm-symbolizer --no-demangle --obj=target/dsyms/$dsym | rustfilt+ cat $input_file | jq -r .panic.backtrace[] | sed s'/.*+//' | llvm-symbolizer --no-demangle --obj=target/dsyms/$dsym | rustfiltelse # ips file