14#include "clang/Lex/Lexer.h"
32#include "llvm/Config/llvm-config.h"
33#include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h"
34#include "llvm/DebugInfo/PDB/GenericError.h"
35#include "llvm/DebugInfo/PDB/IPDBDataStream.h"
36#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
37#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
38#include "llvm/DebugInfo/PDB/IPDBSectionContrib.h"
39#include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
40#include "llvm/DebugInfo/PDB/IPDBTable.h"
41#include "llvm/DebugInfo/PDB/PDBSymbol.h"
42#include "llvm/DebugInfo/PDB/PDBSymbolBlock.h"
43#include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
44#include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h"
45#include "llvm/DebugInfo/PDB/PDBSymbolData.h"
46#include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
47#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
48#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
49#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
50#include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h"
51#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
52#include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
53#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
54#include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
55#include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
61#include "llvm/Config/llvm-config.h"
85 "Use DIA PDB reader unless LLDB_USE_NATIVE_PDB_READER environment "
96 "Use native PDB reader",
100#define LLDB_PROPERTIES_symbolfilepdb
101#include "SymbolFilePDBProperties.inc"
104#define LLDB_PROPERTIES_symbolfilepdb
105#include "SymbolFilePDBPropertiesEnum.inc"
108#if LLVM_ENABLE_DIA_SDK && defined(_WIN32)
109bool ShouldUseNativeReaderByDefault() {
110 static bool g_use_native_by_default =
true;
112 static llvm::once_flag g_initialize;
113 llvm::call_once(g_initialize, [] {
114 llvm::StringRef env_value = ::getenv(
"LLDB_USE_NATIVE_PDB_READER");
115 if (!env_value.equals_insensitive(
"on") &&
116 !env_value.equals_insensitive(
"yes") &&
117 !env_value.equals_insensitive(
"1") &&
118 !env_value.equals_insensitive(
"true"))
119 g_use_native_by_default =
false;
122 return g_use_native_by_default;
128 static llvm::StringRef GetSettingName() {
133 m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
134 m_collection_sp->Initialize(g_symbolfilepdb_properties);
137 bool UseNativeReader()
const {
138#if LLVM_ENABLE_DIA_SDK && defined(_WIN32)
140 GetPropertyAtIndexAs<PDBReader>(ePropertyReader, ePDBReaderDefault);
142 case ePDBReaderNative:
147 case ePDBReaderDefault:
148 return ShouldUseNativeReaderByDefault();
157 static PluginProperties g_settings;
167 case PDB_Lang::Swift:
173 case PDB_Lang::ObjCpp:
180bool ShouldAddLine(uint32_t requested_line, uint32_t actual_line,
181 uint32_t addr_length) {
182 return ((requested_line == 0 || actual_line == requested_line) &&
208 debugger, PluginProperties::GetSettingName())) {
211 "Properties for the PDB symbol-file plug-in.",
true);
216 return "Microsoft PDB debug symbol file reader.";
233 uint32_t abilities = 0;
239 std::string exePath =
m_objfile_sp->GetFileSpec().GetPath();
240 auto error = loadDataForEXE(PDB_ReaderType::DIA, llvm::StringRef(exePath),
243 llvm::consumeError(std::move(
error));
248 FileSpec symfile = module_sp->GetSymbolFileFileSpec();
251 error = loadDataForPDB(PDB_ReaderType::DIA,
254 llvm::consumeError(std::move(
error));
265 while (
auto table_up = enum_tables_up->getNext()) {
266 if (table_up->getItemCount() == 0)
268 auto type = table_up->getTableType();
270 case PDB_TableType::Symbols:
276 case PDB_TableType::LineNumbers:
309 uint32_t compile_unit_count = compilands->getChildCount();
314 auto last_compiland_up = compilands->getChildAtIndex(compile_unit_count - 1);
316 std::string name = last_compiland_up->getName();
317 if (name ==
"* Linker *")
318 --compile_unit_count;
319 return compile_unit_count;
323 const llvm::pdb::PDBSymbolCompiland &pdb_compiland, uint32_t &index) {
327 auto uid = pdb_compiland.getSymIndexId();
329 auto compiland_up = results_up->getChildAtIndex(cu_idx);
332 if (compiland_up->getSymIndexId() == uid) {
340std::unique_ptr<llvm::pdb::PDBSymbolCompiland>
342 return m_session_up->getConcreteSymbolById<PDBSymbolCompiland>(uid);
355 auto compiland_up = results->getChildAtIndex(index);
366 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
378 auto file_vm_addr = pdb_func.getVirtualAddress();
382 auto func_length = pdb_func.getLength();
383 Address func_addr(file_vm_addr,
392 user_id_t func_type_uid = pdb_func.getSignatureId();
396 FunctionSP func_sp = std::make_shared<Function>(
397 &comp_unit, pdb_func.getSymIndexId(), func_type_uid, mangled, func_type,
398 func_addr,
AddressRanges{AddressRange(func_addr, func_length)});
404 if (
auto err = type_system_or_err.takeError()) {
406 "Unable to parse PDBFunc: {0}");
410 auto ts = *type_system_or_err;
412 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
413 if (!clang_type_system)
417 return func_sp.get();
422 size_t func_added = 0;
426 auto results_up = compiland_up->findAllChildren<PDBSymbolFunc>();
429 while (
auto pdb_func_up = results_up->getNext()) {
463 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
464 if (!files || files->getChildCount() == 0)
467 while (
auto file = files->getNext()) {
468 FileSpec spec(file->getFileName(), FileSpec::Style::windows);
477 std::vector<SourceModule> &imported_modules) {
483 uint64_t func_file_vm_addr,
const llvm::pdb::PDBSymbol *pdb_symbol,
485 assert(pdb_symbol && parent_block);
487 size_t num_added = 0;
489 if (!is_top_parent) {
491 if (pdb_symbol->getSymTag() != PDB_SymType::Block)
494 auto &raw_sym = pdb_symbol->getRawSymbol();
495 assert(llvm::isa<PDBSymbolBlock>(pdb_symbol));
496 auto uid = pdb_symbol->getSymIndexId();
499 if (raw_sym.getVirtualAddress() < func_file_vm_addr)
502 Block *block = parent_block->
CreateChild(pdb_symbol->getSymIndexId()).get();
504 raw_sym.getVirtualAddress() - func_file_vm_addr, raw_sym.getLength()));
507 auto results_up = pdb_symbol->findAllChildren();
511 while (
auto symbol_up = results_up->getNext()) {
513 func_file_vm_addr, symbol_up.get(), parent_block,
false);
520 size_t num_added = 0;
521 auto uid = func.
GetID();
522 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
527 pdb_func_up->getVirtualAddress(), pdb_func_up.get(), &parent_block,
true);
534 size_t num_added = 0;
539 auto ParseTypesByTagFn = [&num_added,
this](
const PDBSymbol &raw_sym) {
540 std::unique_ptr<IPDBEnumSymbols> results;
541 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
543 for (
auto tag : tags_to_search) {
544 results = raw_sym.findAllChildren(tag);
545 if (!results || results->getChildCount() == 0)
547 while (
auto symbol = results->getNext()) {
548 switch (symbol->getSymTag()) {
549 case PDB_SymType::Enum:
550 case PDB_SymType::UDT:
551 case PDB_SymType::Typedef:
563 type->GetFullCompilerType();
570 ParseTypesByTagFn(*compiland);
575 static bool parse_all_global_types =
false;
576 if (!parse_all_global_types) {
578 parse_all_global_types =
true;
589 size_t num_added = 0;
591 auto pdb_func =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(
607 if (results && results->getChildCount()) {
608 while (
auto result = results->getNext()) {
635 auto find_result =
m_types.find(type_uid);
636 if (find_result !=
m_types.end())
637 return find_result->second.get();
639 auto type_system_or_err =
641 if (
auto err = type_system_or_err.takeError()) {
643 "Unable to ResolveTypeUID: {0}");
647 auto ts = *type_system_or_err;
649 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
650 if (!clang_type_system)
657 if (pdb_type ==
nullptr)
662 m_types.insert(std::make_pair(type_uid, result));
673 std::lock_guard<std::recursive_mutex> guard(
676 auto type_system_or_err =
678 if (
auto err = type_system_or_err.takeError()) {
680 "Unable to get dynamic array info for UID: {0}");
683 auto ts = *type_system_or_err;
685 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
694 return pdb->CompleteTypeFromPDB(compiler_type);
698 auto type_system_or_err =
700 if (
auto err = type_system_or_err.takeError()) {
702 "Unable to get decl for UID: {0}");
705 auto ts = *type_system_or_err;
707 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
719 auto decl =
pdb->GetDeclForSymbol(*symbol);
728 auto type_system_or_err =
730 if (
auto err = type_system_or_err.takeError()) {
732 "Unable to get DeclContext for UID: {0}");
736 auto ts = *type_system_or_err;
738 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
750 auto decl_context =
pdb->GetDeclContextForSymbol(*symbol);
759 auto type_system_or_err =
761 if (
auto err = type_system_or_err.takeError()) {
763 "Unable to get DeclContext containing UID: {0}");
767 auto ts = *type_system_or_err;
769 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
781 auto decl_context =
pdb->GetDeclContextContainingSymbol(*symbol);
782 assert(decl_context);
789 auto type_system_or_err =
791 if (
auto err = type_system_or_err.takeError()) {
793 "Unable to parse decls for context: {0}");
797 auto ts = *type_system_or_err;
799 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
807 pdb->ParseDeclsForDeclContext(
813 SymbolContextItem resolve_scope,
816 uint32_t resolved_flags = 0;
817 if (resolve_scope & eSymbolContextCompUnit ||
818 resolve_scope & eSymbolContextVariable ||
819 resolve_scope & eSymbolContextFunction ||
820 resolve_scope & eSymbolContextBlock ||
821 resolve_scope & eSymbolContextLineEntry) {
824 if (resolved_flags & eSymbolContextVariable) {
830 resolved_flags |= eSymbolContextCompUnit;
834 if (resolve_scope & eSymbolContextFunction ||
835 resolve_scope & eSymbolContextBlock) {
838 m_session_up->findSymbolByAddress(file_vm_addr, PDB_SymType::Function);
840 auto *pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
842 auto func_uid = pdb_func->getSymIndexId();
848 resolved_flags |= eSymbolContextFunction;
849 if (resolve_scope & eSymbolContextBlock) {
851 file_vm_addr, PDB_SymType::Block);
852 auto block_id = block_symbol ? block_symbol->getSymIndexId()
856 resolved_flags |= eSymbolContextBlock;
862 if (resolve_scope & eSymbolContextLineEntry) {
864 Address addr(so_addr);
865 if (line_table->FindLineEntryByAddress(addr, sc.
line_entry))
866 resolved_flags |= eSymbolContextLineEntry;
870 return resolved_flags;
877 const size_t old_size = sc_list.
GetSize();
878 const FileSpec &file_spec = src_location_spec.
GetFileSpec();
879 const uint32_t line = src_location_spec.
GetLine().value_or(0);
880 if (resolve_scope & lldb::eSymbolContextCompUnit) {
885 auto compilands =
m_session_up->findCompilandsForSourceFile(
886 file_spec.
GetPath(), PDB_NameSearchFlags::NS_CaseInsensitive);
893 while (
auto compiland = compilands->getNext()) {
899 std::string source_file = compiland->getSourceFileFullPath();
900 if (source_file.empty())
902 FileSpec this_spec(source_file, FileSpec::Style::windows);
904 if (FileSpec::Compare(file_spec, this_spec, need_full_match) != 0)
917 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock |
918 eSymbolContextLineEntry)) {
921 if ((resolve_scope & eSymbolContextLineEntry) && !has_line_table) {
925 assert(line &&
"Couldn't get all line entries!\n");
931 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) {
938 uint32_t num_line_entries = line_table->GetSize();
944 for (uint32_t line_idx = 0; line && line_idx < num_line_entries;
946 if (!line_table->GetLineEntryAtIndex(line_idx, sc.
line_entry))
955 file_vm_addr, PDB_SymType::Function);
957 auto func_uid = symbol_up->getSymIndexId();
960 auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
965 if (sc.
function && (resolve_scope & eSymbolContextBlock)) {
972 }
else if (has_line_table) {
984 return sc_list.
GetSize() - old_size;
992 while (
auto symbol_up = result_up->getNext())
993 if (
auto addr = symbol_up->getRawSymbol().getVirtualAddress())
1002 const llvm::pdb::PDBSymbolData &pdb_data) {
1004 uint32_t var_uid = pdb_data.getSymIndexId();
1007 return result->second;
1010 bool is_static_member =
false;
1011 bool is_external =
false;
1012 bool is_artificial =
false;
1014 switch (pdb_data.getDataKind()) {
1015 case PDB_DataKind::Global:
1019 case PDB_DataKind::Local:
1022 case PDB_DataKind::FileStatic:
1025 case PDB_DataKind::StaticMember:
1026 is_static_member =
true;
1029 case PDB_DataKind::Member:
1032 case PDB_DataKind::Param:
1035 case PDB_DataKind::Constant:
1042 switch (pdb_data.getLocationType()) {
1043 case PDB_LocType::TLS:
1046 case PDB_LocType::RegRel: {
1048 if (pdb_data.getDataKind() == PDB_DataKind::ObjectPtr) {
1050 is_artificial =
true;
1058 if (!is_artificial && !pdb_data.isCompilerGenerated()) {
1059 if (
auto lines = pdb_data.getLineNumbers()) {
1060 if (
auto first_line = lines->getNext()) {
1061 uint32_t src_file_id = first_line->getSourceFileId();
1062 auto src_file =
m_session_up->getSourceFileById(src_file_id);
1064 FileSpec spec(src_file->getFileName());
1066 decl.
SetColumn(first_line->getColumnNumber());
1067 decl.
SetLine(first_line->getLineNumber());
1079 function_block.
FindBlockByID(pdb_data.getLexicalParentId());
1081 block = &function_block;
1083 context_scope = block;
1085 for (
size_t i = 0, num_ranges = block->
GetNumRanges(); i < num_ranges;
1098 std::make_shared<SymbolFileType>(*
this, pdb_data.getTypeId());
1100 auto var_name = pdb_data.getName();
1102 auto mangled_cstr = mangled.empty() ? nullptr : mangled.c_str();
1108 module_sp, pdb_data, ranges, is_constant),
1111 var_sp = std::make_shared<Variable>(
1112 var_uid, var_name.c_str(), mangled_cstr, type_sp, scope, context_scope,
1113 ranges, &decl, location, is_external, is_artificial, is_constant,
1116 m_variables.insert(std::make_pair(var_uid, var_sp));
1122 const llvm::pdb::PDBSymbol &pdb_symbol,
1124 size_t num_added = 0;
1126 if (
auto pdb_data = llvm::dyn_cast<PDBSymbolData>(&pdb_symbol)) {
1129 auto result =
m_variables.find(pdb_data->getSymIndexId());
1135 if (
auto lexical_parent = pdb_data->getLexicalParent()) {
1136 switch (lexical_parent->getSymTag()) {
1137 case PDB_SymType::Exe:
1140 case PDB_SymType::Compiland: {
1143 if (!local_variable_list_sp) {
1144 local_variable_list_sp = std::make_shared<VariableList>();
1149 case PDB_SymType::Block:
1150 case PDB_SymType::Function: {
1153 lexical_parent->getSymIndexId());
1156 if (!local_variable_list_sp) {
1157 local_variable_list_sp = std::make_shared<VariableList>();
1168 if (local_variable_list_sp) {
1170 local_variable_list_sp->AddVariableIfUnique(var_sp);
1182 if (
auto results = pdb_symbol.findAllChildren()) {
1183 while (
auto result = results->getNext())
1203 uint32_t matches = 0;
1204 size_t old_size = variables.
GetSize();
1205 while (
auto result = results->getNext()) {
1206 auto pdb_data = llvm::dyn_cast<PDBSymbolData>(result.get());
1207 if (max_matches > 0 && matches >= max_matches)
1223 if (parent_decl_ctx.
IsValid() &&
1228 matches = variables.
GetSize() - old_size;
1242 uint32_t matches = 0;
1243 size_t old_size = variables.
GetSize();
1244 while (
auto pdb_data = results->getNext()) {
1245 if (max_matches > 0 && matches >= max_matches)
1248 auto var_name = pdb_data->getName();
1249 if (var_name.empty())
1263 matches = variables.
GetSize() - old_size;
1268 bool include_inlines,
1285 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
1286 if (!pdb_func_up && !(include_inlines && pdb_func_up->hasInlineAttribute()))
1295 std::map<uint64_t, uint32_t> addr_ids;
1298 while (
auto pdb_func_up = results_up->getNext()) {
1299 if (pdb_func_up->isCompilerGenerated())
1302 auto name = pdb_func_up->getName();
1303 auto demangled_name = pdb_func_up->getUndecoratedName();
1304 if (name.empty() && demangled_name.empty())
1307 auto uid = pdb_func_up->getSymIndexId();
1308 if (!demangled_name.empty() && pdb_func_up->getVirtualAddress())
1309 addr_ids.insert(std::make_pair(pdb_func_up->getVirtualAddress(), uid));
1311 if (
auto parent = pdb_func_up->getClassParent()) {
1322 if (!basename.empty())
1328 if (!demangled_name.empty())
1336 if (!basename.empty())
1341 if (name ==
"main") {
1344 if (!demangled_name.empty() && name != demangled_name) {
1348 }
else if (!demangled_name.empty()) {
1357 if (
auto results_up =
1359 while (
auto pub_sym_up = results_up->getNext()) {
1360 if (!pub_sym_up->isFunction())
1362 auto name = pub_sym_up->getName();
1368 if (
auto vm_addr = pub_sym_up->getVirtualAddress()) {
1369 if (
auto it = addr_ids.find(vm_addr); it != addr_ids.end())
1388 bool include_inlines,
1393 lldbassert((name_type_mask & eFunctionNameTypeAuto) == 0);
1395 if (name_type_mask & eFunctionNameTypeFull)
1398 if (name_type_mask == eFunctionNameTypeNone)
1405 if (name_type_mask & eFunctionNameTypeFull ||
1406 name_type_mask & eFunctionNameTypeBase ||
1407 name_type_mask & eFunctionNameTypeMethod) {
1410 std::set<uint32_t> resolved_ids;
1411 auto ResolveFn = [
this, &name, parent_decl_ctx, include_inlines, &sc_list,
1413 std::vector<uint32_t> ids;
1414 if (!Names.GetValues(name, ids))
1417 for (uint32_t
id : ids) {
1418 if (resolved_ids.find(
id) != resolved_ids.end())
1421 if (parent_decl_ctx.IsValid() &&
1426 resolved_ids.insert(
id);
1429 if (name_type_mask & eFunctionNameTypeFull) {
1434 if (name_type_mask & eFunctionNameTypeBase)
1436 if (name_type_mask & eFunctionNameTypeMethod)
1442 bool include_inlines,
1450 std::set<uint32_t> resolved_ids;
1451 auto ResolveFn = [®ex, include_inlines, &sc_list, &resolved_ids,
1453 std::vector<uint32_t> ids;
1454 if (Names.GetValues(regex, ids)) {
1455 for (
auto id : ids) {
1456 if (resolved_ids.find(
id) == resolved_ids.end())
1458 resolved_ids.insert(
id);
1467 const std::string &scope_qualified_name,
1468 std::vector<lldb_private::ConstString> &mangled_names) {}
1471 std::set<lldb::addr_t> sym_addresses;
1483 while (
auto pub_symbol = results->getNext()) {
1484 auto section_id = pub_symbol->getAddressSection();
1486 auto section = section_list->FindSectionByID(section_id);
1490 auto offset = pub_symbol->getAddressOffset();
1492 auto file_addr = section->GetFileAddress() + offset;
1493 if (sym_addresses.find(file_addr) != sym_addresses.end())
1495 sym_addresses.insert(file_addr);
1497 auto size = pub_symbol->getLength();
1499 Symbol(pub_symbol->getSymIndexId(),
1500 pub_symbol->getName().c_str(),
1520 auto type_system_or_err =
1522 if (
auto err = type_system_or_err.takeError()) {
1524 "Unable to dump ClangAST: {0}");
1528 auto ts = *type_system_or_err;
1530 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1531 if (!clang_type_system)
1545 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
1547 std::unique_ptr<IPDBEnumSymbols> results;
1549 uint32_t matches = 0;
1551 for (
auto tag : tags_to_search) {
1556 while (
auto result = results->getNext()) {
1557 if (max_matches > 0 && matches >= max_matches)
1560 std::string type_name;
1561 if (
auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(result.get()))
1562 type_name = enum_type->getName();
1563 else if (
auto typedef_type =
1564 llvm::dyn_cast<PDBSymbolTypeTypedef>(result.get()))
1565 type_name = typedef_type->getName();
1566 else if (
auto class_type = llvm::dyn_cast<PDBSymbolTypeUDT>(result.get()))
1567 type_name = class_type->getName();
1574 if (!regex.
Execute(type_name))
1582 auto iter =
m_types.find(result->getSymIndexId());
1585 types.
Insert(iter->second);
1600 std::unique_ptr<IPDBEnumSymbols> results;
1602 if (basename.empty())
1608 while (
auto result = results->getNext()) {
1610 switch (result->getSymTag()) {
1611 case PDB_SymType::Enum:
1612 case PDB_SymType::UDT:
1613 case PDB_SymType::Typedef:
1622 result->getRawSymbol().getName()) != basename)
1630 auto iter =
m_types.find(result->getSymIndexId());
1634 ConstString name = iter->second->GetQualifiedName();
1638 if (type_results.
Done(query))
1647 bool can_parse =
false;
1648 switch (pdb_symbol.getSymTag()) {
1649 case PDB_SymType::ArrayType:
1650 can_parse = ((type_mask & eTypeClassArray) != 0);
1652 case PDB_SymType::BuiltinType:
1653 can_parse = ((type_mask & eTypeClassBuiltin) != 0);
1655 case PDB_SymType::Enum:
1656 can_parse = ((type_mask & eTypeClassEnumeration) != 0);
1658 case PDB_SymType::Function:
1659 case PDB_SymType::FunctionSig:
1660 can_parse = ((type_mask & eTypeClassFunction) != 0);
1662 case PDB_SymType::PointerType:
1663 can_parse = ((type_mask & (eTypeClassPointer | eTypeClassBlockPointer |
1664 eTypeClassMemberPointer)) != 0);
1666 case PDB_SymType::Typedef:
1667 can_parse = ((type_mask & eTypeClassTypedef) != 0);
1669 case PDB_SymType::UDT: {
1670 auto *udt = llvm::dyn_cast<PDBSymbolTypeUDT>(&pdb_symbol);
1672 can_parse = (udt->getUdtKind() != PDB_UdtType::Interface &&
1673 ((type_mask & (eTypeClassClass | eTypeClassStruct |
1674 eTypeClassUnion)) != 0));
1682 if (!llvm::is_contained(type_collection, type))
1683 type_collection.push_back(type);
1687 auto results_up = pdb_symbol.findAllChildren();
1688 while (
auto symbol_up = results_up->getNext())
1693 TypeClass type_mask,
1714 for (
auto type : type_collection) {
1715 type->GetForwardCompilerType();
1716 type_list.
Insert(type->shared_from_this());
1720llvm::Expected<lldb::TypeSystemSP>
1722 auto type_system_or_err =
1723 m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
1724 if (type_system_or_err) {
1725 if (
auto ts = *type_system_or_err)
1726 ts->SetSymbolFile(
this);
1728 return type_system_or_err;
1732 auto type_system_or_err =
1734 if (
auto err = type_system_or_err.takeError()) {
1736 "Unable to get PDB AST parser: {0}");
1740 auto ts = *type_system_or_err;
1741 auto *clang_type_system =
1742 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1743 if (!clang_type_system)
1746 return clang_type_system->GetPDBParser();
1753 auto type_system_or_err =
1755 if (
auto err = type_system_or_err.takeError()) {
1757 "Unable to find namespace {1}: {0}", name.
AsCString());
1760 auto ts = *type_system_or_err;
1761 auto *clang_type_system =
1762 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1763 if (!clang_type_system)
1770 clang::DeclContext *decl_context =
nullptr;
1771 if (parent_decl_ctx)
1772 decl_context =
static_cast<clang::DeclContext *
>(
1775 auto namespace_decl =
1777 if (!namespace_decl)
1780 return clang_type_system->CreateDeclContext(namespace_decl);
1793 return found_cu->second;
1800 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
1809 std::string path = compiland_up->getSourceFileFullPath();
1816 auto cu_sp = std::make_shared<CompileUnit>(
m_objfile_sp->GetModule(),
nullptr,
1817 path.c_str(),
id, lang, optimized);
1831 uint32_t match_line) {
1840 llvm::DenseMap<uint32_t, uint32_t> index_map;
1842 auto line_table = std::make_unique<LineTable>(&comp_unit);
1845 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
1851 while (
auto file = files->getNext()) {
1853 auto lines =
m_session_up->findLineNumbers(*compiland_up, *file);
1856 int entry_count = lines->getChildCount();
1859 uint32_t prev_length;
1861 uint32_t prev_source_idx;
1863 for (
int i = 0; i < entry_count; ++i) {
1864 auto line = lines->getChildAtIndex(i);
1866 uint64_t lno = line->getLineNumber();
1867 uint64_t addr = line->getVirtualAddress();
1868 uint32_t length = line->getLength();
1869 uint32_t source_id = line->getSourceFileId();
1870 uint32_t col = line->getColumnNumber();
1871 uint32_t source_idx = index_map[source_id];
1875 bool is_gap = (i > 0) && (prev_addr + prev_length < addr);
1880 if (is_gap && ShouldAddLine(match_line, prev_line, prev_length)) {
1881 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1882 prev_line, 0, prev_source_idx,
1883 false,
false,
false,
false,
true);
1885 line_table->InsertSequence(std::move(sequence));
1888 if (ShouldAddLine(match_line, lno, length)) {
1889 bool is_statement = line->isStatement();
1890 bool is_prologue =
false;
1891 bool is_epilogue =
false;
1893 m_session_up->findSymbolByAddress(addr, PDB_SymType::Function);
1895 auto prologue = func->findOneChild<PDBSymbolFuncDebugStart>();
1897 is_prologue = (addr == prologue->getVirtualAddress());
1899 auto epilogue = func->findOneChild<PDBSymbolFuncDebugEnd>();
1901 is_epilogue = (addr == epilogue->getVirtualAddress());
1904 line_table->AppendLineEntryToSequence(sequence, addr, lno, col,
1905 source_idx, is_statement,
false,
1906 is_prologue, is_epilogue,
false);
1910 prev_length = length;
1912 prev_source_idx = source_idx;
1915 if (entry_count > 0 && ShouldAddLine(match_line, prev_line, prev_length)) {
1917 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1918 prev_line, 0, prev_source_idx,
1919 false,
false,
false,
false,
true);
1922 line_table->InsertSequence(std::move(sequence));
1925 if (line_table->GetSize()) {
1933 const PDBSymbolCompiland &compiland,
1934 llvm::DenseMap<uint32_t, uint32_t> &index_map)
const {
1940 auto source_files =
m_session_up->getSourceFilesForCompiland(compiland);
1945 while (
auto file = source_files->getNext()) {
1946 uint32_t source_id = file->getUniqueId();
1947 index_map[source_id] = index++;
1959 m_session_up->findLineNumbersByAddress(file_vm_addr, 1)) {
1960 if (
auto first_line = lines->getNext())
1965 if (
auto sec_contribs =
m_session_up->getSectionContribs()) {
1966 while (
auto section = sec_contribs->getNext()) {
1967 auto va = section->getVirtualAddress();
1968 if (file_vm_addr >= va && file_vm_addr < va + section->getLength())
1978 auto func_name = pdb_func.getName();
1979 auto func_undecorated_name = pdb_func.getUndecoratedName();
1980 std::string func_decorated_name;
1985 if (!func_undecorated_name.empty()) {
1987 PDB_SymType::PublicSymbol, func_undecorated_name,
1988 PDB_NameSearchFlags::NS_UndecoratedName);
1990 while (
auto symbol_up = result_up->getNext()) {
1993 if (
auto *pdb_public_sym =
1994 llvm::dyn_cast_or_null<PDBSymbolPublicSymbol>(
1996 if (pdb_public_sym->isFunction()) {
1997 func_decorated_name = pdb_public_sym->getName();
2004 if (!func_decorated_name.empty()) {
2026 if (!func_undecorated_name.empty() &&
2029 }
else if (!func_undecorated_name.empty()) {
2031 }
else if (!func_name.empty())
2043 if (!decl_ctx_type_system)
2047 if (
auto err = type_system_or_err.takeError()) {
2050 "Unable to determine if DeclContext matches this symbol file: {0}");
2054 if (decl_ctx_type_system == type_system_or_err->get())
2061 static const auto pred_upper = [](uint32_t lhs,
SecContribInfo rhs) {
2062 return lhs < rhs.Offset;
2067 if (
auto SecContribs =
m_session_up->getSectionContribs()) {
2068 while (
auto SectionContrib = SecContribs->getNext()) {
2069 auto comp_id = SectionContrib->getCompilandId();
2073 auto sec = SectionContrib->getAddressSection();
2076 auto offset = SectionContrib->getAddressOffset();
2077 auto it = llvm::upper_bound(sec_cs, offset, pred_upper);
2079 auto size = SectionContrib->getLength();
2080 sec_cs.insert(it, {offset, size, comp_id});
2086 if (
auto Lines = data.getLineNumbers()) {
2087 if (
auto FirstLine = Lines->getNext())
2088 return FirstLine->getCompilandId();
2092 uint32_t DataSection = data.getAddressSection();
2093 uint32_t DataOffset = data.getAddressOffset();
2094 if (DataSection == 0) {
2095 if (
auto RVA = data.getRelativeVirtualAddress())
2096 m_session_up->addressForRVA(RVA, DataSection, DataOffset);
2102 auto it = llvm::upper_bound(sec_cs, DataOffset, pred_upper);
2103 if (it != sec_cs.begin()) {
2105 if (DataOffset < it->Offset + it->Size)
2106 return it->CompilandId;
2110 auto LexParentId = data.getLexicalParentId();
2111 while (
auto LexParent =
m_session_up->getSymbolById(LexParentId)) {
2112 if (LexParent->getSymTag() == PDB_SymType::Exe)
2114 if (LexParent->getSymTag() == PDB_SymType::Compiland)
2116 LexParentId = LexParent->getRawSymbol().getLexicalParentId();
static llvm::raw_ostream & error(Stream &strm)
static PluginProperties & GetGlobalPluginProperties()
#define LLDB_LOG_ERROR(log, error,...)
DWARFExpression ConvertPDBLocationToDWARFExpression(ModuleSP module, const PDBSymbolData &symbol, const Variable::RangeList &ranges, bool &is_constant)
#define LLDB_PLUGIN_DEFINE(PluginName)
static lldb::LanguageType TranslateLanguage(PDB_Lang lang)
static size_t ParseFunctionBlocksForPDBSymbol(uint64_t func_file_vm_addr, const llvm::pdb::PDBSymbol *pdb_symbol, lldb_private::Block *parent_block, bool is_top_parent)
static llvm::StringRef DropScope(llvm::StringRef name)
clang::Decl * GetDeclForSymbol(const llvm::pdb::PDBSymbol &symbol)
lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
std::unique_ptr< llvm::pdb::PDBSymbolCompiland > GetPDBCompilandByUID(uint32_t uid)
static lldb_private::SymbolFile * CreateInstance(lldb::ObjectFileSP objfile_sp)
void DumpClangAST(lldb_private::Stream &s, llvm::StringRef filter, bool show_color) override
std::unique_ptr< llvm::pdb::IPDBSession > m_session_up
lldb::CompUnitSP GetCompileUnitContainsAddress(const lldb_private::Address &so_addr)
void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector< lldb_private::ConstString > &mangled_names) override
void GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool include_inlines, lldb_private::SymbolContextList &sc_list) override
lldb_private::CompilerDeclContext FindNamespace(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces) override
Finds a namespace of name name and whose parent context is parent_decl_ctx.
std::unique_ptr< llvm::pdb::PDBSymbolExe > m_global_scope_up
llvm::DenseMap< uint32_t, lldb::CompUnitSP > m_comp_units
std::optional< ArrayInfo > GetDynamicArrayInfoForUID(lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) override
If type_uid points to an array type, return its characteristics.
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
static llvm::StringRef GetPluginNameStatic()
bool ParseCompileUnitLineTable(lldb_private::CompileUnit &comp_unit, uint32_t match_line)
void BuildSupportFileIdToSupportFileIndexMap(const llvm::pdb::PDBSymbolCompiland &pdb_compiland, llvm::DenseMap< uint32_t, uint32_t > &index_map) const
lldb_private::Function * ParseCompileUnitFunctionForPDBFunc(const llvm::pdb::PDBSymbolFunc &pdb_func, lldb_private::CompileUnit &comp_unit)
lldb_private::UniqueCStringMap< uint32_t > m_func_base_names
bool ParseImportedModules(const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
void FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
void GetCompileUnitIndex(const llvm::pdb::PDBSymbolCompiland &pdb_compiland, uint32_t &index)
llvm::DenseMap< uint32_t, lldb::TypeSP > m_types
void AddSymbols(lldb_private::Symtab &symtab) override
size_t ParseBlocksRecursive(lldb_private::Function &func) override
void CacheFunctionNames()
llvm::DenseMap< uint64_t, std::string > m_public_names
size_t ParseVariables(const lldb_private::SymbolContext &sc, const llvm::pdb::PDBSymbol &pdb_data, lldb_private::VariableList *variable_list=nullptr)
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
void InitializeObject() override
Initialize the SymbolFile object.
static bool UseNativePDB()
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
PDBASTParser * GetPDBAstParser()
uint32_t CalculateNumCompileUnits() override
SymbolFilePDB(lldb::ObjectFileSP objfile_sp)
~SymbolFilePDB() override
uint32_t GetCompilandId(const llvm::pdb::PDBSymbolData &data)
llvm::pdb::IPDBSession & GetPDBSession()
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, lldb_private::SupportFileList &support_files) override
static char ID
LLVM RTTI support.
void FindTypesByRegex(const lldb_private::RegularExpression ®ex, uint32_t max_matches, lldb_private::TypeMap &types)
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
lldb::CompUnitSP ParseCompileUnitForUID(uint32_t id, uint32_t index=UINT32_MAX)
lldb_private::Mangled GetMangledForPDBFunc(const llvm::pdb::PDBSymbolFunc &pdb_func)
std::vector< lldb_private::Type * > TypeCollection
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
void GetTypesForPDBSymbol(const llvm::pdb::PDBSymbol &pdb_symbol, uint32_t type_mask, TypeCollection &type_collection)
bool CompleteType(lldb_private::CompilerType &compiler_type) override
static void DebuggerInitialize(lldb_private::Debugger &debugger)
static llvm::StringRef GetPluginDescriptionStatic()
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override
std::string GetMangledForPDBData(const llvm::pdb::PDBSymbolData &pdb_data)
lldb_private::Type * ResolveTypeUID(lldb::user_id_t type_uid) override
lldb_private::UniqueCStringMap< uint32_t > m_func_full_names
lldb_private::UniqueCStringMap< uint32_t > m_func_method_names
bool DeclContextMatchesThisSymbolFile(const lldb_private::CompilerDeclContext &decl_ctx)
lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
void FindTypes(const lldb_private::TypeQuery &match, lldb_private::TypeResults &results) override
Find types using a type-matching object that contains all search parameters.
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
SecContribsMap m_sec_contribs
lldb::VariableSP ParseVariableForPDBData(const lldb_private::SymbolContext &sc, const llvm::pdb::PDBSymbolData &pdb_data)
bool ResolveFunction(const llvm::pdb::PDBSymbolFunc &pdb_func, bool include_inlines, lldb_private::SymbolContextList &sc_list)
uint32_t CalculateAbilities() override
llvm::DenseMap< uint32_t, lldb::VariableSP > m_variables
lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
A section + offset based address range class.
Address & GetBaseAddress()
Get accessor for the base address of the range.
lldb::addr_t GetByteSize() const
Get accessor for the byte size of this range.
A section + offset based address class.
lldb::addr_t GetFileAddress() const
Get the file address.
bool IsValid() const
Check if the object state is valid.
A class that describes a single lexical block.
lldb::VariableListSP GetBlockVariableList(bool can_create)
Get the variable list for this block only.
bool GetRangeAtIndex(uint32_t range_idx, AddressRange &range)
lldb::BlockSP CreateChild(lldb::user_id_t uid)
Creates a block with the specified UID uid.
Block * FindBlockByID(lldb::user_id_t block_id)
void SetVariableList(lldb::VariableListSP &variable_list_sp)
Set accessor for the variable list.
size_t GetNumRanges() const
void SetDidParseVariables(bool b, bool set_children)
void AddRange(const Range &range)
Add a new offset range to this block.
A class that describes a compilation unit.
void SetVariableList(lldb::VariableListSP &variable_list_sp)
Set accessor for the variable list.
lldb::VariableListSP GetVariableList(bool can_create)
Get the variable list for a compile unit.
void SetLineTable(LineTable *line_table)
Set the line table for the compile unit.
void AddFunction(lldb::FunctionSP &function_sp)
Add a function to this compile unit.
lldb::FunctionSP FindFunctionByUID(lldb::user_id_t uid)
Finds a function by user ID.
LineTable * GetLineTable()
Get the line table for the compile unit.
Represents a generic declaration context in a program.
TypeSystem * GetTypeSystem() const
void * GetOpaqueDeclContext() const
Represents a generic declaration such as a function declaration.
Generic representation of a type in a programming language.
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
bool IsEmpty() const
Test for empty string.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
"lldb/Expression/DWARFExpressionList.h" Encapsulates a range map from file address range to a single ...
A class to manage flag bits.
A class that describes the declaration location of a lldb object.
void SetLine(uint32_t line)
Set accessor for the declaration line number.
void SetColumn(uint16_t column)
Set accessor for the declaration column number.
void SetFile(const FileSpec &file_spec)
Set accessor for the declaration file specification.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const ConstString & GetDirectory() const
Directory string const get accessor.
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
A class that describes a function.
Block & GetBlock(bool can_create)
Get accessor for the block list.
A class that handles mangled names.
static bool IsMangledName(llvm::StringRef name)
void SetDemangledName(ConstString name)
ConstString GetDemangledName() const
Demangled name get accessor.
void SetMangledName(ConstString name)
void SetValue(ConstString name)
Set the string value in this object.
lldb::ModuleSP GetModule() const
Get const accessor for the module pointer.
A class that encapsulates name lookup information.
lldb::FunctionNameType GetNameTypeMask() const
ConstString GetLookupName() const
ConstString GetName() const
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool CreateSettingForSymbolFilePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static lldb::OptionValuePropertiesSP GetSettingForSymbolFilePlugin(Debugger &debugger, llvm::StringRef setting_name)
static bool UnregisterPlugin(ABICreateInstance create_callback)
void Append(const Entry &entry)
bool IsValid() const
Test if this object contains a valid regular expression.
bool Execute(llvm::StringRef string, llvm::SmallVectorImpl< llvm::StringRef > *matches=nullptr) const
Execute a regular expression match using the compiled regular expression that is already in this obje...
"lldb/Core/SourceLocationSpec.h" A source location specifier class.
std::optional< uint32_t > GetLine() const
bool GetCheckInlines() const
FileSpec GetFileSpec() const
A stream class that can stream formatted output to a file.
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
A list of support files for a CompileUnit.
bool AppendIfUnique(const FileSpec &file)
Defines a list of symbol context objects.
uint32_t GetSize() const
Get accessor for a symbol context list size.
void Append(const SymbolContext &sc)
Append a new symbol context to the list.
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
virtual CompileUnit * CalculateSymbolContextCompileUnit()
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
Block * block
The Block for a given query.
lldb::ModuleSP module_sp
The Module for a given query.
CompileUnit * comp_unit
The CompileUnit for a given query.
LineEntry line_entry
The LineEntry for a given query.
ObjectFile * GetObjectFile() override
lldb::ObjectFileSP m_objfile_sp
void SetCompileUnitAtIndex(uint32_t idx, const lldb::CompUnitSP &cu_sp)
SymbolFileCommon(lldb::ObjectFileSP objfile_sp)
uint32_t GetNumCompileUnits() override
Provides public interface for all SymbolFiles.
virtual std::recursive_mutex & GetModuleMutex() const
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this ...
lldb::addr_t GetFileAddress() const
Symbol * SymbolAtIndex(size_t idx)
uint32_t AddSymbol(const Symbol &symbol)
size_t GetNumSymbols() const
void Insert(const lldb::TypeSP &type)
void Insert(const lldb::TypeSP &type)
A class that contains all state required for type lookups.
std::vector< lldb_private::CompilerContext > & GetContextRef()
Access the internal compiler context array.
ConstString GetTypeBasename() const
Get the type basename to use when searching the type indexes in each SymbolFile object.
bool ContextMatches(llvm::ArrayRef< lldb_private::CompilerContext > context) const
Check of a CompilerContext array from matching type from a symbol file matches the m_context.
This class tracks the state and results of a TypeQuery.
bool InsertUnique(const lldb::TypeSP &type_sp)
When types that match a TypeQuery are found, this API is used to insert the matching types.
bool Done(const TypeQuery &query) const
Check if the type matching has found all of the matches that it needs.
bool AlreadySearched(lldb_private::SymbolFile *sym_file)
Check if a SymbolFile object has already been searched by this type match object.
A TypeSystem implementation based on Clang.
CompilerDecl GetCompilerDecl(clang::Decl *decl)
Creates a CompilerDecl from the given Decl with the current TypeSystemClang instance as its typesyste...
CompilerDeclContext CreateDeclContext(clang::DeclContext *ctx)
Creates a CompilerDeclContext from the given DeclContext with the current TypeSystemClang instance as...
PDBASTParser * GetPDBParser() override
void Dump(llvm::raw_ostream &output, llvm::StringRef filter, bool show_color) override
Interface for representing a type system.
virtual lldb::LanguageType GetMinimumLanguage(lldb::opaque_compiler_type_t type)=0
bool AddVariableIfUnique(const lldb::VariableSP &var_sp)
RangeVector< lldb::addr_t, lldb::addr_t > RangeList
#define LLDB_INVALID_ADDRESS
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.
std::shared_ptr< lldb_private::Function > FunctionSP
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
LanguageType
Programming language type.
@ eLanguageTypeUnknown
Unknown or invalid language value.
@ eLanguageTypeObjC_plus_plus
Objective-C++.
@ eLanguageTypeSwift
Swift.
@ eLanguageTypeC
Non-standardized C, such as K&R.
@ eLanguageTypeObjC
Objective-C.
@ eLanguageTypeC_plus_plus
ISO C++:1998.
std::shared_ptr< lldb_private::Type > TypeSP
std::shared_ptr< lldb_private::VariableList > VariableListSP
std::shared_ptr< lldb_private::SymbolFileType > SymbolFileTypeSP
std::shared_ptr< lldb_private::Variable > VariableSP
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::CompileUnit > CompUnitSP
@ eValueTypeVariableGlobal
globals variable
@ eValueTypeConstResult
constant result variables
@ eValueTypeVariableLocal
function local variables
@ eValueTypeVariableArgument
function argument variables
@ eValueTypeVariableStatic
static variable
@ eValueTypeVariableThreadLocal
thread local storage variable
AddressRange range
The section offset address range for this line entry.
lldb::user_id_t GetID() const
Get accessor for the user ID.