I'm trying to implement a DWARFASTParser for go, and have hit an issue with fields for structs. As I understand it, DWARFASTParserClang loads minimal type info for structs at first, and registers the type in SymbolFileDWARF's m_forward_decl_clang_type_to_die. Then later when you call type.GetFullCompilerType() it calls back into the DWARFASTParser to complete the type.
But it seems like the SBValue's in the python API only get Forward types, and never complete them. For example, I do: var = frame.FindVariable('theStruct') self.assertEqual(2, var.GetNumChildren()) But I get 0 children, because the type is incomplete and there doesn't seem to be any way to complete it. ValueObject::GetNumChildren goes through ValueObject::MaybeCalculateCompleteType, which seems promising. But it only completes the type for objc. Would a clang variable already have a full type at this point for some reason? If so, how do I arrange that for go? Also, TypeSystem has a GetCompleteType method. I don't understand when this would be called or how I can implement it without a reference to SymbolFileDWARF.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev