14#include "clang/Lex/Lexer.h"
33#include "llvm/Config/llvm-config.h"
34#include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h"
35#include "llvm/DebugInfo/PDB/GenericError.h"
36#include "llvm/DebugInfo/PDB/IPDBDataStream.h"
37#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
38#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
39#include "llvm/DebugInfo/PDB/IPDBSectionContrib.h"
40#include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
41#include "llvm/DebugInfo/PDB/IPDBTable.h"
42#include "llvm/DebugInfo/PDB/PDBSymbol.h"
43#include "llvm/DebugInfo/PDB/PDBSymbolBlock.h"
44#include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
45#include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h"
46#include "llvm/DebugInfo/PDB/PDBSymbolData.h"
47#include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
48#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
49#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
50#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
51#include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h"
52#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
53#include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
54#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
55#include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
56#include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
62#include "llvm/Config/llvm-config.h"
86 "Use native PDB reader unless LLDB_USE_NATIVE_PDB_READER environment "
97 "Use native PDB reader",
101#define LLDB_PROPERTIES_symbolfilepdb
102#include "SymbolFilePDBProperties.inc"
105#define LLDB_PROPERTIES_symbolfilepdb
106#include "SymbolFilePDBPropertiesEnum.inc"
109static const bool g_should_use_native_reader_by_default = [] {
110 llvm::StringRef env_value = ::getenv(
"LLDB_USE_NATIVE_PDB_READER");
112 return !env_value.equals_insensitive(
"off") &&
113 !env_value.equals_insensitive(
"no") &&
114 !env_value.equals_insensitive(
"0") &&
115 !env_value.equals_insensitive(
"false");
120 static llvm::StringRef GetSettingName() {
125 m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
126 m_collection_sp->Initialize(g_symbolfilepdb_properties);
129 bool UseNativeReader()
const {
130#if LLVM_ENABLE_DIA_SDK && defined(_WIN32)
131 return IsNativeReaderRequested();
133 if (!IsNativeReaderRequested()) {
134 static std::once_flag g_warning_shown;
136 "the DIA PDB reader was explicitly requested, but LLDB was built "
137 "without the DIA SDK. The native reader will be used instead",
138 {}, &g_warning_shown);
145 bool IsNativeReaderRequested()
const {
147 GetPropertyAtIndexAs<PDBReader>(ePropertyReader, ePDBReaderDefault);
149 case ePDBReaderNative:
154 return g_should_use_native_reader_by_default;
160 static PluginProperties g_settings;
170 case PDB_Lang::Swift:
176 case PDB_Lang::ObjCpp:
183bool ShouldAddLine(uint32_t requested_line, uint32_t actual_line,
184 uint32_t addr_length) {
185 return ((requested_line == 0 || actual_line == requested_line) &&
211 debugger, PluginProperties::GetSettingName())) {
214 "Properties for the PDB symbol-file plug-in.",
true);
219 return "Microsoft PDB debug symbol file reader.";
236 uint32_t abilities = 0;
242 std::string exePath =
m_objfile_sp->GetFileSpec().GetPath();
243 auto error = loadDataForEXE(PDB_ReaderType::DIA, llvm::StringRef(exePath),
246 llvm::consumeError(std::move(
error));
251 FileSpec symfile = module_sp->GetSymbolFileFileSpec();
254 error = loadDataForPDB(PDB_ReaderType::DIA,
257 llvm::consumeError(std::move(
error));
268 while (
auto table_up = enum_tables_up->getNext()) {
269 if (table_up->getItemCount() == 0)
271 auto type = table_up->getTableType();
273 case PDB_TableType::Symbols:
279 case PDB_TableType::LineNumbers:
312 uint32_t compile_unit_count = compilands->getChildCount();
317 auto last_compiland_up = compilands->getChildAtIndex(compile_unit_count - 1);
319 std::string name = last_compiland_up->getName();
320 if (name ==
"* Linker *")
321 --compile_unit_count;
322 return compile_unit_count;
326 const llvm::pdb::PDBSymbolCompiland &pdb_compiland, uint32_t &index) {
330 auto uid = pdb_compiland.getSymIndexId();
332 auto compiland_up = results_up->getChildAtIndex(cu_idx);
335 if (compiland_up->getSymIndexId() == uid) {
343std::unique_ptr<llvm::pdb::PDBSymbolCompiland>
345 return m_session_up->getConcreteSymbolById<PDBSymbolCompiland>(uid);
358 auto compiland_up = results->getChildAtIndex(index);
369 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
381 auto file_vm_addr = pdb_func.getVirtualAddress();
385 auto func_length = pdb_func.getLength();
386 Address func_addr(file_vm_addr,
395 user_id_t func_type_uid = pdb_func.getSignatureId();
399 FunctionSP func_sp = std::make_shared<Function>(
400 &comp_unit, pdb_func.getSymIndexId(), func_type_uid, mangled, func_type,
401 func_addr,
AddressRanges{AddressRange(func_addr, func_length)});
407 if (
auto err = type_system_or_err.takeError()) {
409 "Unable to parse PDBFunc: {0}");
413 auto ts = *type_system_or_err;
415 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
416 if (!clang_type_system)
420 return func_sp.get();
425 size_t func_added = 0;
429 auto results_up = compiland_up->findAllChildren<PDBSymbolFunc>();
432 while (
auto pdb_func_up = results_up->getNext()) {
466 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
467 if (!files || files->getChildCount() == 0)
470 while (
auto file = files->getNext()) {
471 FileSpec spec(file->getFileName(), FileSpec::Style::windows);
480 std::vector<SourceModule> &imported_modules) {
486 uint64_t func_file_vm_addr,
const llvm::pdb::PDBSymbol *pdb_symbol,
488 assert(pdb_symbol && parent_block);
490 size_t num_added = 0;
492 if (!is_top_parent) {
494 if (pdb_symbol->getSymTag() != PDB_SymType::Block)
497 auto &raw_sym = pdb_symbol->getRawSymbol();
498 assert(llvm::isa<PDBSymbolBlock>(pdb_symbol));
499 auto uid = pdb_symbol->getSymIndexId();
502 if (raw_sym.getVirtualAddress() < func_file_vm_addr)
505 Block *block = parent_block->
CreateChild(pdb_symbol->getSymIndexId()).get();
507 raw_sym.getVirtualAddress() - func_file_vm_addr, raw_sym.getLength()));
510 auto results_up = pdb_symbol->findAllChildren();
514 while (
auto symbol_up = results_up->getNext()) {
516 func_file_vm_addr, symbol_up.get(), parent_block,
false);
523 size_t num_added = 0;
524 auto uid = func.
GetID();
525 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
530 pdb_func_up->getVirtualAddress(), pdb_func_up.get(), &parent_block,
true);
537 size_t num_added = 0;
542 auto ParseTypesByTagFn = [&num_added,
this](
const PDBSymbol &raw_sym) {
543 std::unique_ptr<IPDBEnumSymbols> results;
544 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
546 for (
auto tag : tags_to_search) {
547 results = raw_sym.findAllChildren(tag);
548 if (!results || results->getChildCount() == 0)
550 while (
auto symbol = results->getNext()) {
551 switch (symbol->getSymTag()) {
552 case PDB_SymType::Enum:
553 case PDB_SymType::UDT:
554 case PDB_SymType::Typedef:
566 type->GetFullCompilerType();
573 ParseTypesByTagFn(*compiland);
578 static bool parse_all_global_types =
false;
579 if (!parse_all_global_types) {
581 parse_all_global_types =
true;
592 size_t num_added = 0;
594 auto pdb_func =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(
610 if (results && results->getChildCount()) {
611 while (
auto result = results->getNext()) {
638 auto find_result =
m_types.find(type_uid);
639 if (find_result !=
m_types.end())
640 return find_result->second.get();
642 auto type_system_or_err =
644 if (
auto err = type_system_or_err.takeError()) {
646 "Unable to ResolveTypeUID: {0}");
650 auto ts = *type_system_or_err;
652 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
653 if (!clang_type_system)
660 if (pdb_type ==
nullptr)
665 m_types.insert(std::make_pair(type_uid, result));
676 std::lock_guard<std::recursive_mutex> guard(
679 auto type_system_or_err =
681 if (
auto err = type_system_or_err.takeError()) {
683 "Unable to get dynamic array info for UID: {0}");
686 auto ts = *type_system_or_err;
688 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
697 return pdb->CompleteTypeFromPDB(compiler_type);
701 auto type_system_or_err =
703 if (
auto err = type_system_or_err.takeError()) {
705 "Unable to get decl for UID: {0}");
708 auto ts = *type_system_or_err;
710 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
722 auto decl =
pdb->GetDeclForSymbol(*symbol);
731 auto type_system_or_err =
733 if (
auto err = type_system_or_err.takeError()) {
735 "Unable to get DeclContext for UID: {0}");
739 auto ts = *type_system_or_err;
741 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
753 auto decl_context =
pdb->GetDeclContextForSymbol(*symbol);
762 auto type_system_or_err =
764 if (
auto err = type_system_or_err.takeError()) {
766 "Unable to get DeclContext containing UID: {0}");
770 auto ts = *type_system_or_err;
772 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
784 auto decl_context =
pdb->GetDeclContextContainingSymbol(*symbol);
785 assert(decl_context);
792 auto type_system_or_err =
794 if (
auto err = type_system_or_err.takeError()) {
796 "Unable to parse decls for context: {0}");
800 auto ts = *type_system_or_err;
802 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
810 pdb->ParseDeclsForDeclContext(
816 SymbolContextItem resolve_scope,
819 uint32_t resolved_flags = 0;
820 if (resolve_scope & eSymbolContextCompUnit ||
821 resolve_scope & eSymbolContextVariable ||
822 resolve_scope & eSymbolContextFunction ||
823 resolve_scope & eSymbolContextBlock ||
824 resolve_scope & eSymbolContextLineEntry) {
827 if (resolved_flags & eSymbolContextVariable) {
833 resolved_flags |= eSymbolContextCompUnit;
837 if (resolve_scope & eSymbolContextFunction ||
838 resolve_scope & eSymbolContextBlock) {
841 m_session_up->findSymbolByAddress(file_vm_addr, PDB_SymType::Function);
843 auto *pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
845 auto func_uid = pdb_func->getSymIndexId();
851 resolved_flags |= eSymbolContextFunction;
852 if (resolve_scope & eSymbolContextBlock) {
854 file_vm_addr, PDB_SymType::Block);
855 auto block_id = block_symbol ? block_symbol->getSymIndexId()
859 resolved_flags |= eSymbolContextBlock;
865 if (resolve_scope & eSymbolContextLineEntry) {
867 Address addr(so_addr);
868 if (line_table->FindLineEntryByAddress(addr, sc.
line_entry))
869 resolved_flags |= eSymbolContextLineEntry;
873 return resolved_flags;
880 const size_t old_size = sc_list.
GetSize();
881 const FileSpec &file_spec = src_location_spec.
GetFileSpec();
882 const uint32_t line = src_location_spec.
GetLine().value_or(0);
883 if (resolve_scope & lldb::eSymbolContextCompUnit) {
888 auto compilands =
m_session_up->findCompilandsForSourceFile(
889 file_spec.
GetPath(), PDB_NameSearchFlags::NS_CaseInsensitive);
896 while (
auto compiland = compilands->getNext()) {
902 std::string source_file = compiland->getSourceFileFullPath();
903 if (source_file.empty())
905 FileSpec this_spec(source_file, FileSpec::Style::windows);
907 if (FileSpec::Compare(file_spec, this_spec, need_full_match) != 0)
920 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock |
921 eSymbolContextLineEntry)) {
924 if ((resolve_scope & eSymbolContextLineEntry) && !has_line_table) {
928 assert(line &&
"Couldn't get all line entries!\n");
934 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) {
941 uint32_t num_line_entries = line_table->GetSize();
947 for (uint32_t line_idx = 0; line && line_idx < num_line_entries;
949 if (!line_table->GetLineEntryAtIndex(line_idx, sc.
line_entry))
958 file_vm_addr, PDB_SymType::Function);
960 auto func_uid = symbol_up->getSymIndexId();
963 auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
968 if (sc.
function && (resolve_scope & eSymbolContextBlock)) {
975 }
else if (has_line_table) {
987 return sc_list.
GetSize() - old_size;
995 while (
auto symbol_up = result_up->getNext())
996 if (
auto addr = symbol_up->getRawSymbol().getVirtualAddress())
1005 const llvm::pdb::PDBSymbolData &pdb_data) {
1007 uint32_t var_uid = pdb_data.getSymIndexId();
1010 return result->second;
1013 bool is_static_member =
false;
1014 bool is_external =
false;
1015 bool is_artificial =
false;
1017 switch (pdb_data.getDataKind()) {
1018 case PDB_DataKind::Global:
1022 case PDB_DataKind::Local:
1025 case PDB_DataKind::FileStatic:
1028 case PDB_DataKind::StaticMember:
1029 is_static_member =
true;
1032 case PDB_DataKind::Member:
1035 case PDB_DataKind::Param:
1038 case PDB_DataKind::Constant:
1045 switch (pdb_data.getLocationType()) {
1046 case PDB_LocType::TLS:
1049 case PDB_LocType::RegRel: {
1051 if (pdb_data.getDataKind() == PDB_DataKind::ObjectPtr) {
1053 is_artificial =
true;
1061 if (!is_artificial && !pdb_data.isCompilerGenerated()) {
1062 if (
auto lines = pdb_data.getLineNumbers()) {
1063 if (
auto first_line = lines->getNext()) {
1064 uint32_t src_file_id = first_line->getSourceFileId();
1065 auto src_file =
m_session_up->getSourceFileById(src_file_id);
1067 FileSpec spec(src_file->getFileName());
1069 decl.
SetColumn(first_line->getColumnNumber());
1070 decl.
SetLine(first_line->getLineNumber());
1082 function_block.
FindBlockByID(pdb_data.getLexicalParentId());
1084 block = &function_block;
1086 context_scope = block;
1088 for (
size_t i = 0, num_ranges = block->
GetNumRanges(); i < num_ranges;
1101 std::make_shared<SymbolFileType>(*
this, pdb_data.getTypeId());
1103 auto var_name = pdb_data.getName();
1105 auto mangled_cstr = mangled.empty() ? nullptr : mangled.c_str();
1111 module_sp, pdb_data, ranges, is_constant),
1114 var_sp = std::make_shared<Variable>(
1115 var_uid, var_name.c_str(), mangled_cstr, type_sp, scope, context_scope,
1116 ranges, &decl, location, is_external, is_artificial, is_constant,
1119 m_variables.insert(std::make_pair(var_uid, var_sp));
1125 const llvm::pdb::PDBSymbol &pdb_symbol,
1127 size_t num_added = 0;
1129 if (
auto pdb_data = llvm::dyn_cast<PDBSymbolData>(&pdb_symbol)) {
1132 auto result =
m_variables.find(pdb_data->getSymIndexId());
1138 if (
auto lexical_parent = pdb_data->getLexicalParent()) {
1139 switch (lexical_parent->getSymTag()) {
1140 case PDB_SymType::Exe:
1143 case PDB_SymType::Compiland: {
1146 if (!local_variable_list_sp) {
1147 local_variable_list_sp = std::make_shared<VariableList>();
1152 case PDB_SymType::Block:
1153 case PDB_SymType::Function: {
1156 lexical_parent->getSymIndexId());
1159 if (!local_variable_list_sp) {
1160 local_variable_list_sp = std::make_shared<VariableList>();
1171 if (local_variable_list_sp) {
1173 local_variable_list_sp->AddVariableIfUnique(var_sp);
1185 if (
auto results = pdb_symbol.findAllChildren()) {
1186 while (
auto result = results->getNext())
1206 uint32_t matches = 0;
1207 size_t old_size = variables.
GetSize();
1208 while (
auto result = results->getNext()) {
1209 auto pdb_data = llvm::dyn_cast<PDBSymbolData>(result.get());
1210 if (max_matches > 0 && matches >= max_matches)
1226 if (parent_decl_ctx.
IsValid() &&
1231 matches = variables.
GetSize() - old_size;
1245 uint32_t matches = 0;
1246 size_t old_size = variables.
GetSize();
1247 while (
auto pdb_data = results->getNext()) {
1248 if (max_matches > 0 && matches >= max_matches)
1251 auto var_name = pdb_data->getName();
1252 if (var_name.empty())
1266 matches = variables.
GetSize() - old_size;
1271 bool include_inlines,
1288 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
1289 if (!pdb_func_up && !(include_inlines && pdb_func_up->hasInlineAttribute()))
1298 std::map<uint64_t, uint32_t> addr_ids;
1301 while (
auto pdb_func_up = results_up->getNext()) {
1302 if (pdb_func_up->isCompilerGenerated())
1305 auto name = pdb_func_up->getName();
1306 auto demangled_name = pdb_func_up->getUndecoratedName();
1307 if (name.empty() && demangled_name.empty())
1310 auto uid = pdb_func_up->getSymIndexId();
1311 if (!demangled_name.empty() && pdb_func_up->getVirtualAddress())
1312 addr_ids.insert(std::make_pair(pdb_func_up->getVirtualAddress(), uid));
1314 if (
auto parent = pdb_func_up->getClassParent()) {
1325 if (!basename.empty())
1331 if (!demangled_name.empty())
1339 if (!basename.empty())
1344 if (name ==
"main") {
1347 if (!demangled_name.empty() && name != demangled_name) {
1351 }
else if (!demangled_name.empty()) {
1360 if (
auto results_up =
1362 while (
auto pub_sym_up = results_up->getNext()) {
1363 if (!pub_sym_up->isFunction())
1365 auto name = pub_sym_up->getName();
1371 if (
auto vm_addr = pub_sym_up->getVirtualAddress()) {
1372 if (
auto it = addr_ids.find(vm_addr); it != addr_ids.end())
1391 bool include_inlines,
1396 lldbassert((name_type_mask & eFunctionNameTypeAuto) == 0);
1398 if (name_type_mask & eFunctionNameTypeFull)
1401 if (name_type_mask == eFunctionNameTypeNone)
1408 if (name_type_mask & eFunctionNameTypeFull ||
1409 name_type_mask & eFunctionNameTypeBase ||
1410 name_type_mask & eFunctionNameTypeMethod) {
1413 std::set<uint32_t> resolved_ids;
1414 auto ResolveFn = [
this, &name, parent_decl_ctx, include_inlines, &sc_list,
1416 std::vector<uint32_t> ids;
1417 if (!Names.GetValues(name, ids))
1420 for (uint32_t
id : ids) {
1421 if (resolved_ids.find(
id) != resolved_ids.end())
1424 if (parent_decl_ctx.IsValid() &&
1429 resolved_ids.insert(
id);
1432 if (name_type_mask & eFunctionNameTypeFull) {
1437 if (name_type_mask & eFunctionNameTypeBase)
1439 if (name_type_mask & eFunctionNameTypeMethod)
1445 bool include_inlines,
1453 std::set<uint32_t> resolved_ids;
1454 auto ResolveFn = [®ex, include_inlines, &sc_list, &resolved_ids,
1456 std::vector<uint32_t> ids;
1457 if (Names.GetValues(regex, ids)) {
1458 for (
auto id : ids) {
1459 if (resolved_ids.find(
id) == resolved_ids.end())
1461 resolved_ids.insert(
id);
1470 const std::string &scope_qualified_name,
1471 std::vector<lldb_private::ConstString> &mangled_names) {}
1474 std::set<lldb::addr_t> sym_addresses;
1486 while (
auto pub_symbol = results->getNext()) {
1487 auto section_id = pub_symbol->getAddressSection();
1489 auto section = section_list->FindSectionByID(section_id);
1493 auto offset = pub_symbol->getAddressOffset();
1495 auto file_addr = section->GetFileAddress() + offset;
1496 if (sym_addresses.find(file_addr) != sym_addresses.end())
1498 sym_addresses.insert(file_addr);
1500 auto size = pub_symbol->getLength();
1502 Symbol(pub_symbol->getSymIndexId(),
1503 pub_symbol->getName().c_str(),
1523 auto type_system_or_err =
1525 if (
auto err = type_system_or_err.takeError()) {
1527 "Unable to dump ClangAST: {0}");
1531 auto ts = *type_system_or_err;
1533 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1534 if (!clang_type_system)
1548 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
1550 std::unique_ptr<IPDBEnumSymbols> results;
1552 uint32_t matches = 0;
1554 for (
auto tag : tags_to_search) {
1559 while (
auto result = results->getNext()) {
1560 if (max_matches > 0 && matches >= max_matches)
1563 std::string type_name;
1564 if (
auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(result.get()))
1565 type_name = enum_type->getName();
1566 else if (
auto typedef_type =
1567 llvm::dyn_cast<PDBSymbolTypeTypedef>(result.get()))
1568 type_name = typedef_type->getName();
1569 else if (
auto class_type = llvm::dyn_cast<PDBSymbolTypeUDT>(result.get()))
1570 type_name = class_type->getName();
1577 if (!regex.
Execute(type_name))
1585 auto iter =
m_types.find(result->getSymIndexId());
1588 types.
Insert(iter->second);
1603 std::unique_ptr<IPDBEnumSymbols> results;
1605 if (basename.empty())
1611 while (
auto result = results->getNext()) {
1613 switch (result->getSymTag()) {
1614 case PDB_SymType::Enum:
1615 case PDB_SymType::UDT:
1616 case PDB_SymType::Typedef:
1625 result->getRawSymbol().getName()) != basename)
1633 auto iter =
m_types.find(result->getSymIndexId());
1637 ConstString name = iter->second->GetQualifiedName();
1641 if (type_results.
Done(query))
1650 bool can_parse =
false;
1651 switch (pdb_symbol.getSymTag()) {
1652 case PDB_SymType::ArrayType:
1653 can_parse = ((type_mask & eTypeClassArray) != 0);
1655 case PDB_SymType::BuiltinType:
1656 can_parse = ((type_mask & eTypeClassBuiltin) != 0);
1658 case PDB_SymType::Enum:
1659 can_parse = ((type_mask & eTypeClassEnumeration) != 0);
1661 case PDB_SymType::Function:
1662 case PDB_SymType::FunctionSig:
1663 can_parse = ((type_mask & eTypeClassFunction) != 0);
1665 case PDB_SymType::PointerType:
1666 can_parse = ((type_mask & (eTypeClassPointer | eTypeClassBlockPointer |
1667 eTypeClassMemberPointer)) != 0);
1669 case PDB_SymType::Typedef:
1670 can_parse = ((type_mask & eTypeClassTypedef) != 0);
1672 case PDB_SymType::UDT: {
1673 auto *udt = llvm::dyn_cast<PDBSymbolTypeUDT>(&pdb_symbol);
1675 can_parse = (udt->getUdtKind() != PDB_UdtType::Interface &&
1676 ((type_mask & (eTypeClassClass | eTypeClassStruct |
1677 eTypeClassUnion)) != 0));
1685 if (!llvm::is_contained(type_collection, type))
1686 type_collection.push_back(type);
1690 auto results_up = pdb_symbol.findAllChildren();
1691 while (
auto symbol_up = results_up->getNext())
1696 TypeClass type_mask,
1717 for (
auto type : type_collection) {
1718 type->GetForwardCompilerType();
1719 type_list.
Insert(type->shared_from_this());
1723llvm::Expected<lldb::TypeSystemSP>
1725 auto type_system_or_err =
1726 m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
1727 if (type_system_or_err) {
1728 if (
auto ts = *type_system_or_err)
1729 ts->SetSymbolFile(
this);
1731 return type_system_or_err;
1735 auto type_system_or_err =
1737 if (
auto err = type_system_or_err.takeError()) {
1739 "Unable to get PDB AST parser: {0}");
1743 auto ts = *type_system_or_err;
1744 auto *clang_type_system =
1745 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1746 if (!clang_type_system)
1749 return clang_type_system->GetPDBParser();
1756 auto type_system_or_err =
1758 if (
auto err = type_system_or_err.takeError()) {
1760 "Unable to find namespace {1}: {0}", name.
AsCString());
1763 auto ts = *type_system_or_err;
1764 auto *clang_type_system =
1765 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1766 if (!clang_type_system)
1773 clang::DeclContext *decl_context =
nullptr;
1774 if (parent_decl_ctx)
1775 decl_context =
static_cast<clang::DeclContext *
>(
1778 auto namespace_decl =
1780 if (!namespace_decl)
1783 return clang_type_system->CreateDeclContext(namespace_decl);
1796 return found_cu->second;
1803 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
1812 std::string path = compiland_up->getSourceFileFullPath();
1819 auto cu_sp = std::make_shared<CompileUnit>(
m_objfile_sp->GetModule(),
nullptr,
1820 path.c_str(),
id, lang, optimized);
1834 uint32_t match_line) {
1843 llvm::DenseMap<uint32_t, uint32_t> index_map;
1845 auto line_table = std::make_unique<LineTable>(&comp_unit);
1848 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
1854 while (
auto file = files->getNext()) {
1856 auto lines =
m_session_up->findLineNumbers(*compiland_up, *file);
1859 int entry_count = lines->getChildCount();
1862 uint32_t prev_length;
1864 uint32_t prev_source_idx;
1866 for (
int i = 0; i < entry_count; ++i) {
1867 auto line = lines->getChildAtIndex(i);
1869 uint64_t lno = line->getLineNumber();
1870 uint64_t addr = line->getVirtualAddress();
1871 uint32_t length = line->getLength();
1872 uint32_t source_id = line->getSourceFileId();
1873 uint32_t col = line->getColumnNumber();
1874 uint32_t source_idx = index_map[source_id];
1878 bool is_gap = (i > 0) && (prev_addr + prev_length < addr);
1883 if (is_gap && ShouldAddLine(match_line, prev_line, prev_length)) {
1884 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1885 prev_line, 0, prev_source_idx,
1886 false,
false,
false,
false,
true);
1888 line_table->InsertSequence(std::move(sequence));
1891 if (ShouldAddLine(match_line, lno, length)) {
1892 bool is_statement = line->isStatement();
1893 bool is_prologue =
false;
1894 bool is_epilogue =
false;
1896 m_session_up->findSymbolByAddress(addr, PDB_SymType::Function);
1898 auto prologue = func->findOneChild<PDBSymbolFuncDebugStart>();
1900 is_prologue = (addr == prologue->getVirtualAddress());
1902 auto epilogue = func->findOneChild<PDBSymbolFuncDebugEnd>();
1904 is_epilogue = (addr == epilogue->getVirtualAddress());
1907 line_table->AppendLineEntryToSequence(sequence, addr, lno, col,
1908 source_idx, is_statement,
false,
1909 is_prologue, is_epilogue,
false);
1913 prev_length = length;
1915 prev_source_idx = source_idx;
1918 if (entry_count > 0 && ShouldAddLine(match_line, prev_line, prev_length)) {
1920 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1921 prev_line, 0, prev_source_idx,
1922 false,
false,
false,
false,
true);
1925 line_table->InsertSequence(std::move(sequence));
1928 if (line_table->GetSize()) {
1936 const PDBSymbolCompiland &compiland,
1937 llvm::DenseMap<uint32_t, uint32_t> &index_map)
const {
1943 auto source_files =
m_session_up->getSourceFilesForCompiland(compiland);
1948 while (
auto file = source_files->getNext()) {
1949 uint32_t source_id = file->getUniqueId();
1950 index_map[source_id] = index++;
1962 m_session_up->findLineNumbersByAddress(file_vm_addr, 1)) {
1963 if (
auto first_line = lines->getNext())
1968 if (
auto sec_contribs =
m_session_up->getSectionContribs()) {
1969 while (
auto section = sec_contribs->getNext()) {
1970 auto va = section->getVirtualAddress();
1971 if (file_vm_addr >= va && file_vm_addr < va + section->getLength())
1981 auto func_name = pdb_func.getName();
1982 auto func_undecorated_name = pdb_func.getUndecoratedName();
1983 std::string func_decorated_name;
1988 if (!func_undecorated_name.empty()) {
1990 PDB_SymType::PublicSymbol, func_undecorated_name,
1991 PDB_NameSearchFlags::NS_UndecoratedName);
1993 while (
auto symbol_up = result_up->getNext()) {
1996 if (
auto *pdb_public_sym =
1997 llvm::dyn_cast_or_null<PDBSymbolPublicSymbol>(
1999 if (pdb_public_sym->isFunction()) {
2000 func_decorated_name = pdb_public_sym->getName();
2007 if (!func_decorated_name.empty()) {
2029 if (!func_undecorated_name.empty() &&
2032 }
else if (!func_undecorated_name.empty()) {
2034 }
else if (!func_name.empty())
2046 if (!decl_ctx_type_system)
2050 if (
auto err = type_system_or_err.takeError()) {
2053 "Unable to determine if DeclContext matches this symbol file: {0}");
2057 if (decl_ctx_type_system == type_system_or_err->get())
2064 static const auto pred_upper = [](uint32_t lhs,
SecContribInfo rhs) {
2065 return lhs < rhs.Offset;
2070 if (
auto SecContribs =
m_session_up->getSectionContribs()) {
2071 while (
auto SectionContrib = SecContribs->getNext()) {
2072 auto comp_id = SectionContrib->getCompilandId();
2076 auto sec = SectionContrib->getAddressSection();
2079 auto offset = SectionContrib->getAddressOffset();
2080 auto it = llvm::upper_bound(sec_cs, offset, pred_upper);
2082 auto size = SectionContrib->getLength();
2083 sec_cs.insert(it, {offset, size, comp_id});
2089 if (
auto Lines = data.getLineNumbers()) {
2090 if (
auto FirstLine = Lines->getNext())
2091 return FirstLine->getCompilandId();
2095 uint32_t DataSection = data.getAddressSection();
2096 uint32_t DataOffset = data.getAddressOffset();
2097 if (DataSection == 0) {
2098 if (
auto RVA = data.getRelativeVirtualAddress())
2099 m_session_up->addressForRVA(RVA, DataSection, DataOffset);
2105 auto it = llvm::upper_bound(sec_cs, DataOffset, pred_upper);
2106 if (it != sec_cs.begin()) {
2108 if (DataOffset < it->Offset + it->Size)
2109 return it->CompilandId;
2113 auto LexParentId = data.getLexicalParentId();
2114 while (
auto LexParent =
m_session_up->getSymbolById(LexParentId)) {
2115 if (LexParent->getSymTag() == PDB_SymType::Exe)
2117 if (LexParent->getSymTag() == PDB_SymType::Compiland)
2119 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.
static void ReportWarning(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr)
Report warning events.
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.