================
@@ -1810,7 +1813,27 @@ 
SymbolFileNativePDB::ParseVariablesForCompileUnit(CompileUnit &comp_unit,
                                                   VariableList &variables) {
   PdbSymUid sym_uid(comp_unit.GetID());
   lldbassert(sym_uid.kind() == PdbSymUidKind::Compiland);
-  return 0;
+  for (const uint32_t gid : m_index->globals().getGlobalsTable()) {
+    PdbGlobalSymId global{gid, false};
+    CVSymbol sym = m_index->ReadSymbolRecord(global);
+    // TODO: Handle S_CONSTANT which might be a record type (e.g.
+    // std::strong_ordering::equal). Currently
+    // lldb_private::npdb::MakeConstantLocationExpression doesn't handle this
+    // case and will crash if we do create global variables from it.
----------------
ZequanWu wrote:

Just what I did: not handling the S_CONSTANT case prevents the call to 
`lldb_private::npdb::MakeConstantLocationExpression` with a record type, hence 
not crash for now. 

https://github.com/llvm/llvm-project/pull/114303
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to