Index: src/common/windows/pdb_source_line_writer.cc |
diff --git a/src/common/windows/pdb_source_line_writer.cc b/src/common/windows/pdb_source_line_writer.cc |
index f0edb721c07e86bd9658a984be55e6bf23749dbe..01f4ce3b7519a8d55d2044e27ec3851af4492131 100644 |
--- a/src/common/windows/pdb_source_line_writer.cc |
+++ b/src/common/windows/pdb_source_line_writer.cc |
@@ -975,6 +975,16 @@ bool PDBSourceLineWriter::GetSymbolFunctionName(IDiaSymbol *function, |
fprintf(stderr, "failed to get function name\n"); |
return false; |
} |
+ |
+ // It's possible for get_name to return an empty string, so |
+ // special-case that. |
+ if (wcscmp(*name, L"") == 0) { |
+ SysFreeString(*name); |
+ // dwarf_cu_to_module.cc uses "<name omitted>", so match that. |
+ *name = SysAllocString(L"<name omitted>"); |
+ return true; |
+ } |
+ |
// If a name comes from get_name because no undecorated form existed, |
// it's already formatted properly to be used as output. Don't do any |
// additional processing. |