LLDB mainline
UdtRecordCompleter.cpp
Go to the documentation of this file.
2
4#include "PdbIndex.h"
5#include "PdbSymUid.h"
6#include "PdbUtil.h"
7
12#include "SymbolFileNativePDB.h"
13#include "lldb/Core/Address.h"
14#include "lldb/Symbol/Type.h"
18#include "lldb/lldb-forward.h"
19
20#include "llvm/ADT/STLExtras.h"
21#include "llvm/DebugInfo/CodeView/SymbolDeserializer.h"
22#include "llvm/DebugInfo/CodeView/TypeDeserializer.h"
23#include "llvm/DebugInfo/CodeView/TypeIndex.h"
24#include "llvm/DebugInfo/PDB/Native/GlobalsStream.h"
25#include "llvm/DebugInfo/PDB/Native/TpiStream.h"
26#include "llvm/DebugInfo/PDB/PDBTypes.h"
27#include <optional>
28
29using namespace llvm::codeview;
30using namespace llvm::pdb;
31using namespace lldb;
32using namespace lldb_private;
33using namespace lldb_private::npdb;
34
35using Error = llvm::Error;
36
38 PdbTypeSymId id, CompilerType &derived_ct, clang::TagDecl &tag_decl,
39 PdbAstBuilderClang &ast_builder, PdbIndex &index,
40 llvm::DenseMap<clang::Decl *, DeclStatus> &decl_to_status,
41 llvm::DenseMap<lldb::opaque_compiler_type_t,
42 llvm::SmallSet<std::pair<llvm::StringRef, CompilerType>, 8>>
43 &cxx_record_map)
44 : m_cv_tag_record(CVTagRecord::create(index.tpi().getType(id.index))),
45 m_id(id), m_derived_ct(derived_ct), m_tag_decl(tag_decl),
46 m_ast_builder(ast_builder), m_index(index),
47 m_decl_to_status(decl_to_status), m_cxx_record_map(cxx_record_map) {
48 switch (m_cv_tag_record.kind()) {
49 case CVTagRecord::Enum:
50 break;
51 case CVTagRecord::Union:
52 m_layout.bit_size = m_cv_tag_record.asUnion().getSize() * 8;
53 m_record.record.kind = Member::Union;
54 break;
55 case CVTagRecord::Class:
56 case CVTagRecord::Struct:
57 m_layout.bit_size = m_cv_tag_record.asClass().getSize() * 8;
58 m_record.record.kind = Member::Struct;
59 break;
60 }
61}
62
64 llvm::codeview::TypeIndex ti, llvm::codeview::MemberAccess access,
65 std::optional<uint64_t> vtable_idx) {
66 PdbTypeSymId type_id(ti);
67 clang::QualType qt = m_ast_builder.GetOrCreateClangType(type_id);
68
69 CVType udt_cvt = m_index.tpi().getType(ti);
70
71 std::unique_ptr<clang::CXXBaseSpecifier> base_spec =
72 m_ast_builder.clang().CreateBaseClassSpecifier(
73 qt.getAsOpaquePtr(), TranslateMemberAccess(access),
74 vtable_idx.has_value(), udt_cvt.kind() == LF_CLASS);
75 if (!base_spec)
76 return {};
77
78 m_bases.push_back(
79 std::make_pair(vtable_idx.value_or(0), std::move(base_spec)));
80
81 return qt;
82}
83
84void UdtRecordCompleter::AddMethod(llvm::StringRef name, TypeIndex type_idx,
85 MethodOptions options,
86 MemberAttributes attrs) {
87 clang::QualType method_qt =
88 m_ast_builder.GetOrCreateClangType(PdbTypeSymId(type_idx));
89 if (method_qt.isNull())
90 return;
91 CompilerType method_ct = m_ast_builder.ToCompilerType(method_qt);
93 lldb::opaque_compiler_type_t derived_opaque_ty =
94 m_derived_ct.GetOpaqueQualType();
95 auto iter = m_cxx_record_map.find(derived_opaque_ty);
96 if (iter != m_cxx_record_map.end()) {
97 if (iter->getSecond().contains({name, method_ct})) {
98 return;
99 }
100 }
101
102 bool is_artificial = (options & MethodOptions::CompilerGenerated) ==
103 MethodOptions::CompilerGenerated;
104 m_ast_builder.clang().AddMethodToCXXRecordType(
105 derived_opaque_ty, name.data(), /*asm_label=*/{}, method_ct,
106 attrs.isVirtual(), attrs.isStatic(), false, false, false, is_artificial);
107
108 m_cxx_record_map[derived_opaque_ty].insert({name, method_ct});
109}
110
111Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
112 BaseClassRecord &base) {
113 clang::QualType base_qt =
114 AddBaseClassForTypeIndex(base.Type, base.getAccess());
115
116 if (base_qt.isNull())
117 return llvm::Error::success();
118 auto decl =
119 m_ast_builder.clang().GetAsCXXRecordDecl(base_qt.getAsOpaquePtr());
120 lldbassert(decl);
121
122 auto offset = clang::CharUnits::fromQuantity(base.getBaseOffset());
123 m_layout.base_offsets.insert(std::make_pair(decl, offset));
124
125 return llvm::Error::success();
126}
127
128Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
129 VirtualBaseClassRecord &base) {
130 // Don't create indirect virtual bases. These records indicate that at least
131 // one base class C of this class virtually inherits the specified class.
132 // We already added that virtual base when creating C. There, it's present as
133 // LF_VBCLASS.
134 if (cvr.Kind == LF_VBCLASS)
135 AddBaseClassForTypeIndex(base.BaseType, base.getAccess(), base.VTableIndex);
136
137 return Error::success();
138}
139
140Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
141 ListContinuationRecord &cont) {
142 return Error::success();
143}
144
145Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
146 VFPtrRecord &vfptr) {
147 return Error::success();
148}
149
150Error UdtRecordCompleter::visitKnownMember(
151 CVMemberRecord &cvr, StaticDataMemberRecord &static_data_member) {
152 clang::QualType member_type =
153 m_ast_builder.GetOrCreateClangType(PdbTypeSymId(static_data_member.Type));
154 if (member_type.isNull())
155 return llvm::Error::success();
156
157 CompilerType member_ct = m_ast_builder.ToCompilerType(member_type);
158
160 m_derived_ct, static_data_member.Name, member_ct);
161
162 // Static constant members may be a const[expr] declaration.
163 // Query the symbol's value as the variable initializer if valid.
164 if (member_ct.IsConst() && member_ct.IsCompleteType()) {
165 // Reconstruct the full name for the static member. Use the names as given
166 // in the PDB. This ensures we match the compiler's style of names (e.g.
167 // "A<B<int> >::Foo" vs "A<B<int>>::Foo").
168 std::string qual_name =
169 (m_cv_tag_record.name() + "::" + static_data_member.Name).str();
170
171 auto results =
172 m_index.globals().findRecordsByName(qual_name, m_index.symrecords());
173
174 for (const auto &result : results) {
175 if (result.second.kind() == SymbolKind::S_CONSTANT) {
176 ConstantSym constant(SymbolRecordKind::ConstantSym);
177 cantFail(SymbolDeserializer::deserializeAs<ConstantSym>(result.second,
178 constant));
179
180 clang::QualType qual_type = decl->getType();
181 unsigned type_width = decl->getASTContext().getIntWidth(qual_type);
182 unsigned constant_width = constant.Value.getBitWidth();
183
184 if (qual_type->isIntegralOrEnumerationType()) {
185 if (type_width >= constant_width) {
187 decl, constant.Value.extOrTrunc(type_width));
188 } else {
190 "Class '{0}' has a member '{1}' of type '{2}' ({3} bits) "
191 "which resolves to a wider constant value ({4} bits). "
192 "Ignoring constant.",
193 m_derived_ct.GetTypeName(), static_data_member.Name,
194 member_ct.GetTypeName(), type_width, constant_width);
195 }
196 } else {
197 lldb::BasicType basic_type_enum = member_ct.GetBasicTypeEnumeration();
198 switch (basic_type_enum) {
202 if (type_width == constant_width) {
204 decl, basic_type_enum == lldb::eBasicTypeFloat
205 ? llvm::APFloat(constant.Value.bitsToFloat())
206 : llvm::APFloat(constant.Value.bitsToDouble()));
207 decl->setConstexpr(true);
208 } else {
209 LLDB_LOG(
211 "Class '{0}' has a member '{1}' of type '{2}' ({3} bits) "
212 "which resolves to a constant value of mismatched width "
213 "({4} bits). Ignoring constant.",
214 m_derived_ct.GetTypeName(), static_data_member.Name,
215 member_ct.GetTypeName(), type_width, constant_width);
216 }
217 break;
218 default:
219 break;
220 }
221 }
222 break;
223 }
224 }
225 }
226
227 // FIXME: Add a PdbSymUid namespace for field list members and update
228 // the m_uid_to_decl map with this decl.
229 return Error::success();
230}
231
232Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
233 NestedTypeRecord &nested) {
234 // Typedefs can only be added on structs.
235 if (m_record.record.kind != Member::Struct)
236 return Error::success();
237
238 clang::QualType qt =
239 m_ast_builder.GetOrCreateClangType(PdbTypeSymId(nested.Type, false));
240 if (qt.isNull())
241 return Error::success();
242 CompilerType ct = m_ast_builder.ToCompilerType(qt);
243
244 // There's no distinction between nested types and typedefs, so check if we
245 // encountered a nested type.
246 auto *pdb = static_cast<SymbolFileNativePDB *>(
247 m_ast_builder.clang().GetSymbolFile()->GetBackingSymbolFile());
248 std::optional<TypeIndex> parent = pdb->GetParentType(nested.Type);
249 if (parent && *parent == m_id.index && ct.GetTypeName(true) == nested.Name)
250 return Error::success();
251
252 clang::DeclContext *decl_ctx =
253 m_ast_builder.GetOrCreateClangDeclContextForUid(m_id);
254 if (!decl_ctx)
255 return Error::success();
256
257 std::string name = nested.Name.str();
258 ct.CreateTypedef(name.c_str(), m_ast_builder.ToCompilerDeclContext(decl_ctx),
259 0);
260 return Error::success();
261}
262
263Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
264 DataMemberRecord &data_member) {
265
266 uint64_t offset = data_member.FieldOffset * 8;
267 uint32_t bitfield_width = 0;
268
269 TypeIndex ti(data_member.Type);
270 if (!ti.isSimple()) {
271 CVType cvt = m_index.tpi().getType(ti);
272 if (cvt.kind() == LF_BITFIELD) {
273 BitFieldRecord bfr;
274 llvm::cantFail(TypeDeserializer::deserializeAs<BitFieldRecord>(cvt, bfr));
275 offset += bfr.BitOffset;
276 bitfield_width = bfr.BitSize;
277 ti = bfr.Type;
278 }
279 }
280
281 clang::QualType member_qt =
282 m_ast_builder.GetOrCreateClangType(PdbTypeSymId(ti));
283 if (member_qt.isNull())
284 return Error::success();
285 TypeSystemClang::RequireCompleteType(m_ast_builder.ToCompilerType(member_qt));
286 lldb::AccessType access = TranslateMemberAccess(data_member.getAccess());
287 size_t field_size =
288 bitfield_width ? bitfield_width : GetSizeOfType(ti, m_index.tpi()) * 8;
289 if (field_size == 0)
290 return Error::success();
291 m_record.CollectMember(data_member.Name, offset, field_size, member_qt, access,
292 bitfield_width);
293 return Error::success();
294}
295
296Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
297 OneMethodRecord &one_method) {
298 AddMethod(one_method.Name, one_method.Type, one_method.getOptions(),
299 one_method.Attrs);
300
301 return Error::success();
302}
303
304Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
305 OverloadedMethodRecord &overloaded) {
306 TypeIndex method_list_idx = overloaded.MethodList;
307
308 CVType method_list_type = m_index.tpi().getType(method_list_idx);
309 assert(method_list_type.kind() == LF_METHODLIST);
310
311 MethodOverloadListRecord method_list;
312 llvm::cantFail(TypeDeserializer::deserializeAs<MethodOverloadListRecord>(
313 method_list_type, method_list));
314
315 for (const OneMethodRecord &method : method_list.Methods)
316 AddMethod(overloaded.Name, method.Type, method.getOptions(), method.Attrs);
317
318 return Error::success();
319}
320
321Error UdtRecordCompleter::visitKnownMember(CVMemberRecord &cvr,
322 EnumeratorRecord &enumerator) {
323 Declaration decl;
324 llvm::StringRef name = DropNameScope(enumerator.getName());
325
326 m_ast_builder.clang().AddEnumerationValueToEnumerationType(
327 m_derived_ct, decl, name.str().c_str(), enumerator.Value);
328 return Error::success();
329}
330
332 // Ensure the correct order for virtual bases.
333 llvm::stable_sort(m_bases, llvm::less_first());
334
335 std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> bases;
336 bases.reserve(m_bases.size());
337 for (auto &ib : m_bases)
338 bases.push_back(std::move(ib.second));
339
341 // Make sure all base classes refer to complete types and not forward
342 // declarations. If we don't do this, clang will crash with an
343 // assertion in the call to clang_type.TransferBaseClasses()
344 for (const auto &base_class : bases) {
345 clang::TypeSourceInfo *type_source_info =
346 base_class->getTypeSourceInfo();
347 if (type_source_info) {
349 clang.GetType(type_source_info->getType()));
350 }
351 }
352
353 clang.TransferBaseClasses(m_derived_ct.GetOpaqueQualType(), std::move(bases));
354
355 clang.AddMethodOverridesForCXXRecordType(m_derived_ct.GetOpaqueQualType());
356 FinishRecord();
359
360 if (auto *record_decl = llvm::dyn_cast<clang::CXXRecordDecl>(&m_tag_decl)) {
361 m_ast_builder.GetClangASTImporter().SetRecordLayout(record_decl, m_layout);
362 }
363}
364
365uint64_t
367 uint64_t bit_offset, CompilerType parent_ct,
368 ClangASTImporter::LayoutInfo &parent_layout,
369 clang::DeclContext *parent_decl_ctx) {
371 clang.GetSymbolFile()->GetBackingSymbolFile());
372 clang::FieldDecl *field_decl = nullptr;
373 uint64_t bit_size = 0;
374 switch (field->kind) {
375 case Member::Field: {
377 parent_ct, field->name, m_ast_builder.ToCompilerType(field->qt),
378 field->bitfield_width);
379 bit_size = field->bit_size;
380 break;
381 };
382 case Member::Struct:
383 case Member::Union: {
384 clang::TagTypeKind kind = field->kind == Member::Struct
385 ? clang::TagTypeKind::Struct
386 : clang::TagTypeKind::Union;
387 ClangASTMetadata metadata;
388 metadata.SetUserID(pdb->anonymous_id);
389 metadata.SetIsDynamicCXXType(false);
390 CompilerType record_ct = clang.CreateRecordType(
391 parent_decl_ctx, OptionalClangModuleID(), "", llvm::to_underlying(kind),
395 clang::DeclContext *decl_ctx = clang.GetDeclContextForType(record_ct);
396 for (const auto &member : field->fields) {
397 uint64_t member_offset = field->kind == Member::Struct
398 ? member->bit_offset - field->base_offset
399 : 0;
400 uint64_t member_bit_size = AddMember(clang, member.get(), member_offset,
401 record_ct, layout, decl_ctx);
402 if (field->kind == Member::Struct)
403 bit_size = std::max(bit_size, member_offset + member_bit_size);
404 else
405 bit_size = std::max(bit_size, member_bit_size);
406 }
407 layout.bit_size = bit_size;
409 clang::RecordDecl *record_decl = clang.GetAsRecordDecl(record_ct);
410 m_ast_builder.GetClangASTImporter().SetRecordLayout(record_decl, layout);
411 field_decl =
412 TypeSystemClang::AddFieldToRecordType(parent_ct, "", record_ct, 0);
413 // Mark this record decl as completed.
414 DeclStatus status;
415 status.resolved = true;
416 status.uid = pdb->anonymous_id--;
417 m_decl_to_status.insert({record_decl, status});
418 break;
419 };
420 }
421 // FIXME: Add a PdbSymUid namespace for field list members and update
422 // the m_uid_to_decl map with this decl.
423 parent_layout.field_offsets.insert({field_decl, bit_offset});
424 return bit_size;
425}
426
429 clang::DeclContext *decl_ctx =
430 m_ast_builder.GetOrCreateClangDeclContextForUid(m_id);
431 m_record.ConstructRecord();
432 // Maybe we should check the construsted record size with the size in pdb. If
433 // they mismatch, it might be pdb has fields info missing.
434 for (const auto &field : m_record.record.fields) {
435 AddMember(clang, field.get(), field->bit_offset, m_derived_ct, m_layout,
436 decl_ctx);
437 }
438}
439
441 llvm::StringRef name, uint64_t offset, uint64_t field_size,
442 clang::QualType qt, lldb::AccessType access, uint64_t bitfield_width) {
443 fields_map[offset].push_back(std::make_unique<Member>(
444 name, offset, field_size, qt, access, bitfield_width));
445 if (start_offset > offset)
446 start_offset = offset;
447}
448
450 // For anonymous unions in a struct, msvc generated pdb doesn't have the
451 // entity for that union. So, we need to construct anonymous union and struct
452 // based on field offsets. The final AST is likely not matching the exact
453 // original AST, but the memory layout is preseved.
454 // After we collecting all fields in visitKnownMember, we have all fields in
455 // increasing offset order in m_fields. Since we are iterating in increase
456 // offset order, if the current offset is equal to m_start_offset, we insert
457 // it as direct field of top level record. If the current offset is greater
458 // than m_start_offset, we should be able to find a field in end_offset_map
459 // whose end offset is less than or equal to current offset. (if not, it might
460 // be missing field info. We will ignore the field in this case. e.g. Field A
461 // starts at 0 with size 4 bytes, and Field B starts at 2 with size 4 bytes.
462 // Normally, there must be something which ends at/before 2.) Then we will
463 // append current field to the end of parent record. If parent is struct, we
464 // can just grow it. If parent is a field, it's a field inside an union. We
465 // convert it into an anonymous struct containing old field and new field.
466
467 // The end offset to a vector of field/struct that ends at the offset.
468 std::map<uint64_t, std::vector<Member *>> end_offset_map;
469 auto is_last_end_offset = [&](auto it) {
470 return it != end_offset_map.end() && ++it == end_offset_map.end();
471 };
472
473 for (auto &pair : fields_map) {
474 uint64_t offset = pair.first;
475 auto &fields = pair.second;
476 lldbassert(offset >= start_offset);
477 Member *parent = &record;
478 if (offset > start_offset) {
479 // Find the field with largest end offset that is <= offset. If it's less
480 // than offset, it indicates there are padding bytes between end offset
481 // and offset.
482 lldbassert(!end_offset_map.empty());
483 auto iter = end_offset_map.lower_bound(offset);
484 if (iter == end_offset_map.end())
485 --iter;
486 else if (iter->first > offset) {
487 if (iter == end_offset_map.begin())
488 continue;
489 --iter;
490 }
491 if (iter->second.empty())
492 continue;
493
494 // If the new fields come after the already added ones
495 // without overlap, go back to the root.
496 if (iter->first <= offset && is_last_end_offset(iter)) {
497 if (record.kind == Member::Struct) {
498 parent = &record;
499 } else {
500 assert(record.kind == Member::Union &&
501 "Current record must be a union");
502 assert(!record.fields.empty());
503 // For unions, append the field to the last struct
504 parent = record.fields.back().get();
505 }
506 } else {
507 parent = iter->second.back();
508 iter->second.pop_back();
509 }
510 }
511 // If it's a field, then the field is inside a union, so we can safely
512 // increase its size by converting it to a struct to hold multiple fields.
513 if (parent->kind == Member::Field)
514 parent->ConvertToStruct();
515
516 if (fields.size() == 1) {
517 uint64_t end_offset = offset + fields.back()->bit_size;
518 parent->fields.push_back(std::move(fields.back()));
519 if (parent->kind == Member::Struct) {
520 end_offset_map[end_offset].push_back(parent);
521 } else {
522 lldbassert(parent == &record &&
523 "If parent is union, it must be the top level record.");
524 end_offset_map[end_offset].push_back(parent->fields.back().get());
525 }
526 } else {
527 if (parent->kind == Member::Struct) {
528 parent->fields.push_back(std::make_unique<Member>(Member::Union));
529 parent = parent->fields.back().get();
530 parent->bit_offset = offset;
531 } else {
532 lldbassert(parent == &record &&
533 "If parent is union, it must be the top level record.");
534 }
535 for (auto &field : fields) {
536 int64_t bit_size = field->bit_size;
537 parent->fields.push_back(std::move(field));
538 end_offset_map[offset + bit_size].push_back(
539 parent->fields.back().get());
540 }
541 }
542 }
543}
#define lldbassert(x)
Definition LLDBAssert.h:16
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
Definition Log.h:369
llvm::Error Error
void SetUserID(lldb::user_id_t user_id)
void SetIsDynamicCXXType(std::optional< bool > b)
Generic representation of a type in a programming language.
lldb::BasicType GetBasicTypeEnumeration() const
ConstString GetTypeName(bool BaseOnly=false) const
CompilerType CreateTypedef(const char *name, const CompilerDeclContext &decl_ctx, uint32_t payload) const
Create a typedef to this type using "name" as the name of the typedef this type is valid and the type...
A TypeSystem implementation based on Clang.
static void SetFloatingInitializerForVariable(clang::VarDecl *var, const llvm::APFloat &init_value)
Initializes a variable with a floating point value.
static void SetIntegerInitializerForVariable(clang::VarDecl *var, const llvm::APInt &init_value)
Initializes a variable with an integer value.
static clang::VarDecl * AddVariableToRecordType(const CompilerType &type, llvm::StringRef name, const CompilerType &var_type)
static void BuildIndirectFields(const CompilerType &type)
static clang::CXXRecordDecl * GetAsCXXRecordDecl(lldb::opaque_compiler_type_t type)
static bool CompleteTagDeclarationDefinition(const CompilerType &type)
static bool StartTagDeclarationDefinition(const CompilerType &type)
static clang::FieldDecl * AddFieldToRecordType(const CompilerType &type, llvm::StringRef name, const CompilerType &field_type, uint32_t bitfield_bit_size)
static void RequireCompleteType(CompilerType type)
Complete a type from debug info, or mark it as forcefully completed if there is no definition of the ...
PdbIndex - Lazy access to the important parts of a PDB file.
Definition PdbIndex.h:47
llvm::DenseMap< lldb::opaque_compiler_type_t, llvm::SmallSet< std::pair< llvm::StringRef, CompilerType >, 8 > > & m_cxx_record_map
ClangASTImporter::LayoutInfo m_layout
llvm::DenseMap< clang::Decl *, DeclStatus > & m_decl_to_status
uint64_t AddMember(TypeSystemClang &clang, Member *field, uint64_t bit_offset, CompilerType parent_ct, ClangASTImporter::LayoutInfo &parent_layout, clang::DeclContext *decl_ctx)
UdtRecordCompleter(PdbTypeSymId id, CompilerType &derived_ct, clang::TagDecl &tag_decl, PdbAstBuilderClang &ast_builder, PdbIndex &index, llvm::DenseMap< clang::Decl *, DeclStatus > &decl_to_status, llvm::DenseMap< lldb::opaque_compiler_type_t, llvm::SmallSet< std::pair< llvm::StringRef, CompilerType >, 8 > > &cxx_record_map)
clang::QualType AddBaseClassForTypeIndex(llvm::codeview::TypeIndex ti, llvm::codeview::MemberAccess access, std::optional< uint64_t > vtable_idx=std::optional< uint64_t >())
void AddMethod(llvm::StringRef name, llvm::codeview::TypeIndex type_idx, llvm::codeview::MethodOptions options, llvm::codeview::MemberAttributes attrs)
llvm::StringRef DropNameScope(llvm::StringRef name)
Definition PdbUtil.cpp:599
lldb::AccessType TranslateMemberAccess(llvm::codeview::MemberAccess access)
size_t GetSizeOfType(PdbTypeSymId id, llvm::pdb::TpiStream &tpi)
Definition PdbUtil.cpp:1094
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition Log.h:332
void * opaque_compiler_type_t
Definition lldb-types.h:90
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
@ eBasicTypeLongDouble
@ eLanguageTypeC_plus_plus
ISO C++:1998.
llvm::DenseMap< const clang::FieldDecl *, uint64_t > field_offsets
enum lldb_private::npdb::UdtRecordCompleter::Member::Kind kind
void CollectMember(llvm::StringRef name, uint64_t offset, uint64_t field_size, clang::QualType qt, lldb::AccessType access, uint64_t bitfield_width)
std::map< uint64_t, llvm::SmallVector< MemberUP, 1 > > fields_map