================ @@ -252,11 +253,16 @@ void Symbol::GetDescription(Stream *s, lldb::DescriptionLevel level, s->Printf(", value = 0x%16.16" PRIx64, m_addr_range.GetBaseAddress().GetOffset()); } - ConstString demangled = GetMangled().GetDemangledName(); - if (demangled) - s->Printf(", name=\"%s\"", demangled.AsCString()); - if (m_mangled.GetMangledName()) - s->Printf(", mangled=\"%s\"", m_mangled.GetMangledName().AsCString()); + if (ConstString mangled_name = m_mangled.GetMangledName()) { + s->Printf(", mangled=\""); + Address::DumpName(s, mangled_name.GetStringRef(), pattern); + s->Printf("\""); + } + if (ConstString demangled = m_mangled.GetDemangledName()) { + s->Printf(", name=\""); + Address::DumpName(s, demangled.GetStringRef(), pattern); + s->Printf("\""); ---------------- DavidSpickett wrote:
This is almost right, but we want demangled first, then mangled, to exactly match the previous code. The reasoning here is that the demangled name is going to be more useful, if we have it, than the mangled name. Demangled might be `foo(std::vector<....` whereas the mangled is like `12fa_foo3421(asfd<` (exaggerating but you get the idea). https://github.com/llvm/llvm-project/pull/69422 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits