From 230f881dbdeed99a3f0cbada9869d1f2e95fd284 Mon Sep 17 00:00:00 2001 From: Andrew Haberlandt Date: Tue, 17 Dec 2024 10:18:28 +0000 Subject: [PATCH] fix: c++ demangling in backtraces --- lib/pyda/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pyda/process.py b/lib/pyda/process.py index 021c605..f0d9db6 100644 --- a/lib/pyda/process.py +++ b/lib/pyda/process.py @@ -241,7 +241,7 @@ def backtrace_to_str(bt, demangle=False, short=False): if demangle and f[3].startswith("_Z"): sym = cxx_demangle(f[3]) if short and len(sym) > 100: - sym = "..." + sym[-100:] + sym = sym[:50] + "..." + sym[-50:] s += f"[{f[1]}+{hex(f[2])}] {sym}\n" elif f[2] != 0: