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 DIA 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#if !LLVM_ENABLE_DIA_SDK || !defined(_WIN32)
114 if (env_value.empty())
118 return env_value.equals_insensitive(
"on") ||
119 env_value.equals_insensitive(
"yes") ||
120 env_value.equals_insensitive(
"1") ||
121 env_value.equals_insensitive(
"true");
126 static llvm::StringRef GetSettingName() {
131 m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
132 m_collection_sp->Initialize(g_symbolfilepdb_properties);
135 bool UseNativeReader()
const {
136#if LLVM_ENABLE_DIA_SDK && defined(_WIN32)
137 return IsNativeReaderRequested();
139 if (!IsNativeReaderRequested()) {
140 static std::once_flag g_warning_shown;
142 "the DIA PDB reader was explicitly requested, but LLDB was built "
143 "without the DIA SDK. The native reader will be used instead",
144 {}, &g_warning_shown);
151 bool IsNativeReaderRequested()
const {
153 GetPropertyAtIndexAs<PDBReader>(ePropertyReader, ePDBReaderDefault);
155 case ePDBReaderNative:
160 return g_should_use_native_reader_by_default;
166 static PluginProperties g_settings;
176 case PDB_Lang::Swift:
182 case PDB_Lang::ObjCpp:
189bool ShouldAddLine(uint32_t requested_line, uint32_t actual_line,
190 uint32_t addr_length) {
191 return ((requested_line == 0 || actual_line == requested_line) &&
217 debugger, PluginProperties::GetSettingName())) {
220 "Properties for the PDB symbol-file plug-in.",
true);
225 return "Microsoft PDB debug symbol file reader.";
242 uint32_t abilities = 0;
248 std::string exePath =
m_objfile_sp->GetFileSpec().GetPath();
249 auto error = loadDataForEXE(PDB_ReaderType::DIA, llvm::StringRef(exePath),
252 llvm::consumeError(std::move(
error));
257 FileSpec symfile = module_sp->GetSymbolFileFileSpec();
260 error = loadDataForPDB(PDB_ReaderType::DIA,
263 llvm::consumeError(std::move(
error));
274 while (
auto table_up = enum_tables_up->getNext()) {
275 if (table_up->getItemCount() == 0)
277 auto type = table_up->getTableType();
279 case PDB_TableType::Symbols:
285 case PDB_TableType::LineNumbers:
318 uint32_t compile_unit_count = compilands->getChildCount();
323 auto last_compiland_up = compilands->getChildAtIndex(compile_unit_count - 1);
325 std::string name = last_compiland_up->getName();
326 if (name ==
"* Linker *")
327 --compile_unit_count;
328 return compile_unit_count;
332 const llvm::pdb::PDBSymbolCompiland &pdb_compiland, uint32_t &index) {
336 auto uid = pdb_compiland.getSymIndexId();
338 auto compiland_up = results_up->getChildAtIndex(cu_idx);
341 if (compiland_up->getSymIndexId() == uid) {
349std::unique_ptr<llvm::pdb::PDBSymbolCompiland>
351 return m_session_up->getConcreteSymbolById<PDBSymbolCompiland>(uid);
364 auto compiland_up = results->getChildAtIndex(index);
375 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
387 auto file_vm_addr = pdb_func.getVirtualAddress();
391 auto func_length = pdb_func.getLength();
392 Address func_addr(file_vm_addr,
401 user_id_t func_type_uid = pdb_func.getSignatureId();
405 FunctionSP func_sp = std::make_shared<Function>(
406 &comp_unit, pdb_func.getSymIndexId(), func_type_uid, mangled, func_type,
407 func_addr,
AddressRanges{AddressRange(func_addr, func_length)});
413 if (
auto err = type_system_or_err.takeError()) {
415 "Unable to parse PDBFunc: {0}");
419 auto ts = *type_system_or_err;
421 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
422 if (!clang_type_system)
426 return func_sp.get();
431 size_t func_added = 0;
435 auto results_up = compiland_up->findAllChildren<PDBSymbolFunc>();
438 while (
auto pdb_func_up = results_up->getNext()) {
472 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
473 if (!files || files->getChildCount() == 0)
476 while (
auto file = files->getNext()) {
477 FileSpec spec(file->getFileName(), FileSpec::Style::windows);
486 std::vector<SourceModule> &imported_modules) {
492 uint64_t func_file_vm_addr,
const llvm::pdb::PDBSymbol *pdb_symbol,
494 assert(pdb_symbol && parent_block);
496 size_t num_added = 0;
498 if (!is_top_parent) {
500 if (pdb_symbol->getSymTag() != PDB_SymType::Block)
503 auto &raw_sym = pdb_symbol->getRawSymbol();
504 assert(llvm::isa<PDBSymbolBlock>(pdb_symbol));
505 auto uid = pdb_symbol->getSymIndexId();
508 if (raw_sym.getVirtualAddress() < func_file_vm_addr)
511 Block *block = parent_block->
CreateChild(pdb_symbol->getSymIndexId()).get();
513 raw_sym.getVirtualAddress() - func_file_vm_addr, raw_sym.getLength()));
516 auto results_up = pdb_symbol->findAllChildren();
520 while (
auto symbol_up = results_up->getNext()) {
522 func_file_vm_addr, symbol_up.get(), parent_block,
false);
529 size_t num_added = 0;
530 auto uid = func.
GetID();
531 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
536 pdb_func_up->getVirtualAddress(), pdb_func_up.get(), &parent_block,
true);
543 size_t num_added = 0;
548 auto ParseTypesByTagFn = [&num_added,
this](
const PDBSymbol &raw_sym) {
549 std::unique_ptr<IPDBEnumSymbols> results;
550 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
552 for (
auto tag : tags_to_search) {
553 results = raw_sym.findAllChildren(tag);
554 if (!results || results->getChildCount() == 0)
556 while (
auto symbol = results->getNext()) {
557 switch (symbol->getSymTag()) {
558 case PDB_SymType::Enum:
559 case PDB_SymType::UDT:
560 case PDB_SymType::Typedef:
572 type->GetFullCompilerType();
579 ParseTypesByTagFn(*compiland);
584 static bool parse_all_global_types =
false;
585 if (!parse_all_global_types) {
587 parse_all_global_types =
true;
598 size_t num_added = 0;
600 auto pdb_func =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(
616 if (results && results->getChildCount()) {
617 while (
auto result = results->getNext()) {
644 auto find_result =
m_types.find(type_uid);
645 if (find_result !=
m_types.end())
646 return find_result->second.get();
648 auto type_system_or_err =
650 if (
auto err = type_system_or_err.takeError()) {
652 "Unable to ResolveTypeUID: {0}");
656 auto ts = *type_system_or_err;
658 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
659 if (!clang_type_system)
666 if (pdb_type ==
nullptr)
671 m_types.insert(std::make_pair(type_uid, result));
682 std::lock_guard<std::recursive_mutex> guard(
685 auto type_system_or_err =
687 if (
auto err = type_system_or_err.takeError()) {
689 "Unable to get dynamic array info for UID: {0}");
692 auto ts = *type_system_or_err;
694 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
703 return pdb->CompleteTypeFromPDB(compiler_type);
707 auto type_system_or_err =
709 if (
auto err = type_system_or_err.takeError()) {
711 "Unable to get decl for UID: {0}");
714 auto ts = *type_system_or_err;
716 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
728 auto decl =
pdb->GetDeclForSymbol(*symbol);
737 auto type_system_or_err =
739 if (
auto err = type_system_or_err.takeError()) {
741 "Unable to get DeclContext for UID: {0}");
745 auto ts = *type_system_or_err;
747 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
759 auto decl_context =
pdb->GetDeclContextForSymbol(*symbol);
768 auto type_system_or_err =
770 if (
auto err = type_system_or_err.takeError()) {
772 "Unable to get DeclContext containing UID: {0}");
776 auto ts = *type_system_or_err;
778 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
790 auto decl_context =
pdb->GetDeclContextContainingSymbol(*symbol);
791 assert(decl_context);
798 auto type_system_or_err =
800 if (
auto err = type_system_or_err.takeError()) {
802 "Unable to parse decls for context: {0}");
806 auto ts = *type_system_or_err;
808 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
816 pdb->ParseDeclsForDeclContext(
822 SymbolContextItem resolve_scope,
825 uint32_t resolved_flags = 0;
826 if (resolve_scope & eSymbolContextCompUnit ||
827 resolve_scope & eSymbolContextVariable ||
828 resolve_scope & eSymbolContextFunction ||
829 resolve_scope & eSymbolContextBlock ||
830 resolve_scope & eSymbolContextLineEntry) {
833 if (resolved_flags & eSymbolContextVariable) {
839 resolved_flags |= eSymbolContextCompUnit;
843 if (resolve_scope & eSymbolContextFunction ||
844 resolve_scope & eSymbolContextBlock) {
847 m_session_up->findSymbolByAddress(file_vm_addr, PDB_SymType::Function);
849 auto *pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
851 auto func_uid = pdb_func->getSymIndexId();
857 resolved_flags |= eSymbolContextFunction;
858 if (resolve_scope & eSymbolContextBlock) {
860 file_vm_addr, PDB_SymType::Block);
861 auto block_id = block_symbol ? block_symbol->getSymIndexId()
865 resolved_flags |= eSymbolContextBlock;
871 if (resolve_scope & eSymbolContextLineEntry) {
873 Address addr(so_addr);
874 if (line_table->FindLineEntryByAddress(addr, sc.
line_entry))
875 resolved_flags |= eSymbolContextLineEntry;
879 return resolved_flags;
886 const size_t old_size = sc_list.
GetSize();
887 const FileSpec &file_spec = src_location_spec.
GetFileSpec();
888 const uint32_t line = src_location_spec.
GetLine().value_or(0);
889 if (resolve_scope & lldb::eSymbolContextCompUnit) {
894 auto compilands =
m_session_up->findCompilandsForSourceFile(
895 file_spec.
GetPath(), PDB_NameSearchFlags::NS_CaseInsensitive);
902 while (
auto compiland = compilands->getNext()) {
908 std::string source_file = compiland->getSourceFileFullPath();
909 if (source_file.empty())
911 FileSpec this_spec(source_file, FileSpec::Style::windows);
913 if (FileSpec::Compare(file_spec, this_spec, need_full_match) != 0)
926 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock |
927 eSymbolContextLineEntry)) {
930 if ((resolve_scope & eSymbolContextLineEntry) && !has_line_table) {
934 assert(line &&
"Couldn't get all line entries!\n");
940 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) {
947 uint32_t num_line_entries = line_table->GetSize();
953 for (uint32_t line_idx = 0; line && line_idx < num_line_entries;
955 if (!line_table->GetLineEntryAtIndex(line_idx, sc.
line_entry))
964 file_vm_addr, PDB_SymType::Function);
966 auto func_uid = symbol_up->getSymIndexId();
969 auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
974 if (sc.
function && (resolve_scope & eSymbolContextBlock)) {
981 }
else if (has_line_table) {
993 return sc_list.
GetSize() - old_size;
1001 while (
auto symbol_up = result_up->getNext())
1002 if (
auto addr = symbol_up->getRawSymbol().getVirtualAddress())
1011 const llvm::pdb::PDBSymbolData &pdb_data) {
1013 uint32_t var_uid = pdb_data.getSymIndexId();
1016 return result->second;
1019 bool is_static_member =
false;
1020 bool is_external =
false;
1021 bool is_artificial =
false;
1023 switch (pdb_data.getDataKind()) {
1024 case PDB_DataKind::Global:
1028 case PDB_DataKind::Local:
1031 case PDB_DataKind::FileStatic:
1034 case PDB_DataKind::StaticMember:
1035 is_static_member =
true;
1038 case PDB_DataKind::Member:
1041 case PDB_DataKind::Param:
1044 case PDB_DataKind::Constant:
1051 switch (pdb_data.getLocationType()) {
1052 case PDB_LocType::TLS:
1055 case PDB_LocType::RegRel: {
1057 if (pdb_data.getDataKind() == PDB_DataKind::ObjectPtr) {
1059 is_artificial =
true;
1067 if (!is_artificial && !pdb_data.isCompilerGenerated()) {
1068 if (
auto lines = pdb_data.getLineNumbers()) {
1069 if (
auto first_line = lines->getNext()) {
1070 uint32_t src_file_id = first_line->getSourceFileId();
1071 auto src_file =
m_session_up->getSourceFileById(src_file_id);
1073 FileSpec spec(src_file->getFileName());
1075 decl.
SetColumn(first_line->getColumnNumber());
1076 decl.
SetLine(first_line->getLineNumber());
1088 function_block.
FindBlockByID(pdb_data.getLexicalParentId());
1090 block = &function_block;
1092 context_scope = block;
1094 for (
size_t i = 0, num_ranges = block->
GetNumRanges(); i < num_ranges;
1107 std::make_shared<SymbolFileType>(*
this, pdb_data.getTypeId());
1109 auto var_name = pdb_data.getName();
1111 auto mangled_cstr = mangled.empty() ? nullptr : mangled.c_str();
1117 module_sp, pdb_data, ranges, is_constant),
1120 var_sp = std::make_shared<Variable>(
1121 var_uid, var_name.c_str(), mangled_cstr, type_sp, scope, context_scope,
1122 ranges, &decl, location, is_external, is_artificial, is_constant,
1125 m_variables.insert(std::make_pair(var_uid, var_sp));
1131 const llvm::pdb::PDBSymbol &pdb_symbol,
1133 size_t num_added = 0;
1135 if (
auto pdb_data = llvm::dyn_cast<PDBSymbolData>(&pdb_symbol)) {
1138 auto result =
m_variables.find(pdb_data->getSymIndexId());
1144 if (
auto lexical_parent = pdb_data->getLexicalParent()) {
1145 switch (lexical_parent->getSymTag()) {
1146 case PDB_SymType::Exe:
1149 case PDB_SymType::Compiland: {
1152 if (!local_variable_list_sp) {
1153 local_variable_list_sp = std::make_shared<VariableList>();
1158 case PDB_SymType::Block:
1159 case PDB_SymType::Function: {
1162 lexical_parent->getSymIndexId());
1165 if (!local_variable_list_sp) {
1166 local_variable_list_sp = std::make_shared<VariableList>();
1177 if (local_variable_list_sp) {
1179 local_variable_list_sp->AddVariableIfUnique(var_sp);
1191 if (
auto results = pdb_symbol.findAllChildren()) {
1192 while (
auto result = results->getNext())
1212 uint32_t matches = 0;
1213 size_t old_size = variables.
GetSize();
1214 while (
auto result = results->getNext()) {
1215 auto pdb_data = llvm::dyn_cast<PDBSymbolData>(result.get());
1216 if (max_matches > 0 && matches >= max_matches)
1232 if (parent_decl_ctx.
IsValid() &&
1237 matches = variables.
GetSize() - old_size;
1251 uint32_t matches = 0;
1252 size_t old_size = variables.
GetSize();
1253 while (
auto pdb_data = results->getNext()) {
1254 if (max_matches > 0 && matches >= max_matches)
1257 auto var_name = pdb_data->getName();
1258 if (var_name.empty())
1272 matches = variables.
GetSize() - old_size;
1277 bool include_inlines,
1294 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
1295 if (!pdb_func_up && !(include_inlines && pdb_func_up->hasInlineAttribute()))
1304 std::map<uint64_t, uint32_t> addr_ids;
1307 while (
auto pdb_func_up = results_up->getNext()) {
1308 if (pdb_func_up->isCompilerGenerated())
1311 auto name = pdb_func_up->getName();
1312 auto demangled_name = pdb_func_up->getUndecoratedName();
1313 if (name.empty() && demangled_name.empty())
1316 auto uid = pdb_func_up->getSymIndexId();
1317 if (!demangled_name.empty() && pdb_func_up->getVirtualAddress())
1318 addr_ids.insert(std::make_pair(pdb_func_up->getVirtualAddress(), uid));
1320 if (
auto parent = pdb_func_up->getClassParent()) {
1331 if (!basename.empty())
1337 if (!demangled_name.empty())
1345 if (!basename.empty())
1350 if (name ==
"main") {
1353 if (!demangled_name.empty() && name != demangled_name) {
1357 }
else if (!demangled_name.empty()) {
1366 if (
auto results_up =
1368 while (
auto pub_sym_up = results_up->getNext()) {
1369 if (!pub_sym_up->isFunction())
1371 auto name = pub_sym_up->getName();
1377 if (
auto vm_addr = pub_sym_up->getVirtualAddress()) {
1378 if (
auto it = addr_ids.find(vm_addr); it != addr_ids.end())
1397 bool include_inlines,
1402 lldbassert((name_type_mask & eFunctionNameTypeAuto) == 0);
1404 if (name_type_mask & eFunctionNameTypeFull)
1407 if (name_type_mask == eFunctionNameTypeNone)
1414 if (name_type_mask & eFunctionNameTypeFull ||
1415 name_type_mask & eFunctionNameTypeBase ||
1416 name_type_mask & eFunctionNameTypeMethod) {
1419 std::set<uint32_t> resolved_ids;
1420 auto ResolveFn = [
this, &name, parent_decl_ctx, include_inlines, &sc_list,
1422 std::vector<uint32_t> ids;
1423 if (!Names.GetValues(name, ids))
1426 for (uint32_t
id : ids) {
1427 if (resolved_ids.find(
id) != resolved_ids.end())
1430 if (parent_decl_ctx.IsValid() &&
1435 resolved_ids.insert(
id);
1438 if (name_type_mask & eFunctionNameTypeFull) {
1443 if (name_type_mask & eFunctionNameTypeBase)
1445 if (name_type_mask & eFunctionNameTypeMethod)
1451 bool include_inlines,
1459 std::set<uint32_t> resolved_ids;
1460 auto ResolveFn = [®ex, include_inlines, &sc_list, &resolved_ids,
1462 std::vector<uint32_t> ids;
1463 if (Names.GetValues(regex, ids)) {
1464 for (
auto id : ids) {
1465 if (resolved_ids.find(
id) == resolved_ids.end())
1467 resolved_ids.insert(
id);
1476 const std::string &scope_qualified_name,
1477 std::vector<lldb_private::ConstString> &mangled_names) {}
1480 std::set<lldb::addr_t> sym_addresses;
1492 while (
auto pub_symbol = results->getNext()) {
1493 auto section_id = pub_symbol->getAddressSection();
1495 auto section = section_list->FindSectionByID(section_id);
1499 auto offset = pub_symbol->getAddressOffset();
1501 auto file_addr = section->GetFileAddress() + offset;
1502 if (sym_addresses.find(file_addr) != sym_addresses.end())
1504 sym_addresses.insert(file_addr);
1506 auto size = pub_symbol->getLength();
1508 Symbol(pub_symbol->getSymIndexId(),
1509 pub_symbol->getName().c_str(),
1529 auto type_system_or_err =
1531 if (
auto err = type_system_or_err.takeError()) {
1533 "Unable to dump ClangAST: {0}");
1537 auto ts = *type_system_or_err;
1539 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1540 if (!clang_type_system)
1554 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
1556 std::unique_ptr<IPDBEnumSymbols> results;
1558 uint32_t matches = 0;
1560 for (
auto tag : tags_to_search) {
1565 while (
auto result = results->getNext()) {
1566 if (max_matches > 0 && matches >= max_matches)
1569 std::string type_name;
1570 if (
auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(result.get()))
1571 type_name = enum_type->getName();
1572 else if (
auto typedef_type =
1573 llvm::dyn_cast<PDBSymbolTypeTypedef>(result.get()))
1574 type_name = typedef_type->getName();
1575 else if (
auto class_type = llvm::dyn_cast<PDBSymbolTypeUDT>(result.get()))
1576 type_name = class_type->getName();
1583 if (!regex.
Execute(type_name))
1591 auto iter =
m_types.find(result->getSymIndexId());
1594 types.
Insert(iter->second);
1609 std::unique_ptr<IPDBEnumSymbols> results;
1611 if (basename.empty())
1617 while (
auto result = results->getNext()) {
1619 switch (result->getSymTag()) {
1620 case PDB_SymType::Enum:
1621 case PDB_SymType::UDT:
1622 case PDB_SymType::Typedef:
1631 result->getRawSymbol().getName()) != basename)
1639 auto iter =
m_types.find(result->getSymIndexId());
1643 ConstString name = iter->second->GetQualifiedName();
1647 if (type_results.
Done(query))
1656 bool can_parse =
false;
1657 switch (pdb_symbol.getSymTag()) {
1658 case PDB_SymType::ArrayType:
1659 can_parse = ((type_mask & eTypeClassArray) != 0);
1661 case PDB_SymType::BuiltinType:
1662 can_parse = ((type_mask & eTypeClassBuiltin) != 0);
1664 case PDB_SymType::Enum:
1665 can_parse = ((type_mask & eTypeClassEnumeration) != 0);
1667 case PDB_SymType::Function:
1668 case PDB_SymType::FunctionSig:
1669 can_parse = ((type_mask & eTypeClassFunction) != 0);
1671 case PDB_SymType::PointerType:
1672 can_parse = ((type_mask & (eTypeClassPointer | eTypeClassBlockPointer |
1673 eTypeClassMemberPointer)) != 0);
1675 case PDB_SymType::Typedef:
1676 can_parse = ((type_mask & eTypeClassTypedef) != 0);
1678 case PDB_SymType::UDT: {
1679 auto *udt = llvm::dyn_cast<PDBSymbolTypeUDT>(&pdb_symbol);
1681 can_parse = (udt->getUdtKind() != PDB_UdtType::Interface &&
1682 ((type_mask & (eTypeClassClass | eTypeClassStruct |
1683 eTypeClassUnion)) != 0));
1691 if (!llvm::is_contained(type_collection, type))
1692 type_collection.push_back(type);
1696 auto results_up = pdb_symbol.findAllChildren();
1697 while (
auto symbol_up = results_up->getNext())
1702 TypeClass type_mask,
1723 for (
auto type : type_collection) {
1724 type->GetForwardCompilerType();
1725 type_list.
Insert(type->shared_from_this());
1729llvm::Expected<lldb::TypeSystemSP>
1731 auto type_system_or_err =
1732 m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
1733 if (type_system_or_err) {
1734 if (
auto ts = *type_system_or_err)
1735 ts->SetSymbolFile(
this);
1737 return type_system_or_err;
1741 auto type_system_or_err =
1743 if (
auto err = type_system_or_err.takeError()) {
1745 "Unable to get PDB AST parser: {0}");
1749 auto ts = *type_system_or_err;
1750 auto *clang_type_system =
1751 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1752 if (!clang_type_system)
1755 return clang_type_system->GetPDBParser();
1762 auto type_system_or_err =
1764 if (
auto err = type_system_or_err.takeError()) {
1766 "Unable to find namespace {1}: {0}", name.
AsCString());
1769 auto ts = *type_system_or_err;
1770 auto *clang_type_system =
1771 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1772 if (!clang_type_system)
1779 clang::DeclContext *decl_context =
nullptr;
1780 if (parent_decl_ctx)
1781 decl_context =
static_cast<clang::DeclContext *
>(
1784 auto namespace_decl =
1786 if (!namespace_decl)
1789 return clang_type_system->CreateDeclContext(namespace_decl);
1802 return found_cu->second;
1809 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
1818 std::string path = compiland_up->getSourceFileFullPath();
1825 auto cu_sp = std::make_shared<CompileUnit>(
m_objfile_sp->GetModule(),
nullptr,
1826 path.c_str(),
id, lang, optimized);
1840 uint32_t match_line) {
1849 llvm::DenseMap<uint32_t, uint32_t> index_map;
1851 auto line_table = std::make_unique<LineTable>(&comp_unit);
1854 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
1860 while (
auto file = files->getNext()) {
1862 auto lines =
m_session_up->findLineNumbers(*compiland_up, *file);
1865 int entry_count = lines->getChildCount();
1868 uint32_t prev_length;
1870 uint32_t prev_source_idx;
1872 for (
int i = 0; i < entry_count; ++i) {
1873 auto line = lines->getChildAtIndex(i);
1875 uint64_t lno = line->getLineNumber();
1876 uint64_t addr = line->getVirtualAddress();
1877 uint32_t length = line->getLength();
1878 uint32_t source_id = line->getSourceFileId();
1879 uint32_t col = line->getColumnNumber();
1880 uint32_t source_idx = index_map[source_id];
1884 bool is_gap = (i > 0) && (prev_addr + prev_length < addr);
1889 if (is_gap && ShouldAddLine(match_line, prev_line, prev_length)) {
1890 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1891 prev_line, 0, prev_source_idx,
1892 false,
false,
false,
false,
true);
1894 line_table->InsertSequence(std::move(sequence));
1897 if (ShouldAddLine(match_line, lno, length)) {
1898 bool is_statement = line->isStatement();
1899 bool is_prologue =
false;
1900 bool is_epilogue =
false;
1902 m_session_up->findSymbolByAddress(addr, PDB_SymType::Function);
1904 auto prologue = func->findOneChild<PDBSymbolFuncDebugStart>();
1906 is_prologue = (addr == prologue->getVirtualAddress());
1908 auto epilogue = func->findOneChild<PDBSymbolFuncDebugEnd>();
1910 is_epilogue = (addr == epilogue->getVirtualAddress());
1913 line_table->AppendLineEntryToSequence(sequence, addr, lno, col,
1914 source_idx, is_statement,
false,
1915 is_prologue, is_epilogue,
false);
1919 prev_length = length;
1921 prev_source_idx = source_idx;
1924 if (entry_count > 0 && ShouldAddLine(match_line, prev_line, prev_length)) {
1926 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1927 prev_line, 0, prev_source_idx,
1928 false,
false,
false,
false,
true);
1931 line_table->InsertSequence(std::move(sequence));
1934 if (line_table->GetSize()) {
1942 const PDBSymbolCompiland &compiland,
1943 llvm::DenseMap<uint32_t, uint32_t> &index_map)
const {
1949 auto source_files =
m_session_up->getSourceFilesForCompiland(compiland);
1954 while (
auto file = source_files->getNext()) {
1955 uint32_t source_id = file->getUniqueId();
1956 index_map[source_id] = index++;
1968 m_session_up->findLineNumbersByAddress(file_vm_addr, 1)) {
1969 if (
auto first_line = lines->getNext())
1974 if (
auto sec_contribs =
m_session_up->getSectionContribs()) {
1975 while (
auto section = sec_contribs->getNext()) {
1976 auto va = section->getVirtualAddress();
1977 if (file_vm_addr >= va && file_vm_addr < va + section->getLength())
1987 auto func_name = pdb_func.getName();
1988 auto func_undecorated_name = pdb_func.getUndecoratedName();
1989 std::string func_decorated_name;
1994 if (!func_undecorated_name.empty()) {
1996 PDB_SymType::PublicSymbol, func_undecorated_name,
1997 PDB_NameSearchFlags::NS_UndecoratedName);
1999 while (
auto symbol_up = result_up->getNext()) {
2002 if (
auto *pdb_public_sym =
2003 llvm::dyn_cast_or_null<PDBSymbolPublicSymbol>(
2005 if (pdb_public_sym->isFunction()) {
2006 func_decorated_name = pdb_public_sym->getName();
2013 if (!func_decorated_name.empty()) {
2035 if (!func_undecorated_name.empty() &&
2038 }
else if (!func_undecorated_name.empty()) {
2040 }
else if (!func_name.empty())
2052 if (!decl_ctx_type_system)
2056 if (
auto err = type_system_or_err.takeError()) {
2059 "Unable to determine if DeclContext matches this symbol file: {0}");
2063 if (decl_ctx_type_system == type_system_or_err->get())
2070 static const auto pred_upper = [](uint32_t lhs,
SecContribInfo rhs) {
2071 return lhs < rhs.Offset;
2076 if (
auto SecContribs =
m_session_up->getSectionContribs()) {
2077 while (
auto SectionContrib = SecContribs->getNext()) {
2078 auto comp_id = SectionContrib->getCompilandId();
2082 auto sec = SectionContrib->getAddressSection();
2085 auto offset = SectionContrib->getAddressOffset();
2086 auto it = llvm::upper_bound(sec_cs, offset, pred_upper);
2088 auto size = SectionContrib->getLength();
2089 sec_cs.insert(it, {offset, size, comp_id});
2095 if (
auto Lines = data.getLineNumbers()) {
2096 if (
auto FirstLine = Lines->getNext())
2097 return FirstLine->getCompilandId();
2101 uint32_t DataSection = data.getAddressSection();
2102 uint32_t DataOffset = data.getAddressOffset();
2103 if (DataSection == 0) {
2104 if (
auto RVA = data.getRelativeVirtualAddress())
2105 m_session_up->addressForRVA(RVA, DataSection, DataOffset);
2111 auto it = llvm::upper_bound(sec_cs, DataOffset, pred_upper);
2112 if (it != sec_cs.begin()) {
2114 if (DataOffset < it->Offset + it->Size)
2115 return it->CompilandId;
2119 auto LexParentId = data.getLexicalParentId();
2120 while (
auto LexParent =
m_session_up->getSymbolById(LexParentId)) {
2121 if (LexParent->getSymTag() == PDB_SymType::Exe)
2123 if (LexParent->getSymTag() == PDB_SymType::Compiland)
2125 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.