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:
314 uint32_t compile_unit_count = compilands->getChildCount();
319 auto last_compiland_up = compilands->getChildAtIndex(compile_unit_count - 1);
321 std::string name = last_compiland_up->getName();
322 if (name ==
"* Linker *")
323 --compile_unit_count;
324 return compile_unit_count;
328 const llvm::pdb::PDBSymbolCompiland &pdb_compiland, uint32_t &index) {
332 auto uid = pdb_compiland.getSymIndexId();
334 auto compiland_up = results_up->getChildAtIndex(cu_idx);
337 if (compiland_up->getSymIndexId() == uid) {
345std::unique_ptr<llvm::pdb::PDBSymbolCompiland>
347 return m_session_up->getConcreteSymbolById<PDBSymbolCompiland>(uid);
360 auto compiland_up = results->getChildAtIndex(index);
371 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
383 auto file_vm_addr = pdb_func.getVirtualAddress();
387 auto func_length = pdb_func.getLength();
388 Address func_addr(file_vm_addr,
397 user_id_t func_type_uid = pdb_func.getSignatureId();
401 FunctionSP func_sp = std::make_shared<Function>(
402 &comp_unit, pdb_func.getSymIndexId(), func_type_uid, mangled, func_type,
403 func_addr,
AddressRanges{AddressRange(func_addr, func_length)});
409 if (
auto err = type_system_or_err.takeError()) {
411 "Unable to parse PDBFunc: {0}");
415 auto ts = *type_system_or_err;
417 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
418 if (!clang_type_system)
422 return func_sp.get();
427 size_t func_added = 0;
431 auto results_up = compiland_up->findAllChildren<PDBSymbolFunc>();
434 while (
auto pdb_func_up = results_up->getNext()) {
468 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
469 if (!files || files->getChildCount() == 0)
472 while (
auto file = files->getNext()) {
473 FileSpec spec(file->getFileName(), FileSpec::Style::windows);
482 std::vector<SourceModule> &imported_modules) {
488 uint64_t func_file_vm_addr,
const llvm::pdb::PDBSymbol *pdb_symbol,
490 assert(pdb_symbol && parent_block);
492 size_t num_added = 0;
494 if (!is_top_parent) {
496 if (pdb_symbol->getSymTag() != PDB_SymType::Block)
499 auto &raw_sym = pdb_symbol->getRawSymbol();
500 assert(llvm::isa<PDBSymbolBlock>(pdb_symbol));
501 auto uid = pdb_symbol->getSymIndexId();
504 if (raw_sym.getVirtualAddress() < func_file_vm_addr)
507 Block *block = parent_block->
CreateChild(pdb_symbol->getSymIndexId()).get();
509 raw_sym.getVirtualAddress() - func_file_vm_addr, raw_sym.getLength()));
512 auto results_up = pdb_symbol->findAllChildren();
516 while (
auto symbol_up = results_up->getNext()) {
518 func_file_vm_addr, symbol_up.get(), parent_block,
false);
525 size_t num_added = 0;
526 auto uid = func.
GetID();
527 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
532 pdb_func_up->getVirtualAddress(), pdb_func_up.get(), &parent_block,
true);
539 size_t num_added = 0;
544 auto ParseTypesByTagFn = [&num_added,
this](
const PDBSymbol &raw_sym) {
545 std::unique_ptr<IPDBEnumSymbols> results;
546 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
548 for (
auto tag : tags_to_search) {
549 results = raw_sym.findAllChildren(tag);
550 if (!results || results->getChildCount() == 0)
552 while (
auto symbol = results->getNext()) {
553 switch (symbol->getSymTag()) {
554 case PDB_SymType::Enum:
555 case PDB_SymType::UDT:
556 case PDB_SymType::Typedef:
568 type->GetFullCompilerType();
575 ParseTypesByTagFn(*compiland);
580 static bool parse_all_global_types =
false;
581 if (!parse_all_global_types) {
583 parse_all_global_types =
true;
594 size_t num_added = 0;
596 auto pdb_func =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(
612 if (results && results->getChildCount()) {
613 while (
auto result = results->getNext()) {
640 auto find_result =
m_types.find(type_uid);
641 if (find_result !=
m_types.end())
642 return find_result->second.get();
644 auto type_system_or_err =
646 if (
auto err = type_system_or_err.takeError()) {
648 "Unable to ResolveTypeUID: {0}");
652 auto ts = *type_system_or_err;
654 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
655 if (!clang_type_system)
662 if (pdb_type ==
nullptr)
667 m_types.insert(std::make_pair(type_uid, result));
678 std::lock_guard<std::recursive_mutex> guard(
681 auto type_system_or_err =
683 if (
auto err = type_system_or_err.takeError()) {
685 "Unable to get dynamic array info for UID: {0}");
688 auto ts = *type_system_or_err;
690 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
699 return pdb->CompleteTypeFromPDB(compiler_type);
703 auto type_system_or_err =
705 if (
auto err = type_system_or_err.takeError()) {
707 "Unable to get decl for UID: {0}");
710 auto ts = *type_system_or_err;
712 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
724 auto decl =
pdb->GetDeclForSymbol(*symbol);
733 auto type_system_or_err =
735 if (
auto err = type_system_or_err.takeError()) {
737 "Unable to get DeclContext for UID: {0}");
741 auto ts = *type_system_or_err;
743 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
755 auto decl_context =
pdb->GetDeclContextForSymbol(*symbol);
764 auto type_system_or_err =
766 if (
auto err = type_system_or_err.takeError()) {
768 "Unable to get DeclContext containing UID: {0}");
772 auto ts = *type_system_or_err;
774 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
786 auto decl_context =
pdb->GetDeclContextContainingSymbol(*symbol);
787 assert(decl_context);
794 auto type_system_or_err =
796 if (
auto err = type_system_or_err.takeError()) {
798 "Unable to parse decls for context: {0}");
802 auto ts = *type_system_or_err;
804 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
812 pdb->ParseDeclsForDeclContext(
818 SymbolContextItem resolve_scope,
821 uint32_t resolved_flags = 0;
822 if (resolve_scope & eSymbolContextCompUnit ||
823 resolve_scope & eSymbolContextVariable ||
824 resolve_scope & eSymbolContextFunction ||
825 resolve_scope & eSymbolContextBlock ||
826 resolve_scope & eSymbolContextLineEntry) {
829 if (resolved_flags & eSymbolContextVariable) {
835 resolved_flags |= eSymbolContextCompUnit;
839 if (resolve_scope & eSymbolContextFunction ||
840 resolve_scope & eSymbolContextBlock) {
843 m_session_up->findSymbolByAddress(file_vm_addr, PDB_SymType::Function);
845 auto *pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
847 auto func_uid = pdb_func->getSymIndexId();
853 resolved_flags |= eSymbolContextFunction;
854 if (resolve_scope & eSymbolContextBlock) {
856 file_vm_addr, PDB_SymType::Block);
857 auto block_id = block_symbol ? block_symbol->getSymIndexId()
861 resolved_flags |= eSymbolContextBlock;
867 if (resolve_scope & eSymbolContextLineEntry) {
869 Address addr(so_addr);
870 if (line_table->FindLineEntryByAddress(addr, sc.
line_entry))
871 resolved_flags |= eSymbolContextLineEntry;
875 return resolved_flags;
882 const size_t old_size = sc_list.
GetSize();
883 const FileSpec &file_spec = src_location_spec.
GetFileSpec();
884 const uint32_t line = src_location_spec.
GetLine().value_or(0);
885 if (resolve_scope & lldb::eSymbolContextCompUnit) {
890 auto compilands =
m_session_up->findCompilandsForSourceFile(
891 file_spec.
GetPath(), PDB_NameSearchFlags::NS_CaseInsensitive);
898 while (
auto compiland = compilands->getNext()) {
904 std::string source_file = compiland->getSourceFileFullPath();
905 if (source_file.empty())
907 FileSpec this_spec(source_file, FileSpec::Style::windows);
909 if (FileSpec::Compare(file_spec, this_spec, need_full_match) != 0)
922 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock |
923 eSymbolContextLineEntry)) {
926 if ((resolve_scope & eSymbolContextLineEntry) && !has_line_table) {
930 assert(line &&
"Couldn't get all line entries!\n");
936 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) {
943 uint32_t num_line_entries = line_table->GetSize();
949 for (uint32_t line_idx = 0; line && line_idx < num_line_entries;
951 if (!line_table->GetLineEntryAtIndex(line_idx, sc.
line_entry))
960 file_vm_addr, PDB_SymType::Function);
962 auto func_uid = symbol_up->getSymIndexId();
965 auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
970 if (sc.
function && (resolve_scope & eSymbolContextBlock)) {
977 }
else if (has_line_table) {
989 return sc_list.
GetSize() - old_size;
997 while (
auto symbol_up = result_up->getNext())
998 if (
auto addr = symbol_up->getRawSymbol().getVirtualAddress())
1007 const llvm::pdb::PDBSymbolData &pdb_data) {
1009 uint32_t var_uid = pdb_data.getSymIndexId();
1012 return result->second;
1015 bool is_static_member =
false;
1016 bool is_external =
false;
1017 bool is_artificial =
false;
1019 switch (pdb_data.getDataKind()) {
1020 case PDB_DataKind::Global:
1024 case PDB_DataKind::Local:
1027 case PDB_DataKind::FileStatic:
1030 case PDB_DataKind::StaticMember:
1031 is_static_member =
true;
1034 case PDB_DataKind::Member:
1037 case PDB_DataKind::Param:
1040 case PDB_DataKind::Constant:
1047 switch (pdb_data.getLocationType()) {
1048 case PDB_LocType::TLS:
1051 case PDB_LocType::RegRel: {
1053 if (pdb_data.getDataKind() == PDB_DataKind::ObjectPtr) {
1055 is_artificial =
true;
1063 if (!is_artificial && !pdb_data.isCompilerGenerated()) {
1064 if (
auto lines = pdb_data.getLineNumbers()) {
1065 if (
auto first_line = lines->getNext()) {
1066 uint32_t src_file_id = first_line->getSourceFileId();
1067 auto src_file =
m_session_up->getSourceFileById(src_file_id);
1069 FileSpec spec(src_file->getFileName());
1071 decl.
SetColumn(first_line->getColumnNumber());
1072 decl.
SetLine(first_line->getLineNumber());
1084 function_block.
FindBlockByID(pdb_data.getLexicalParentId());
1086 block = &function_block;
1088 context_scope = block;
1090 for (
size_t i = 0, num_ranges = block->
GetNumRanges(); i < num_ranges;
1103 std::make_shared<SymbolFileType>(*
this, pdb_data.getTypeId());
1105 auto var_name = pdb_data.getName();
1107 auto mangled_cstr = mangled.empty() ? nullptr : mangled.c_str();
1113 module_sp, pdb_data, ranges, is_constant),
1116 var_sp = std::make_shared<Variable>(
1117 var_uid, var_name.c_str(), mangled_cstr, type_sp, scope, context_scope,
1118 ranges, &decl, location, is_external, is_artificial, is_constant,
1121 m_variables.insert(std::make_pair(var_uid, var_sp));
1127 const llvm::pdb::PDBSymbol &pdb_symbol,
1129 size_t num_added = 0;
1131 if (
auto pdb_data = llvm::dyn_cast<PDBSymbolData>(&pdb_symbol)) {
1134 auto result =
m_variables.find(pdb_data->getSymIndexId());
1140 if (
auto lexical_parent = pdb_data->getLexicalParent()) {
1141 switch (lexical_parent->getSymTag()) {
1142 case PDB_SymType::Exe:
1145 case PDB_SymType::Compiland: {
1148 if (!local_variable_list_sp) {
1149 local_variable_list_sp = std::make_shared<VariableList>();
1154 case PDB_SymType::Block:
1155 case PDB_SymType::Function: {
1158 lexical_parent->getSymIndexId());
1161 if (!local_variable_list_sp) {
1162 local_variable_list_sp = std::make_shared<VariableList>();
1173 if (local_variable_list_sp) {
1175 local_variable_list_sp->AddVariableIfUnique(var_sp);
1187 if (
auto results = pdb_symbol.findAllChildren()) {
1188 while (
auto result = results->getNext())
1208 uint32_t matches = 0;
1209 size_t old_size = variables.
GetSize();
1210 while (
auto result = results->getNext()) {
1211 auto pdb_data = llvm::dyn_cast<PDBSymbolData>(result.get());
1212 if (max_matches > 0 && matches >= max_matches)
1228 if (parent_decl_ctx.
IsValid() &&
1233 matches = variables.
GetSize() - old_size;
1247 uint32_t matches = 0;
1248 size_t old_size = variables.
GetSize();
1249 while (
auto pdb_data = results->getNext()) {
1250 if (max_matches > 0 && matches >= max_matches)
1253 auto var_name = pdb_data->getName();
1254 if (var_name.empty())
1268 matches = variables.
GetSize() - old_size;
1273 bool include_inlines,
1290 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
1291 if (!pdb_func_up && !(include_inlines && pdb_func_up->hasInlineAttribute()))
1300 std::map<uint64_t, uint32_t> addr_ids;
1303 while (
auto pdb_func_up = results_up->getNext()) {
1304 if (pdb_func_up->isCompilerGenerated())
1307 auto name = pdb_func_up->getName();
1308 auto demangled_name = pdb_func_up->getUndecoratedName();
1309 if (name.empty() && demangled_name.empty())
1312 auto uid = pdb_func_up->getSymIndexId();
1313 if (!demangled_name.empty() && pdb_func_up->getVirtualAddress())
1314 addr_ids.insert(std::make_pair(pdb_func_up->getVirtualAddress(), uid));
1316 if (
auto parent = pdb_func_up->getClassParent()) {
1327 if (!basename.empty())
1333 if (!demangled_name.empty())
1341 if (!basename.empty())
1346 if (name ==
"main") {
1349 if (!demangled_name.empty() && name != demangled_name) {
1353 }
else if (!demangled_name.empty()) {
1362 if (
auto results_up =
1364 while (
auto pub_sym_up = results_up->getNext()) {
1365 if (!pub_sym_up->isFunction())
1367 auto name = pub_sym_up->getName();
1373 if (
auto vm_addr = pub_sym_up->getVirtualAddress()) {
1374 if (
auto it = addr_ids.find(vm_addr); it != addr_ids.end())
1393 bool include_inlines,
1398 lldbassert((name_type_mask & eFunctionNameTypeAuto) == 0);
1400 if (name_type_mask & eFunctionNameTypeFull)
1403 if (name_type_mask == eFunctionNameTypeNone)
1410 if (name_type_mask & eFunctionNameTypeFull ||
1411 name_type_mask & eFunctionNameTypeBase ||
1412 name_type_mask & eFunctionNameTypeMethod) {
1415 std::set<uint32_t> resolved_ids;
1416 auto ResolveFn = [
this, &name, parent_decl_ctx, include_inlines, &sc_list,
1418 std::vector<uint32_t> ids;
1419 if (!Names.GetValues(name, ids))
1422 for (uint32_t
id : ids) {
1423 if (resolved_ids.find(
id) != resolved_ids.end())
1426 if (parent_decl_ctx.IsValid() &&
1431 resolved_ids.insert(
id);
1434 if (name_type_mask & eFunctionNameTypeFull) {
1439 if (name_type_mask & eFunctionNameTypeBase)
1441 if (name_type_mask & eFunctionNameTypeMethod)
1447 bool include_inlines,
1455 std::set<uint32_t> resolved_ids;
1456 auto ResolveFn = [®ex, include_inlines, &sc_list, &resolved_ids,
1458 std::vector<uint32_t> ids;
1459 if (Names.GetValues(regex, ids)) {
1460 for (
auto id : ids) {
1461 if (resolved_ids.find(
id) == resolved_ids.end())
1463 resolved_ids.insert(
id);
1472 const std::string &scope_qualified_name,
1473 std::vector<lldb_private::ConstString> &mangled_names) {}
1476 std::set<lldb::addr_t> sym_addresses;
1485 m_objfile_sp->GetModule()->GetObjectFile()->GetSectionList();
1489 while (
auto pub_symbol = results->getNext()) {
1490 auto section_id = pub_symbol->getAddressSection();
1492 auto section = section_list->FindSectionByID(section_id);
1496 auto offset = pub_symbol->getAddressOffset();
1498 auto file_addr = section->GetFileAddress() + offset;
1499 if (sym_addresses.find(file_addr) != sym_addresses.end())
1501 sym_addresses.insert(file_addr);
1503 auto size = pub_symbol->getLength();
1505 Symbol(pub_symbol->getSymIndexId(),
1506 pub_symbol->getName().c_str(),
1526 auto type_system_or_err =
1528 if (
auto err = type_system_or_err.takeError()) {
1530 "Unable to dump ClangAST: {0}");
1534 auto ts = *type_system_or_err;
1536 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1537 if (!clang_type_system)
1551 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
1553 std::unique_ptr<IPDBEnumSymbols> results;
1555 uint32_t matches = 0;
1557 for (
auto tag : tags_to_search) {
1562 while (
auto result = results->getNext()) {
1563 if (max_matches > 0 && matches >= max_matches)
1566 std::string type_name;
1567 if (
auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(result.get()))
1568 type_name = enum_type->getName();
1569 else if (
auto typedef_type =
1570 llvm::dyn_cast<PDBSymbolTypeTypedef>(result.get()))
1571 type_name = typedef_type->getName();
1572 else if (
auto class_type = llvm::dyn_cast<PDBSymbolTypeUDT>(result.get()))
1573 type_name = class_type->getName();
1580 if (!regex.
Execute(type_name))
1588 auto iter =
m_types.find(result->getSymIndexId());
1591 types.
Insert(iter->second);
1606 std::unique_ptr<IPDBEnumSymbols> results;
1608 if (basename.empty())
1614 while (
auto result = results->getNext()) {
1616 switch (result->getSymTag()) {
1617 case PDB_SymType::Enum:
1618 case PDB_SymType::UDT:
1619 case PDB_SymType::Typedef:
1628 result->getRawSymbol().getName()) != basename)
1636 auto iter =
m_types.find(result->getSymIndexId());
1640 ConstString name = iter->second->GetQualifiedName();
1644 if (type_results.
Done(query))
1653 bool can_parse =
false;
1654 switch (pdb_symbol.getSymTag()) {
1655 case PDB_SymType::ArrayType:
1656 can_parse = ((type_mask & eTypeClassArray) != 0);
1658 case PDB_SymType::BuiltinType:
1659 can_parse = ((type_mask & eTypeClassBuiltin) != 0);
1661 case PDB_SymType::Enum:
1662 can_parse = ((type_mask & eTypeClassEnumeration) != 0);
1664 case PDB_SymType::Function:
1665 case PDB_SymType::FunctionSig:
1666 can_parse = ((type_mask & eTypeClassFunction) != 0);
1668 case PDB_SymType::PointerType:
1669 can_parse = ((type_mask & (eTypeClassPointer | eTypeClassBlockPointer |
1670 eTypeClassMemberPointer)) != 0);
1672 case PDB_SymType::Typedef:
1673 can_parse = ((type_mask & eTypeClassTypedef) != 0);
1675 case PDB_SymType::UDT: {
1676 auto *udt = llvm::dyn_cast<PDBSymbolTypeUDT>(&pdb_symbol);
1678 can_parse = (udt->getUdtKind() != PDB_UdtType::Interface &&
1679 ((type_mask & (eTypeClassClass | eTypeClassStruct |
1680 eTypeClassUnion)) != 0));
1688 if (!llvm::is_contained(type_collection, type))
1689 type_collection.push_back(type);
1693 auto results_up = pdb_symbol.findAllChildren();
1694 while (
auto symbol_up = results_up->getNext())
1699 TypeClass type_mask,
1720 for (
auto type : type_collection) {
1721 type->GetForwardCompilerType();
1722 type_list.
Insert(type->shared_from_this());
1726llvm::Expected<lldb::TypeSystemSP>
1728 auto type_system_or_err =
1729 m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
1730 if (type_system_or_err) {
1731 if (
auto ts = *type_system_or_err)
1732 ts->SetSymbolFile(
this);
1734 return type_system_or_err;
1738 auto type_system_or_err =
1740 if (
auto err = type_system_or_err.takeError()) {
1742 "Unable to get PDB AST parser: {0}");
1746 auto ts = *type_system_or_err;
1747 auto *clang_type_system =
1748 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1749 if (!clang_type_system)
1752 return clang_type_system->GetPDBParser();
1759 auto type_system_or_err =
1761 if (
auto err = type_system_or_err.takeError()) {
1763 "Unable to find namespace {1}: {0}", name.
AsCString());
1766 auto ts = *type_system_or_err;
1767 auto *clang_type_system =
1768 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1769 if (!clang_type_system)
1776 clang::DeclContext *decl_context =
nullptr;
1777 if (parent_decl_ctx)
1778 decl_context =
static_cast<clang::DeclContext *
>(
1781 auto namespace_decl =
1783 if (!namespace_decl)
1786 return clang_type_system->CreateDeclContext(namespace_decl);
1799 return found_cu->second;
1806 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
1815 std::string path = compiland_up->getSourceFileFullPath();
1822 auto cu_sp = std::make_shared<CompileUnit>(
m_objfile_sp->GetModule(),
nullptr,
1823 path.c_str(),
id, lang, optimized);
1837 uint32_t match_line) {
1846 llvm::DenseMap<uint32_t, uint32_t> index_map;
1848 auto line_table = std::make_unique<LineTable>(&comp_unit);
1851 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
1857 while (
auto file = files->getNext()) {
1859 auto lines =
m_session_up->findLineNumbers(*compiland_up, *file);
1862 int entry_count = lines->getChildCount();
1865 uint32_t prev_length;
1867 uint32_t prev_source_idx;
1869 for (
int i = 0; i < entry_count; ++i) {
1870 auto line = lines->getChildAtIndex(i);
1872 uint64_t lno = line->getLineNumber();
1873 uint64_t addr = line->getVirtualAddress();
1874 uint32_t length = line->getLength();
1875 uint32_t source_id = line->getSourceFileId();
1876 uint32_t col = line->getColumnNumber();
1877 uint32_t source_idx = index_map[source_id];
1881 bool is_gap = (i > 0) && (prev_addr + prev_length < addr);
1886 if (is_gap && ShouldAddLine(match_line, prev_line, prev_length)) {
1887 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1888 prev_line, 0, prev_source_idx,
1889 false,
false,
false,
false,
true);
1891 line_table->InsertSequence(std::move(sequence));
1894 if (ShouldAddLine(match_line, lno, length)) {
1895 bool is_statement = line->isStatement();
1896 bool is_prologue =
false;
1897 bool is_epilogue =
false;
1899 m_session_up->findSymbolByAddress(addr, PDB_SymType::Function);
1901 auto prologue = func->findOneChild<PDBSymbolFuncDebugStart>();
1903 is_prologue = (addr == prologue->getVirtualAddress());
1905 auto epilogue = func->findOneChild<PDBSymbolFuncDebugEnd>();
1907 is_epilogue = (addr == epilogue->getVirtualAddress());
1910 line_table->AppendLineEntryToSequence(sequence, addr, lno, col,
1911 source_idx, is_statement,
false,
1912 is_prologue, is_epilogue,
false);
1916 prev_length = length;
1918 prev_source_idx = source_idx;
1921 if (entry_count > 0 && ShouldAddLine(match_line, prev_line, prev_length)) {
1923 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1924 prev_line, 0, prev_source_idx,
1925 false,
false,
false,
false,
true);
1928 line_table->InsertSequence(std::move(sequence));
1931 if (line_table->GetSize()) {
1939 const PDBSymbolCompiland &compiland,
1940 llvm::DenseMap<uint32_t, uint32_t> &index_map)
const {
1946 auto source_files =
m_session_up->getSourceFilesForCompiland(compiland);
1951 while (
auto file = source_files->getNext()) {
1952 uint32_t source_id = file->getUniqueId();
1953 index_map[source_id] = index++;
1965 m_session_up->findLineNumbersByAddress(file_vm_addr, 1)) {
1966 if (
auto first_line = lines->getNext())
1971 if (
auto sec_contribs =
m_session_up->getSectionContribs()) {
1972 while (
auto section = sec_contribs->getNext()) {
1973 auto va = section->getVirtualAddress();
1974 if (file_vm_addr >= va && file_vm_addr < va + section->getLength())
1984 auto func_name = pdb_func.getName();
1985 auto func_undecorated_name = pdb_func.getUndecoratedName();
1986 std::string func_decorated_name;
1991 if (!func_undecorated_name.empty()) {
1993 PDB_SymType::PublicSymbol, func_undecorated_name,
1994 PDB_NameSearchFlags::NS_UndecoratedName);
1996 while (
auto symbol_up = result_up->getNext()) {
1999 if (
auto *pdb_public_sym =
2000 llvm::dyn_cast_or_null<PDBSymbolPublicSymbol>(
2002 if (pdb_public_sym->isFunction()) {
2003 func_decorated_name = pdb_public_sym->getName();
2010 if (!func_decorated_name.empty()) {
2032 if (!func_undecorated_name.empty() &&
2035 }
else if (!func_undecorated_name.empty()) {
2037 }
else if (!func_name.empty())
2049 if (!decl_ctx_type_system)
2053 if (
auto err = type_system_or_err.takeError()) {
2056 "Unable to determine if DeclContext matches this symbol file: {0}");
2060 if (decl_ctx_type_system == type_system_or_err->get())
2067 static const auto pred_upper = [](uint32_t lhs,
SecContribInfo rhs) {
2068 return lhs < rhs.Offset;
2073 if (
auto SecContribs =
m_session_up->getSectionContribs()) {
2074 while (
auto SectionContrib = SecContribs->getNext()) {
2075 auto comp_id = SectionContrib->getCompilandId();
2079 auto sec = SectionContrib->getAddressSection();
2082 auto offset = SectionContrib->getAddressOffset();
2083 auto it = llvm::upper_bound(sec_cs, offset, pred_upper);
2085 auto size = SectionContrib->getLength();
2086 sec_cs.insert(it, {offset, size, comp_id});
2092 if (
auto Lines = data.getLineNumbers()) {
2093 if (
auto FirstLine = Lines->getNext())
2094 return FirstLine->getCompilandId();
2098 uint32_t DataSection = data.getAddressSection();
2099 uint32_t DataOffset = data.getAddressOffset();
2100 if (DataSection == 0) {
2101 if (
auto RVA = data.getRelativeVirtualAddress())
2102 m_session_up->addressForRVA(RVA, DataSection, DataOffset);
2108 auto it = llvm::upper_bound(sec_cs, DataOffset, pred_upper);
2109 if (it != sec_cs.begin()) {
2111 if (DataOffset < it->Offset + it->Size)
2112 return it->CompilandId;
2116 auto LexParentId = data.getLexicalParentId();
2117 while (
auto LexParent =
m_session_up->getSymbolById(LexParentId)) {
2118 if (LexParent->getSymTag() == PDB_SymType::Exe)
2120 if (LexParent->getSymTag() == PDB_SymType::Compiland)
2122 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.