14#include "clang/Lex/Lexer.h"
35#include "llvm/Config/llvm-config.h"
36#include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h"
37#include "llvm/DebugInfo/PDB/GenericError.h"
38#include "llvm/DebugInfo/PDB/IPDBDataStream.h"
39#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
40#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
41#include "llvm/DebugInfo/PDB/IPDBSectionContrib.h"
42#include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
43#include "llvm/DebugInfo/PDB/IPDBTable.h"
44#include "llvm/DebugInfo/PDB/PDBSymbol.h"
45#include "llvm/DebugInfo/PDB/PDBSymbolBlock.h"
46#include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
47#include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h"
48#include "llvm/DebugInfo/PDB/PDBSymbolData.h"
49#include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
50#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
51#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
52#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
53#include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h"
54#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
55#include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
56#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
57#include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
58#include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
64#include "llvm/Config/llvm-config.h"
88 "Use native PDB reader unless LLDB_USE_NATIVE_PDB_READER environment "
99 "Use native PDB reader",
103#define LLDB_PROPERTIES_symbolfilepdb
104#include "SymbolFilePDBProperties.inc"
107#define LLDB_PROPERTIES_symbolfilepdb
108#include "SymbolFilePDBPropertiesEnum.inc"
111static const bool g_should_use_native_reader_by_default = [] {
112 llvm::StringRef env_value = ::getenv(
"LLDB_USE_NATIVE_PDB_READER");
114 return !env_value.equals_insensitive(
"off") &&
115 !env_value.equals_insensitive(
"no") &&
116 !env_value.equals_insensitive(
"0") &&
117 !env_value.equals_insensitive(
"false");
122 static llvm::StringRef GetSettingName() {
127 m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
128 m_collection_sp->Initialize(g_symbolfilepdb_properties_def);
131 bool UseNativeReader()
const {
132#if LLVM_ENABLE_DIA_SDK && defined(_WIN32)
133 return IsNativeReaderRequested();
135 if (!IsNativeReaderRequested()) {
136 static std::once_flag g_warning_shown;
138 "the DIA PDB reader was explicitly requested, but LLDB was built "
139 "without the DIA SDK. The native reader will be used instead",
140 {}, &g_warning_shown);
147 bool IsNativeReaderRequested()
const {
149 GetPropertyAtIndexAs<PDBReader>(ePropertyReader, ePDBReaderDefault);
151 case ePDBReaderNative:
156 return g_should_use_native_reader_by_default;
162 static PluginProperties g_settings;
172 case PDB_Lang::Swift:
178 case PDB_Lang::ObjCpp:
185bool ShouldAddLine(uint32_t requested_line, uint32_t actual_line,
186 uint32_t addr_length) {
187 return ((requested_line == 0 || actual_line == requested_line) &&
213 debugger, PluginProperties::GetSettingName())) {
216 "Properties for the PDB symbol-file plug-in.",
true);
221 return "Microsoft PDB debug symbol file reader.";
226 if (!llvm::isa_and_nonnull<ObjectFilePECOFF, ObjectFilePDB>(objfile_sp.get()))
240 uint32_t abilities = 0;
246 std::string exePath =
247 m_objfile_sp->GetModule()->GetObjectFile()->GetFileSpec().GetPath();
248 auto error = loadDataForEXE(PDB_ReaderType::DIA, llvm::StringRef(exePath),
251 llvm::consumeError(std::move(
error));
256 FileSpec symfile = module_sp->GetSymbolFileFileSpec();
259 error = loadDataForPDB(PDB_ReaderType::DIA,
262 llvm::consumeError(std::move(
error));
273 while (
auto table_up = enum_tables_up->getNext()) {
274 if (table_up->getItemCount() == 0)
276 auto type = table_up->getTableType();
278 case PDB_TableType::Symbols:
284 case PDB_TableType::LineNumbers:
319 uint32_t compile_unit_count = compilands->getChildCount();
324 auto last_compiland_up = compilands->getChildAtIndex(compile_unit_count - 1);
326 std::string name = last_compiland_up->getName();
327 if (name ==
"* Linker *")
328 --compile_unit_count;
329 return compile_unit_count;
333 const llvm::pdb::PDBSymbolCompiland &pdb_compiland, uint32_t &index) {
337 auto uid = pdb_compiland.getSymIndexId();
339 auto compiland_up = results_up->getChildAtIndex(cu_idx);
342 if (compiland_up->getSymIndexId() == uid) {
350std::unique_ptr<llvm::pdb::PDBSymbolCompiland>
352 return m_session_up->getConcreteSymbolById<PDBSymbolCompiland>(uid);
365 auto compiland_up = results->getChildAtIndex(index);
376 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
388 auto file_vm_addr = pdb_func.getVirtualAddress();
392 auto func_length = pdb_func.getLength();
393 Address func_addr(file_vm_addr,
402 user_id_t func_type_uid = pdb_func.getSignatureId();
406 FunctionSP func_sp = std::make_shared<Function>(
407 &comp_unit, pdb_func.getSymIndexId(), func_type_uid, mangled, func_type,
408 func_addr,
AddressRanges{AddressRange(func_addr, func_length)});
414 if (
auto err = type_system_or_err.takeError()) {
416 "Unable to parse PDBFunc: {0}");
420 auto ts = *type_system_or_err;
422 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
423 if (!clang_type_system)
427 return func_sp.get();
432 size_t func_added = 0;
436 auto results_up = compiland_up->findAllChildren<PDBSymbolFunc>();
439 while (
auto pdb_func_up = results_up->getNext()) {
473 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
474 if (!files || files->getChildCount() == 0)
477 while (
auto file = files->getNext()) {
478 FileSpec spec(file->getFileName(), FileSpec::Style::windows);
487 std::vector<SourceModule> &imported_modules) {
493 uint64_t func_file_vm_addr,
const llvm::pdb::PDBSymbol *pdb_symbol,
495 assert(pdb_symbol && parent_block);
497 size_t num_added = 0;
499 if (!is_top_parent) {
501 if (pdb_symbol->getSymTag() != PDB_SymType::Block)
504 auto &raw_sym = pdb_symbol->getRawSymbol();
505 assert(llvm::isa<PDBSymbolBlock>(pdb_symbol));
506 auto uid = pdb_symbol->getSymIndexId();
509 if (raw_sym.getVirtualAddress() < func_file_vm_addr)
512 Block *block = parent_block->
CreateChild(pdb_symbol->getSymIndexId()).get();
514 raw_sym.getVirtualAddress() - func_file_vm_addr, raw_sym.getLength()));
517 auto results_up = pdb_symbol->findAllChildren();
521 while (
auto symbol_up = results_up->getNext()) {
523 func_file_vm_addr, symbol_up.get(), parent_block,
false);
530 size_t num_added = 0;
531 auto uid = func.
GetID();
532 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
537 pdb_func_up->getVirtualAddress(), pdb_func_up.get(), &parent_block,
true);
544 size_t num_added = 0;
549 auto ParseTypesByTagFn = [&num_added,
this](
const PDBSymbol &raw_sym) {
550 std::unique_ptr<IPDBEnumSymbols> results;
551 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
553 for (
auto tag : tags_to_search) {
554 results = raw_sym.findAllChildren(tag);
555 if (!results || results->getChildCount() == 0)
557 while (
auto symbol = results->getNext()) {
558 switch (symbol->getSymTag()) {
559 case PDB_SymType::Enum:
560 case PDB_SymType::UDT:
561 case PDB_SymType::Typedef:
573 type->GetFullCompilerType();
580 ParseTypesByTagFn(*compiland);
585 static bool parse_all_global_types =
false;
586 if (!parse_all_global_types) {
588 parse_all_global_types =
true;
599 size_t num_added = 0;
601 auto pdb_func =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(
617 if (results && results->getChildCount()) {
618 while (
auto result = results->getNext()) {
645 auto find_result =
m_types.find(type_uid);
646 if (find_result !=
m_types.end())
647 return find_result->second.get();
649 auto type_system_or_err =
651 if (
auto err = type_system_or_err.takeError()) {
653 "Unable to ResolveTypeUID: {0}");
657 auto ts = *type_system_or_err;
659 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
660 if (!clang_type_system)
667 if (pdb_type ==
nullptr)
672 m_types.insert(std::make_pair(type_uid, result));
683 std::lock_guard<std::recursive_mutex> guard(
686 auto type_system_or_err =
688 if (
auto err = type_system_or_err.takeError()) {
690 "Unable to get dynamic array info for UID: {0}");
693 auto ts = *type_system_or_err;
695 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
704 return pdb->CompleteTypeFromPDB(compiler_type);
708 auto type_system_or_err =
710 if (
auto err = type_system_or_err.takeError()) {
712 "Unable to get decl for UID: {0}");
715 auto ts = *type_system_or_err;
717 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
729 auto decl =
pdb->GetDeclForSymbol(*symbol);
738 auto type_system_or_err =
740 if (
auto err = type_system_or_err.takeError()) {
742 "Unable to get DeclContext for UID: {0}");
746 auto ts = *type_system_or_err;
748 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
760 auto decl_context =
pdb->GetDeclContextForSymbol(*symbol);
769 auto type_system_or_err =
771 if (
auto err = type_system_or_err.takeError()) {
773 "Unable to get DeclContext containing UID: {0}");
777 auto ts = *type_system_or_err;
779 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
791 auto decl_context =
pdb->GetDeclContextContainingSymbol(*symbol);
792 assert(decl_context);
799 auto type_system_or_err =
801 if (
auto err = type_system_or_err.takeError()) {
803 "Unable to parse decls for context: {0}");
807 auto ts = *type_system_or_err;
809 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
817 pdb->ParseDeclsForDeclContext(
823 SymbolContextItem resolve_scope,
826 uint32_t resolved_flags = 0;
827 if (resolve_scope & eSymbolContextCompUnit ||
828 resolve_scope & eSymbolContextVariable ||
829 resolve_scope & eSymbolContextFunction ||
830 resolve_scope & eSymbolContextBlock ||
831 resolve_scope & eSymbolContextLineEntry) {
834 if (resolved_flags & eSymbolContextVariable) {
840 resolved_flags |= eSymbolContextCompUnit;
844 if (resolve_scope & eSymbolContextFunction ||
845 resolve_scope & eSymbolContextBlock) {
848 m_session_up->findSymbolByAddress(file_vm_addr, PDB_SymType::Function);
850 auto *pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
852 auto func_uid = pdb_func->getSymIndexId();
858 resolved_flags |= eSymbolContextFunction;
859 if (resolve_scope & eSymbolContextBlock) {
861 file_vm_addr, PDB_SymType::Block);
862 auto block_id = block_symbol ? block_symbol->getSymIndexId()
866 resolved_flags |= eSymbolContextBlock;
872 if (resolve_scope & eSymbolContextLineEntry) {
874 Address addr(so_addr);
875 if (line_table->FindLineEntryByAddress(addr, sc.
line_entry))
876 resolved_flags |= eSymbolContextLineEntry;
880 return resolved_flags;
887 const size_t old_size = sc_list.
GetSize();
888 const FileSpec &file_spec = src_location_spec.
GetFileSpec();
889 const uint32_t line = src_location_spec.
GetLine().value_or(0);
890 if (resolve_scope & lldb::eSymbolContextCompUnit) {
895 auto compilands =
m_session_up->findCompilandsForSourceFile(
896 file_spec.
GetPath(), PDB_NameSearchFlags::NS_CaseInsensitive);
903 while (
auto compiland = compilands->getNext()) {
909 std::string source_file = compiland->getSourceFileFullPath();
910 if (source_file.empty())
912 FileSpec this_spec(source_file, FileSpec::Style::windows);
913 bool need_full_match = !file_spec.
GetDirectory().empty();
927 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock |
928 eSymbolContextLineEntry)) {
931 if ((resolve_scope & eSymbolContextLineEntry) && !has_line_table) {
935 assert(line &&
"Couldn't get all line entries!\n");
941 if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock)) {
948 uint32_t num_line_entries = line_table->GetSize();
954 for (uint32_t line_idx = 0; line && line_idx < num_line_entries;
956 if (!line_table->GetLineEntryAtIndex(line_idx, sc.
line_entry))
965 file_vm_addr, PDB_SymType::Function);
967 auto func_uid = symbol_up->getSymIndexId();
970 auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(symbol_up.get());
975 if (sc.
function && (resolve_scope & eSymbolContextBlock)) {
982 }
else if (has_line_table) {
994 return sc_list.
GetSize() - old_size;
1000 if (
auto result_up =
1002 while (
auto symbol_up = result_up->getNext())
1003 if (
auto addr = symbol_up->getRawSymbol().getVirtualAddress())
1012 const llvm::pdb::PDBSymbolData &pdb_data) {
1014 uint32_t var_uid = pdb_data.getSymIndexId();
1017 return result->second;
1020 bool is_static_member =
false;
1021 bool is_external =
false;
1022 bool is_artificial =
false;
1024 switch (pdb_data.getDataKind()) {
1025 case PDB_DataKind::Global:
1029 case PDB_DataKind::Local:
1032 case PDB_DataKind::FileStatic:
1035 case PDB_DataKind::StaticMember:
1036 is_static_member =
true;
1039 case PDB_DataKind::Member:
1042 case PDB_DataKind::Param:
1045 case PDB_DataKind::Constant:
1052 switch (pdb_data.getLocationType()) {
1053 case PDB_LocType::TLS:
1056 case PDB_LocType::RegRel: {
1058 if (pdb_data.getDataKind() == PDB_DataKind::ObjectPtr) {
1060 is_artificial =
true;
1068 if (!is_artificial && !pdb_data.isCompilerGenerated()) {
1069 if (
auto lines = pdb_data.getLineNumbers()) {
1070 if (
auto first_line = lines->getNext()) {
1071 uint32_t src_file_id = first_line->getSourceFileId();
1072 auto src_file =
m_session_up->getSourceFileById(src_file_id);
1074 FileSpec spec(src_file->getFileName());
1076 decl.
SetColumn(first_line->getColumnNumber());
1077 decl.
SetLine(first_line->getLineNumber());
1089 function_block.
FindBlockByID(pdb_data.getLexicalParentId());
1091 block = &function_block;
1093 context_scope = block;
1095 for (
size_t i = 0, num_ranges = block->
GetNumRanges(); i < num_ranges;
1108 std::make_shared<SymbolFileType>(*
this, pdb_data.getTypeId());
1110 auto var_name = pdb_data.getName();
1112 auto mangled_cstr = mangled.empty() ? nullptr : mangled.c_str();
1118 module_sp, pdb_data, ranges, is_constant),
1121 var_sp = std::make_shared<Variable>(
1122 var_uid, var_name.c_str(), mangled_cstr, type_sp, scope, context_scope,
1123 ranges, &decl, location, is_external, is_artificial, is_constant,
1126 m_variables.insert(std::make_pair(var_uid, var_sp));
1132 const llvm::pdb::PDBSymbol &pdb_symbol,
1134 size_t num_added = 0;
1136 if (
auto pdb_data = llvm::dyn_cast<PDBSymbolData>(&pdb_symbol)) {
1139 auto result =
m_variables.find(pdb_data->getSymIndexId());
1145 if (
auto lexical_parent = pdb_data->getLexicalParent()) {
1146 switch (lexical_parent->getSymTag()) {
1147 case PDB_SymType::Exe:
1150 case PDB_SymType::Compiland: {
1153 if (!local_variable_list_sp) {
1154 local_variable_list_sp = std::make_shared<VariableList>();
1159 case PDB_SymType::Block:
1160 case PDB_SymType::Function: {
1163 lexical_parent->getSymIndexId());
1166 if (!local_variable_list_sp) {
1167 local_variable_list_sp = std::make_shared<VariableList>();
1178 if (local_variable_list_sp) {
1180 local_variable_list_sp->AddVariableIfUnique(var_sp);
1192 if (
auto results = pdb_symbol.findAllChildren()) {
1193 while (
auto result = results->getNext())
1213 uint32_t matches = 0;
1214 size_t old_size = variables.
GetSize();
1215 while (
auto result = results->getNext()) {
1216 auto pdb_data = llvm::dyn_cast<PDBSymbolData>(result.get());
1217 if (max_matches > 0 && matches >= max_matches)
1233 if (parent_decl_ctx.
IsValid() &&
1238 matches = variables.
GetSize() - old_size;
1252 uint32_t matches = 0;
1253 size_t old_size = variables.
GetSize();
1254 while (
auto pdb_data = results->getNext()) {
1255 if (max_matches > 0 && matches >= max_matches)
1258 auto var_name = pdb_data->getName();
1259 if (var_name.empty())
1273 matches = variables.
GetSize() - old_size;
1278 bool include_inlines,
1295 auto pdb_func_up =
m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
1296 if (!pdb_func_up && !(include_inlines && pdb_func_up->hasInlineAttribute()))
1305 std::map<uint64_t, uint32_t> addr_ids;
1308 while (
auto pdb_func_up = results_up->getNext()) {
1309 if (pdb_func_up->isCompilerGenerated())
1312 auto name = pdb_func_up->getName();
1313 auto demangled_name = pdb_func_up->getUndecoratedName();
1314 if (name.empty() && demangled_name.empty())
1317 auto uid = pdb_func_up->getSymIndexId();
1318 if (!demangled_name.empty() && pdb_func_up->getVirtualAddress())
1319 addr_ids.insert(std::make_pair(pdb_func_up->getVirtualAddress(), uid));
1321 if (
auto parent = pdb_func_up->getClassParent()) {
1332 if (!basename.empty())
1338 if (!demangled_name.empty())
1346 if (!basename.empty())
1351 if (name ==
"main") {
1354 if (!demangled_name.empty() && name != demangled_name) {
1358 }
else if (!demangled_name.empty()) {
1367 if (
auto results_up =
1369 while (
auto pub_sym_up = results_up->getNext()) {
1370 if (!pub_sym_up->isFunction())
1372 auto name = pub_sym_up->getName();
1378 if (
auto vm_addr = pub_sym_up->getVirtualAddress()) {
1379 if (
auto it = addr_ids.find(vm_addr); it != addr_ids.end())
1398 bool include_inlines,
1403 lldbassert((name_type_mask & eFunctionNameTypeAuto) == 0);
1405 if (name_type_mask & eFunctionNameTypeFull)
1408 if (name_type_mask == eFunctionNameTypeNone)
1415 if (name_type_mask & eFunctionNameTypeFull ||
1416 name_type_mask & eFunctionNameTypeBase ||
1417 name_type_mask & eFunctionNameTypeMethod) {
1420 std::set<uint32_t> resolved_ids;
1421 auto ResolveFn = [
this, &name, parent_decl_ctx, include_inlines, &sc_list,
1423 std::vector<uint32_t> ids;
1424 if (!Names.GetValues(name, ids))
1427 for (uint32_t
id : ids) {
1428 if (resolved_ids.find(
id) != resolved_ids.end())
1431 if (parent_decl_ctx.IsValid() &&
1436 resolved_ids.insert(
id);
1439 if (name_type_mask & eFunctionNameTypeFull) {
1444 if (name_type_mask & eFunctionNameTypeBase)
1446 if (name_type_mask & eFunctionNameTypeMethod)
1452 bool include_inlines,
1460 std::set<uint32_t> resolved_ids;
1461 auto ResolveFn = [®ex, include_inlines, &sc_list, &resolved_ids,
1463 std::vector<uint32_t> ids;
1464 if (Names.GetValues(regex, ids)) {
1465 for (
auto id : ids) {
1466 if (resolved_ids.find(
id) == resolved_ids.end())
1468 resolved_ids.insert(
id);
1477 const std::string &scope_qualified_name,
1478 std::vector<lldb_private::ConstString> &mangled_names) {}
1481 std::set<lldb::addr_t> sym_addresses;
1490 m_objfile_sp->GetModule()->GetObjectFile()->GetSectionList();
1494 while (
auto pub_symbol = results->getNext()) {
1495 auto section_id = pub_symbol->getAddressSection();
1497 auto section = section_list->FindSectionByID(section_id);
1501 auto offset = pub_symbol->getAddressOffset();
1503 auto file_addr = section->GetFileAddress() + offset;
1504 if (sym_addresses.find(file_addr) != sym_addresses.end())
1506 sym_addresses.insert(file_addr);
1508 auto size = pub_symbol->getLength();
1510 Symbol(pub_symbol->getSymIndexId(),
1511 pub_symbol->getName().c_str(),
1531 auto type_system_or_err =
1533 if (
auto err = type_system_or_err.takeError()) {
1535 "Unable to dump ClangAST: {0}");
1539 auto ts = *type_system_or_err;
1541 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1542 if (!clang_type_system)
1556 PDB_SymType tags_to_search[] = {PDB_SymType::Enum, PDB_SymType::Typedef,
1558 std::unique_ptr<IPDBEnumSymbols> results;
1560 uint32_t matches = 0;
1562 for (
auto tag : tags_to_search) {
1567 while (
auto result = results->getNext()) {
1568 if (max_matches > 0 && matches >= max_matches)
1571 std::string type_name;
1572 if (
auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(result.get()))
1573 type_name = enum_type->getName();
1574 else if (
auto typedef_type =
1575 llvm::dyn_cast<PDBSymbolTypeTypedef>(result.get()))
1576 type_name = typedef_type->getName();
1577 else if (
auto class_type = llvm::dyn_cast<PDBSymbolTypeUDT>(result.get()))
1578 type_name = class_type->getName();
1585 if (!regex.
Execute(type_name))
1593 auto iter =
m_types.find(result->getSymIndexId());
1596 types.
Insert(iter->second);
1611 std::unique_ptr<IPDBEnumSymbols> results;
1613 if (basename.empty())
1619 while (
auto result = results->getNext()) {
1621 switch (result->getSymTag()) {
1622 case PDB_SymType::Enum:
1623 case PDB_SymType::UDT:
1624 case PDB_SymType::Typedef:
1633 result->getRawSymbol().getName()) != basename)
1641 auto iter =
m_types.find(result->getSymIndexId());
1645 ConstString name = iter->second->GetQualifiedName();
1649 if (type_results.
Done(query))
1658 bool can_parse =
false;
1659 switch (pdb_symbol.getSymTag()) {
1660 case PDB_SymType::ArrayType:
1661 can_parse = ((type_mask & eTypeClassArray) != 0);
1663 case PDB_SymType::BuiltinType:
1664 can_parse = ((type_mask & eTypeClassBuiltin) != 0);
1666 case PDB_SymType::Enum:
1667 can_parse = ((type_mask & eTypeClassEnumeration) != 0);
1669 case PDB_SymType::Function:
1670 case PDB_SymType::FunctionSig:
1671 can_parse = ((type_mask & eTypeClassFunction) != 0);
1673 case PDB_SymType::PointerType:
1674 can_parse = ((type_mask & (eTypeClassPointer | eTypeClassBlockPointer |
1675 eTypeClassMemberPointer)) != 0);
1677 case PDB_SymType::Typedef:
1678 can_parse = ((type_mask & eTypeClassTypedef) != 0);
1680 case PDB_SymType::UDT: {
1681 auto *udt = llvm::dyn_cast<PDBSymbolTypeUDT>(&pdb_symbol);
1683 can_parse = (udt->getUdtKind() != PDB_UdtType::Interface &&
1684 ((type_mask & (eTypeClassClass | eTypeClassStruct |
1685 eTypeClassUnion)) != 0));
1693 if (!llvm::is_contained(type_collection, type))
1694 type_collection.push_back(type);
1698 auto results_up = pdb_symbol.findAllChildren();
1699 while (
auto symbol_up = results_up->getNext())
1704 TypeClass type_mask,
1725 for (
auto type : type_collection) {
1726 type->GetForwardCompilerType();
1727 type_list.
Insert(type->shared_from_this());
1731llvm::Expected<lldb::TypeSystemSP>
1733 auto type_system_or_err =
1734 m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
1735 if (type_system_or_err) {
1736 if (
auto ts = *type_system_or_err)
1737 ts->SetSymbolFile(
this);
1739 return type_system_or_err;
1743 auto type_system_or_err =
1745 if (
auto err = type_system_or_err.takeError()) {
1747 "Unable to get PDB AST parser: {0}");
1751 auto ts = *type_system_or_err;
1752 auto *clang_type_system =
1753 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1754 if (!clang_type_system)
1757 return clang_type_system->GetPDBParser();
1764 auto type_system_or_err =
1766 if (
auto err = type_system_or_err.takeError()) {
1768 "Unable to find namespace {1}: {0}", name);
1771 auto ts = *type_system_or_err;
1772 auto *clang_type_system =
1773 llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
1774 if (!clang_type_system)
1781 clang::DeclContext *decl_context =
nullptr;
1782 if (parent_decl_ctx)
1783 decl_context =
static_cast<clang::DeclContext *
>(
1786 auto namespace_decl =
1788 if (!namespace_decl)
1791 return clang_type_system->CreateDeclContext(namespace_decl);
1804 return found_cu->second;
1811 auto details = compiland_up->findOneChild<PDBSymbolCompilandDetails>();
1820 std::string path = compiland_up->getSourceFileFullPath();
1827 auto cu_sp = std::make_shared<CompileUnit>(
m_objfile_sp->GetModule(),
nullptr,
1828 path.c_str(),
id, lang, optimized);
1842 uint32_t match_line) {
1851 llvm::DenseMap<uint32_t, uint32_t> index_map;
1853 auto line_table = std::make_unique<LineTable>(&comp_unit);
1856 auto files =
m_session_up->getSourceFilesForCompiland(*compiland_up);
1862 while (
auto file = files->getNext()) {
1864 auto lines =
m_session_up->findLineNumbers(*compiland_up, *file);
1867 int entry_count = lines->getChildCount();
1870 uint32_t prev_length;
1872 uint32_t prev_source_idx;
1874 for (
int i = 0; i < entry_count; ++i) {
1875 auto line = lines->getChildAtIndex(i);
1877 uint64_t lno = line->getLineNumber();
1878 uint64_t addr = line->getVirtualAddress();
1879 uint32_t length = line->getLength();
1880 uint32_t source_id = line->getSourceFileId();
1881 uint32_t col = line->getColumnNumber();
1882 uint32_t source_idx = index_map[source_id];
1886 bool is_gap = (i > 0) && (prev_addr + prev_length < addr);
1891 if (is_gap && ShouldAddLine(match_line, prev_line, prev_length)) {
1892 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1893 prev_line, 0, prev_source_idx,
1894 false,
false,
false,
false,
true);
1896 line_table->InsertSequence(std::move(sequence));
1899 if (ShouldAddLine(match_line, lno, length)) {
1900 bool is_statement = line->isStatement();
1901 bool is_prologue =
false;
1902 bool is_epilogue =
false;
1904 m_session_up->findSymbolByAddress(addr, PDB_SymType::Function);
1906 auto prologue = func->findOneChild<PDBSymbolFuncDebugStart>();
1908 is_prologue = (addr == prologue->getVirtualAddress());
1910 auto epilogue = func->findOneChild<PDBSymbolFuncDebugEnd>();
1912 is_epilogue = (addr == epilogue->getVirtualAddress());
1915 line_table->AppendLineEntryToSequence(sequence, addr, lno, col,
1916 source_idx, is_statement,
false,
1917 is_prologue, is_epilogue,
false);
1921 prev_length = length;
1923 prev_source_idx = source_idx;
1926 if (entry_count > 0 && ShouldAddLine(match_line, prev_line, prev_length)) {
1928 line_table->AppendLineEntryToSequence(sequence, prev_addr + prev_length,
1929 prev_line, 0, prev_source_idx,
1930 false,
false,
false,
false,
true);
1933 line_table->InsertSequence(std::move(sequence));
1936 if (line_table->GetSize()) {
1944 const PDBSymbolCompiland &compiland,
1945 llvm::DenseMap<uint32_t, uint32_t> &index_map)
const {
1951 auto source_files =
m_session_up->getSourceFilesForCompiland(compiland);
1956 while (
auto file = source_files->getNext()) {
1957 uint32_t source_id = file->getUniqueId();
1958 index_map[source_id] = index++;
1970 m_session_up->findLineNumbersByAddress(file_vm_addr, 1)) {
1971 if (
auto first_line = lines->getNext())
1976 if (
auto sec_contribs =
m_session_up->getSectionContribs()) {
1977 while (
auto section = sec_contribs->getNext()) {
1978 auto va = section->getVirtualAddress();
1979 if (file_vm_addr >= va && file_vm_addr < va + section->getLength())
1989 auto func_name = pdb_func.getName();
1990 auto func_undecorated_name = pdb_func.getUndecoratedName();
1991 std::string func_decorated_name;
1996 if (!func_undecorated_name.empty()) {
1998 PDB_SymType::PublicSymbol, func_undecorated_name,
1999 PDB_NameSearchFlags::NS_UndecoratedName);
2001 while (
auto symbol_up = result_up->getNext()) {
2004 if (
auto *pdb_public_sym =
2005 llvm::dyn_cast_or_null<PDBSymbolPublicSymbol>(
2007 if (pdb_public_sym->isFunction()) {
2008 func_decorated_name = pdb_public_sym->getName();
2015 if (!func_decorated_name.empty()) {
2037 if (!func_undecorated_name.empty() &&
2040 }
else if (!func_undecorated_name.empty()) {
2042 }
else if (!func_name.empty())
2054 if (!decl_ctx_type_system)
2058 if (
auto err = type_system_or_err.takeError()) {
2061 "Unable to determine if DeclContext matches this symbol file: {0}");
2065 if (decl_ctx_type_system == type_system_or_err->get())
2072 static const auto pred_upper = [](uint32_t lhs,
SecContribInfo rhs) {
2073 return lhs < rhs.Offset;
2078 if (
auto SecContribs =
m_session_up->getSectionContribs()) {
2079 while (
auto SectionContrib = SecContribs->getNext()) {
2080 auto comp_id = SectionContrib->getCompilandId();
2084 auto sec = SectionContrib->getAddressSection();
2087 auto offset = SectionContrib->getAddressOffset();
2088 auto it = llvm::upper_bound(sec_cs, offset, pred_upper);
2090 auto size = SectionContrib->getLength();
2091 sec_cs.insert(it, {offset, size, comp_id});
2097 if (
auto Lines = data.getLineNumbers()) {
2098 if (
auto FirstLine = Lines->getNext())
2099 return FirstLine->getCompilandId();
2103 uint32_t DataSection = data.getAddressSection();
2104 uint32_t DataOffset = data.getAddressOffset();
2105 if (DataSection == 0) {
2106 if (
auto RVA = data.getRelativeVirtualAddress())
2107 m_session_up->addressForRVA(RVA, DataSection, DataOffset);
2113 auto it = llvm::upper_bound(sec_cs, DataOffset, pred_upper);
2114 if (it != sec_cs.begin()) {
2116 if (DataOffset < it->Offset + it->Size)
2117 return it->CompilandId;
2121 auto LexParentId = data.getLexicalParentId();
2122 while (
auto LexParent =
m_session_up->getSymbolById(LexParentId)) {
2123 if (LexParent->getSymTag() == PDB_SymType::Exe)
2125 if (LexParent->getSymTag() == PDB_SymType::Compiland)
2127 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
Add symbols from this SymbolFile to the ObjectFile's symbol table.
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.
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.
static int Compare(const FileSpec &lhs, const FileSpec &rhs, bool full)
Compare two FileSpec objects.
llvm::StringRef 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
@ eValueTypeVariableGlobal
globals variable
@ eValueTypeConstResult
constant result variables
@ eValueTypeVariableLocal
function local variables
@ eValueTypeVariableArgument
function argument variables
@ eValueTypeVariableStatic
static variable
@ eValueTypeVariableThreadLocal
thread local storage variable
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::CompileUnit > CompUnitSP
AddressRange range
The section offset address range for this line entry.
lldb::user_id_t GetID() const
Get accessor for the user ID.