1271 lines · cpp
1//===- DIARawSymbol.cpp - DIA implementation of IPDBRawSymbol ---*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "llvm/DebugInfo/PDB/DIA/DIARawSymbol.h"10#include "llvm/ADT/ArrayRef.h"11#include "llvm/ADT/STLExtras.h"12#include "llvm/DebugInfo/CodeView/Formatters.h"13#include "llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h"14#include "llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h"15#include "llvm/DebugInfo/PDB/DIA/DIALineNumber.h"16#include "llvm/DebugInfo/PDB/DIA/DIASession.h"17#include "llvm/DebugInfo/PDB/DIA/DIAUtils.h"18#include "llvm/DebugInfo/PDB/PDBExtras.h"19#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"20#include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"21#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"22#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"23#include "llvm/Support/ConvertUTF.h"24#include "llvm/Support/raw_ostream.h"25 26using namespace llvm;27using namespace llvm::pdb;28 29namespace {30Variant VariantFromVARIANT(const VARIANT &V) {31 Variant Result;32 switch (V.vt) {33 case VT_I1:34 Result.Value.Int8 = V.cVal;35 Result.Type = PDB_VariantType::Int8;36 break;37 case VT_I2:38 Result.Value.Int16 = V.iVal;39 Result.Type = PDB_VariantType::Int16;40 break;41 case VT_I4:42 Result.Value.Int32 = V.intVal;43 Result.Type = PDB_VariantType::Int32;44 break;45 case VT_I8:46 Result.Value.Int64 = V.llVal;47 Result.Type = PDB_VariantType::Int64;48 break;49 case VT_UI1:50 Result.Value.UInt8 = V.bVal;51 Result.Type = PDB_VariantType::UInt8;52 break;53 case VT_UI2:54 Result.Value.UInt16 = V.uiVal;55 Result.Type = PDB_VariantType::UInt16;56 break;57 case VT_UI4:58 Result.Value.UInt32 = V.uintVal;59 Result.Type = PDB_VariantType::UInt32;60 break;61 case VT_UI8:62 Result.Value.UInt64 = V.ullVal;63 Result.Type = PDB_VariantType::UInt64;64 break;65 case VT_BOOL:66 Result.Value.Bool = (V.boolVal == VARIANT_TRUE) ? true : false;67 Result.Type = PDB_VariantType::Bool;68 break;69 case VT_R4:70 Result.Value.Single = V.fltVal;71 Result.Type = PDB_VariantType::Single;72 break;73 case VT_R8:74 Result.Value.Double = V.dblVal;75 Result.Type = PDB_VariantType::Double;76 break;77 case VT_BSTR: {78 const char *SrcBytes = reinterpret_cast<const char *>(V.bstrVal);79 llvm::ArrayRef<char> SrcByteArray(SrcBytes, SysStringByteLen(V.bstrVal));80 std::string Result8;81 if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))82 Result.Value.String = nullptr;83 Result.Value.String = new char[Result8.length() + 1];84 ::strcpy(Result.Value.String, Result8.c_str());85 Result.Type = PDB_VariantType::String;86 break;87 }88 default:89 Result.Type = PDB_VariantType::Unknown;90 break;91 }92 return Result;93}94 95template <typename ArgType>96ArgType PrivateGetDIAValue(IDiaSymbol *Symbol,97 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {98 ArgType Value;99 if (S_OK == (Symbol->*Method)(&Value))100 return static_cast<ArgType>(Value);101 102 return ArgType();103}104 105template <typename ArgType, typename RetType>106RetType PrivateGetDIAValue(IDiaSymbol *Symbol,107 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {108 ArgType Value;109 if (S_OK == (Symbol->*Method)(&Value))110 return static_cast<RetType>(Value);111 112 return RetType();113}114 115std::string116PrivateGetDIAValue(IDiaSymbol *Symbol,117 HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {118 return invokeBstrMethod(*Symbol, Method);119}120 121codeview::GUID122PrivateGetDIAValue(IDiaSymbol *Symbol,123 HRESULT (__stdcall IDiaSymbol::*Method)(GUID *)) {124 GUID Result;125 if (S_OK != (Symbol->*Method)(&Result))126 return codeview::GUID();127 128 static_assert(sizeof(codeview::GUID) == sizeof(GUID),129 "GUID is the wrong size!");130 codeview::GUID IdResult;131 ::memcpy(&IdResult, &Result, sizeof(GUID));132 return IdResult;133}134 135template <typename PrintType, typename ArgType>136void DumpDIAValueAs(llvm::raw_ostream &OS, int Indent, StringRef Name,137 IDiaSymbol *Symbol,138 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {139 ArgType Value;140 if (S_OK == (Symbol->*Method)(&Value))141 dumpSymbolField(OS, Name, static_cast<PrintType>(Value), Indent);142}143 144void DumpDIAIdValue(llvm::raw_ostream &OS, int Indent, StringRef Name,145 IDiaSymbol *Symbol,146 HRESULT (__stdcall IDiaSymbol::*Method)(DWORD *),147 const IPDBSession &Session, PdbSymbolIdField FieldId,148 PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) {149 DWORD Value;150 if (S_OK == (Symbol->*Method)(&Value))151 dumpSymbolIdField(OS, Name, Value, Indent, Session, FieldId, ShowFlags,152 RecurseFlags);153}154 155template <typename ArgType>156void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,157 IDiaSymbol *Symbol,158 HRESULT (__stdcall IDiaSymbol::*Method)(ArgType *)) {159 ArgType Value;160 if (S_OK == (Symbol->*Method)(&Value))161 dumpSymbolField(OS, Name, Value, Indent);162}163 164void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,165 IDiaSymbol *Symbol,166 HRESULT (__stdcall IDiaSymbol::*Method)(BSTR *)) {167 BSTR Value = nullptr;168 if (S_OK != (Symbol->*Method)(&Value))169 return;170 const char *Bytes = reinterpret_cast<const char *>(Value);171 ArrayRef<char> ByteArray(Bytes, ::SysStringByteLen(Value));172 std::string Result;173 if (llvm::convertUTF16ToUTF8String(ByteArray, Result))174 dumpSymbolField(OS, Name, Result, Indent);175 ::SysFreeString(Value);176}177 178void DumpDIAValue(llvm::raw_ostream &OS, int Indent, StringRef Name,179 IDiaSymbol *Symbol,180 HRESULT (__stdcall IDiaSymbol::*Method)(VARIANT *)) {181 VARIANT Value;182 Value.vt = VT_EMPTY;183 if (S_OK != (Symbol->*Method)(&Value))184 return;185 Variant V = VariantFromVARIANT(Value);186 187 dumpSymbolField(OS, Name, V, Indent);188}189} // namespace190 191namespace llvm {192llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const GUID &G) {193 StringRef GuidBytes(reinterpret_cast<const char *>(&G), sizeof(G));194 codeview::detail::GuidAdapter A(GuidBytes);195 A.format(OS, "");196 return OS;197}198} // namespace llvm199 200DIARawSymbol::DIARawSymbol(const DIASession &PDBSession,201 CComPtr<IDiaSymbol> DiaSymbol)202 : Session(PDBSession), Symbol(DiaSymbol) {}203 204#define RAW_ID_METHOD_DUMP(Stream, Method, Session, FieldId, ShowFlags, \205 RecurseFlags) \206 DumpDIAIdValue(Stream, Indent, StringRef{#Method}, Symbol, \207 &IDiaSymbol::get_##Method, Session, FieldId, ShowFlags, \208 RecurseFlags);209 210#define RAW_METHOD_DUMP(Stream, Method) \211 DumpDIAValue(Stream, Indent, StringRef{#Method}, Symbol, \212 &IDiaSymbol::get_##Method);213 214#define RAW_METHOD_DUMP_AS(Stream, Method, Type) \215 DumpDIAValueAs<Type>(Stream, Indent, StringRef{#Method}, Symbol, \216 &IDiaSymbol::get_##Method);217 218void DIARawSymbol::dump(raw_ostream &OS, int Indent,219 PdbSymbolIdField ShowIdFields,220 PdbSymbolIdField RecurseIdFields) const {221 RAW_ID_METHOD_DUMP(OS, symIndexId, Session, PdbSymbolIdField::SymIndexId,222 ShowIdFields, RecurseIdFields);223 RAW_METHOD_DUMP_AS(OS, symTag, PDB_SymType);224 225 RAW_METHOD_DUMP(OS, access);226 RAW_METHOD_DUMP(OS, addressOffset);227 RAW_METHOD_DUMP(OS, addressSection);228 RAW_METHOD_DUMP(OS, age);229 RAW_METHOD_DUMP(OS, arrayIndexTypeId);230 RAW_METHOD_DUMP(OS, backEndMajor);231 RAW_METHOD_DUMP(OS, backEndMinor);232 RAW_METHOD_DUMP(OS, backEndBuild);233 RAW_METHOD_DUMP(OS, backEndQFE);234 RAW_METHOD_DUMP(OS, baseDataOffset);235 RAW_METHOD_DUMP(OS, baseDataSlot);236 RAW_METHOD_DUMP(OS, baseSymbolId);237 RAW_METHOD_DUMP_AS(OS, baseType, PDB_BuiltinType);238 RAW_METHOD_DUMP(OS, bitPosition);239 RAW_METHOD_DUMP_AS(OS, callingConvention, PDB_CallingConv);240 RAW_ID_METHOD_DUMP(OS, classParentId, Session, PdbSymbolIdField::ClassParent,241 ShowIdFields, RecurseIdFields);242 RAW_METHOD_DUMP(OS, compilerName);243 RAW_METHOD_DUMP(OS, count);244 RAW_METHOD_DUMP(OS, countLiveRanges);245 RAW_METHOD_DUMP(OS, frontEndMajor);246 RAW_METHOD_DUMP(OS, frontEndMinor);247 RAW_METHOD_DUMP(OS, frontEndBuild);248 RAW_METHOD_DUMP(OS, frontEndQFE);249 RAW_ID_METHOD_DUMP(OS, lexicalParentId, Session,250 PdbSymbolIdField::LexicalParent, ShowIdFields,251 RecurseIdFields);252 RAW_METHOD_DUMP(OS, libraryName);253 RAW_METHOD_DUMP(OS, liveRangeStartAddressOffset);254 RAW_METHOD_DUMP(OS, liveRangeStartAddressSection);255 RAW_METHOD_DUMP(OS, liveRangeStartRelativeVirtualAddress);256 RAW_METHOD_DUMP(OS, localBasePointerRegisterId);257 RAW_METHOD_DUMP(OS, lowerBoundId);258 RAW_METHOD_DUMP(OS, memorySpaceKind);259 RAW_METHOD_DUMP(OS, name);260 RAW_METHOD_DUMP(OS, numberOfAcceleratorPointerTags);261 RAW_METHOD_DUMP(OS, numberOfColumns);262 RAW_METHOD_DUMP(OS, numberOfModifiers);263 RAW_METHOD_DUMP(OS, numberOfRegisterIndices);264 RAW_METHOD_DUMP(OS, numberOfRows);265 RAW_METHOD_DUMP(OS, objectFileName);266 RAW_METHOD_DUMP(OS, oemId);267 RAW_METHOD_DUMP(OS, oemSymbolId);268 RAW_METHOD_DUMP(OS, offsetInUdt);269 RAW_METHOD_DUMP(OS, platform);270 RAW_METHOD_DUMP(OS, rank);271 RAW_METHOD_DUMP(OS, registerId);272 RAW_METHOD_DUMP(OS, registerType);273 RAW_METHOD_DUMP(OS, relativeVirtualAddress);274 RAW_METHOD_DUMP(OS, samplerSlot);275 RAW_METHOD_DUMP(OS, signature);276 RAW_METHOD_DUMP(OS, sizeInUdt);277 RAW_METHOD_DUMP(OS, slot);278 RAW_METHOD_DUMP(OS, sourceFileName);279 RAW_METHOD_DUMP(OS, stride);280 RAW_METHOD_DUMP(OS, subTypeId);281 RAW_METHOD_DUMP(OS, symbolsFileName);282 RAW_METHOD_DUMP(OS, targetOffset);283 RAW_METHOD_DUMP(OS, targetRelativeVirtualAddress);284 RAW_METHOD_DUMP(OS, targetVirtualAddress);285 RAW_METHOD_DUMP(OS, targetSection);286 RAW_METHOD_DUMP(OS, textureSlot);287 RAW_METHOD_DUMP(OS, timeStamp);288 RAW_METHOD_DUMP(OS, token);289 RAW_ID_METHOD_DUMP(OS, typeId, Session, PdbSymbolIdField::Type, ShowIdFields,290 RecurseIdFields);291 RAW_METHOD_DUMP(OS, uavSlot);292 RAW_METHOD_DUMP(OS, undecoratedName);293 RAW_ID_METHOD_DUMP(OS, unmodifiedTypeId, Session,294 PdbSymbolIdField::UnmodifiedType, ShowIdFields,295 RecurseIdFields);296 RAW_METHOD_DUMP(OS, upperBoundId);297 RAW_METHOD_DUMP(OS, virtualBaseDispIndex);298 RAW_METHOD_DUMP(OS, virtualBaseOffset);299 RAW_METHOD_DUMP(OS, virtualTableShapeId);300 RAW_METHOD_DUMP_AS(OS, dataKind, PDB_DataKind);301 RAW_METHOD_DUMP(OS, guid);302 RAW_METHOD_DUMP(OS, offset);303 RAW_METHOD_DUMP(OS, thisAdjust);304 RAW_METHOD_DUMP(OS, virtualBasePointerOffset);305 RAW_METHOD_DUMP_AS(OS, locationType, PDB_LocType);306 RAW_METHOD_DUMP(OS, machineType);307 RAW_METHOD_DUMP(OS, thunkOrdinal);308 RAW_METHOD_DUMP(OS, length);309 RAW_METHOD_DUMP(OS, liveRangeLength);310 RAW_METHOD_DUMP(OS, virtualAddress);311 RAW_METHOD_DUMP_AS(OS, udtKind, PDB_UdtType);312 RAW_METHOD_DUMP(OS, constructor);313 RAW_METHOD_DUMP(OS, customCallingConvention);314 RAW_METHOD_DUMP(OS, farReturn);315 RAW_METHOD_DUMP(OS, code);316 RAW_METHOD_DUMP(OS, compilerGenerated);317 RAW_METHOD_DUMP(OS, constType);318 RAW_METHOD_DUMP(OS, editAndContinueEnabled);319 RAW_METHOD_DUMP(OS, function);320 RAW_METHOD_DUMP(OS, stride);321 RAW_METHOD_DUMP(OS, noStackOrdering);322 RAW_METHOD_DUMP(OS, hasAlloca);323 RAW_METHOD_DUMP(OS, hasAssignmentOperator);324 RAW_METHOD_DUMP(OS, isCTypes);325 RAW_METHOD_DUMP(OS, hasCastOperator);326 RAW_METHOD_DUMP(OS, hasDebugInfo);327 RAW_METHOD_DUMP(OS, hasEH);328 RAW_METHOD_DUMP(OS, hasEHa);329 RAW_METHOD_DUMP(OS, hasInlAsm);330 RAW_METHOD_DUMP(OS, framePointerPresent);331 RAW_METHOD_DUMP(OS, inlSpec);332 RAW_METHOD_DUMP(OS, interruptReturn);333 RAW_METHOD_DUMP(OS, hasLongJump);334 RAW_METHOD_DUMP(OS, hasManagedCode);335 RAW_METHOD_DUMP(OS, hasNestedTypes);336 RAW_METHOD_DUMP(OS, noInline);337 RAW_METHOD_DUMP(OS, noReturn);338 RAW_METHOD_DUMP(OS, optimizedCodeDebugInfo);339 RAW_METHOD_DUMP(OS, overloadedOperator);340 RAW_METHOD_DUMP(OS, hasSEH);341 RAW_METHOD_DUMP(OS, hasSecurityChecks);342 RAW_METHOD_DUMP(OS, hasSetJump);343 RAW_METHOD_DUMP(OS, strictGSCheck);344 RAW_METHOD_DUMP(OS, isAcceleratorGroupSharedLocal);345 RAW_METHOD_DUMP(OS, isAcceleratorPointerTagLiveRange);346 RAW_METHOD_DUMP(OS, isAcceleratorStubFunction);347 RAW_METHOD_DUMP(OS, isAggregated);348 RAW_METHOD_DUMP(OS, intro);349 RAW_METHOD_DUMP(OS, isCVTCIL);350 RAW_METHOD_DUMP(OS, isConstructorVirtualBase);351 RAW_METHOD_DUMP(OS, isCxxReturnUdt);352 RAW_METHOD_DUMP(OS, isDataAligned);353 RAW_METHOD_DUMP(OS, isHLSLData);354 RAW_METHOD_DUMP(OS, isHotpatchable);355 RAW_METHOD_DUMP(OS, indirectVirtualBaseClass);356 RAW_METHOD_DUMP(OS, isInterfaceUdt);357 RAW_METHOD_DUMP(OS, intrinsic);358 RAW_METHOD_DUMP(OS, isLTCG);359 RAW_METHOD_DUMP(OS, isLocationControlFlowDependent);360 RAW_METHOD_DUMP(OS, isMSILNetmodule);361 RAW_METHOD_DUMP(OS, isMatrixRowMajor);362 RAW_METHOD_DUMP(OS, managed);363 RAW_METHOD_DUMP(OS, msil);364 RAW_METHOD_DUMP(OS, isMultipleInheritance);365 RAW_METHOD_DUMP(OS, isNaked);366 RAW_METHOD_DUMP(OS, nested);367 RAW_METHOD_DUMP(OS, isOptimizedAway);368 RAW_METHOD_DUMP(OS, packed);369 RAW_METHOD_DUMP(OS, isPointerBasedOnSymbolValue);370 RAW_METHOD_DUMP(OS, isPointerToDataMember);371 RAW_METHOD_DUMP(OS, isPointerToMemberFunction);372 RAW_METHOD_DUMP(OS, pure);373 RAW_METHOD_DUMP(OS, RValueReference);374 RAW_METHOD_DUMP(OS, isRefUdt);375 RAW_METHOD_DUMP(OS, reference);376 RAW_METHOD_DUMP(OS, restrictedType);377 RAW_METHOD_DUMP(OS, isReturnValue);378 RAW_METHOD_DUMP(OS, isSafeBuffers);379 RAW_METHOD_DUMP(OS, scoped);380 RAW_METHOD_DUMP(OS, isSdl);381 RAW_METHOD_DUMP(OS, isSingleInheritance);382 RAW_METHOD_DUMP(OS, isSplitted);383 RAW_METHOD_DUMP(OS, isStatic);384 RAW_METHOD_DUMP(OS, isStripped);385 RAW_METHOD_DUMP(OS, unalignedType);386 RAW_METHOD_DUMP(OS, notReached);387 RAW_METHOD_DUMP(OS, isValueUdt);388 RAW_METHOD_DUMP(OS, virtual);389 RAW_METHOD_DUMP(OS, virtualBaseClass);390 RAW_METHOD_DUMP(OS, isVirtualInheritance);391 RAW_METHOD_DUMP(OS, volatileType);392 RAW_METHOD_DUMP(OS, wasInlined);393 RAW_METHOD_DUMP(OS, unused);394 RAW_METHOD_DUMP(OS, value);395}396 397std::unique_ptr<IPDBEnumSymbols>398DIARawSymbol::findChildren(PDB_SymType Type) const {399 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);400 401 CComPtr<IDiaEnumSymbols> DiaEnumerator;402 if (S_OK !=403 Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator)) {404 if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator))405 return nullptr;406 }407 408 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);409}410 411std::unique_ptr<IPDBEnumSymbols>412DIARawSymbol::findChildren(PDB_SymType Type, StringRef Name,413 PDB_NameSearchFlags Flags) const {414 llvm::SmallVector<UTF16, 32> Name16;415 llvm::convertUTF8ToUTF16String(Name, Name16);416 417 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);418 DWORD CompareFlags = static_cast<DWORD>(Flags);419 wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());420 421 CComPtr<IDiaEnumSymbols> DiaEnumerator;422 if (S_OK !=423 Symbol->findChildrenEx(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))424 return nullptr;425 426 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);427}428 429std::unique_ptr<IPDBEnumSymbols>430DIARawSymbol::findChildrenByAddr(PDB_SymType Type, StringRef Name,431 PDB_NameSearchFlags Flags, uint32_t Section,432 uint32_t Offset) const {433 llvm::SmallVector<UTF16, 32> Name16;434 llvm::convertUTF8ToUTF16String(Name, Name16);435 436 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);437 438 DWORD CompareFlags = static_cast<DWORD>(Flags);439 wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());440 441 CComPtr<IDiaEnumSymbols> DiaEnumerator;442 if (S_OK != Symbol->findChildrenExByAddr(EnumVal, Name16Str, CompareFlags,443 Section, Offset, &DiaEnumerator))444 return nullptr;445 446 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);447}448 449std::unique_ptr<IPDBEnumSymbols>450DIARawSymbol::findChildrenByVA(PDB_SymType Type, StringRef Name,451 PDB_NameSearchFlags Flags, uint64_t VA) const {452 llvm::SmallVector<UTF16, 32> Name16;453 llvm::convertUTF8ToUTF16String(Name, Name16);454 455 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);456 457 DWORD CompareFlags = static_cast<DWORD>(Flags);458 wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());459 460 CComPtr<IDiaEnumSymbols> DiaEnumerator;461 if (S_OK != Symbol->findChildrenExByVA(EnumVal, Name16Str, CompareFlags, VA,462 &DiaEnumerator))463 return nullptr;464 465 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);466}467 468std::unique_ptr<IPDBEnumSymbols>469DIARawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name,470 PDB_NameSearchFlags Flags, uint32_t RVA) const {471 llvm::SmallVector<UTF16, 32> Name16;472 llvm::convertUTF8ToUTF16String(Name, Name16);473 474 enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);475 DWORD CompareFlags = static_cast<DWORD>(Flags);476 wchar_t *Name16Str = reinterpret_cast<wchar_t *>(Name16.data());477 478 CComPtr<IDiaEnumSymbols> DiaEnumerator;479 if (S_OK != Symbol->findChildrenExByRVA(EnumVal, Name16Str, CompareFlags, RVA,480 &DiaEnumerator))481 return nullptr;482 483 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);484}485 486std::unique_ptr<IPDBEnumSymbols>487DIARawSymbol::findInlineFramesByAddr(uint32_t Section, uint32_t Offset) const {488 CComPtr<IDiaEnumSymbols> DiaEnumerator;489 if (S_OK != Symbol->findInlineFramesByAddr(Section, Offset, &DiaEnumerator))490 return nullptr;491 492 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);493}494 495std::unique_ptr<IPDBEnumSymbols>496DIARawSymbol::findInlineFramesByRVA(uint32_t RVA) const {497 CComPtr<IDiaEnumSymbols> DiaEnumerator;498 if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator))499 return nullptr;500 501 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);502}503 504std::unique_ptr<IPDBEnumSymbols>505DIARawSymbol::findInlineFramesByVA(uint64_t VA) const {506 CComPtr<IDiaEnumSymbols> DiaEnumerator;507 if (S_OK != Symbol->findInlineFramesByVA(VA, &DiaEnumerator))508 return nullptr;509 510 return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);511}512 513std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {514 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;515 if (S_OK != Symbol->findInlineeLines(&DiaEnumerator))516 return nullptr;517 518 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);519}520 521std::unique_ptr<IPDBEnumLineNumbers>522DIARawSymbol::findInlineeLinesByAddr(uint32_t Section, uint32_t Offset,523 uint32_t Length) const {524 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;525 if (S_OK !=526 Symbol->findInlineeLinesByAddr(Section, Offset, Length, &DiaEnumerator))527 return nullptr;528 529 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);530}531 532std::unique_ptr<IPDBEnumLineNumbers>533DIARawSymbol::findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const {534 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;535 if (S_OK != Symbol->findInlineeLinesByRVA(RVA, Length, &DiaEnumerator))536 return nullptr;537 538 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);539}540 541std::unique_ptr<IPDBEnumLineNumbers>542DIARawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const {543 CComPtr<IDiaEnumLineNumbers> DiaEnumerator;544 if (S_OK != Symbol->findInlineeLinesByVA(VA, Length, &DiaEnumerator))545 return nullptr;546 547 return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);548}549 550void DIARawSymbol::getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes) const {551 bytes.clear();552 553 DWORD DataSize = 0;554 Symbol->get_dataBytes(0, &DataSize, nullptr);555 if (DataSize == 0)556 return;557 558 bytes.resize(DataSize);559 Symbol->get_dataBytes(DataSize, &DataSize, bytes.data());560}561 562std::string DIARawSymbol::getUndecoratedNameEx(PDB_UndnameFlags Flags) const {563 CComBSTR Result16;564 if (S_OK != Symbol->get_undecoratedNameEx((DWORD)Flags, &Result16))565 return std::string();566 567 const char *SrcBytes = reinterpret_cast<const char *>(Result16.m_str);568 llvm::ArrayRef<char> SrcByteArray(SrcBytes, Result16.ByteLength());569 std::string Result8;570 if (!llvm::convertUTF16ToUTF8String(SrcByteArray, Result8))571 return std::string();572 return Result8;573}574 575PDB_MemberAccess DIARawSymbol::getAccess() const {576 return PrivateGetDIAValue<DWORD, PDB_MemberAccess>(Symbol,577 &IDiaSymbol::get_access);578}579 580uint32_t DIARawSymbol::getAddressOffset() const {581 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressOffset);582}583 584uint32_t DIARawSymbol::getAddressSection() const {585 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressSection);586}587 588uint32_t DIARawSymbol::getAge() const {589 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_age);590}591 592SymIndexId DIARawSymbol::getArrayIndexTypeId() const {593 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_arrayIndexTypeId);594}595 596void DIARawSymbol::getBackEndVersion(VersionInfo &Version) const {597 Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMajor);598 Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndMinor);599 Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndBuild);600 Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_backEndQFE);601}602 603uint32_t DIARawSymbol::getBaseDataOffset() const {604 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataOffset);605}606 607uint32_t DIARawSymbol::getBaseDataSlot() const {608 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataSlot);609}610 611SymIndexId DIARawSymbol::getBaseSymbolId() const {612 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseSymbolId);613}614 615PDB_BuiltinType DIARawSymbol::getBuiltinType() const {616 return PrivateGetDIAValue<DWORD, PDB_BuiltinType>(Symbol,617 &IDiaSymbol::get_baseType);618}619 620uint32_t DIARawSymbol::getBitPosition() const {621 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_bitPosition);622}623 624PDB_CallingConv DIARawSymbol::getCallingConvention() const {625 return PrivateGetDIAValue<DWORD, PDB_CallingConv>(626 Symbol, &IDiaSymbol::get_callingConvention);627}628 629SymIndexId DIARawSymbol::getClassParentId() const {630 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_classParentId);631}632 633std::string DIARawSymbol::getCompilerName() const {634 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerName);635}636 637uint32_t DIARawSymbol::getCount() const {638 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_count);639}640 641uint32_t DIARawSymbol::getCountLiveRanges() const {642 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_countLiveRanges);643}644 645void DIARawSymbol::getFrontEndVersion(VersionInfo &Version) const {646 Version.Major = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMajor);647 Version.Minor = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndMinor);648 Version.Build = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndBuild);649 Version.QFE = PrivateGetDIAValue(Symbol, &IDiaSymbol::get_frontEndQFE);650}651 652PDB_Lang DIARawSymbol::getLanguage() const {653 return PrivateGetDIAValue<DWORD, PDB_Lang>(Symbol, &IDiaSymbol::get_language);654}655 656SymIndexId DIARawSymbol::getLexicalParentId() const {657 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lexicalParentId);658}659 660std::string DIARawSymbol::getLibraryName() const {661 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_libraryName);662}663 664uint32_t DIARawSymbol::getLiveRangeStartAddressOffset() const {665 return PrivateGetDIAValue(Symbol,666 &IDiaSymbol::get_liveRangeStartAddressOffset);667}668 669uint32_t DIARawSymbol::getLiveRangeStartAddressSection() const {670 return PrivateGetDIAValue(Symbol,671 &IDiaSymbol::get_liveRangeStartAddressSection);672}673 674uint32_t DIARawSymbol::getLiveRangeStartRelativeVirtualAddress() const {675 return PrivateGetDIAValue(676 Symbol, &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress);677}678 679codeview::RegisterId DIARawSymbol::getLocalBasePointerRegisterId() const {680 return PrivateGetDIAValue<DWORD, codeview::RegisterId>(681 Symbol, &IDiaSymbol::get_localBasePointerRegisterId);682}683 684SymIndexId DIARawSymbol::getLowerBoundId() const {685 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lowerBoundId);686}687 688uint32_t DIARawSymbol::getMemorySpaceKind() const {689 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_memorySpaceKind);690}691 692std::string DIARawSymbol::getName() const {693 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_name);694}695 696uint32_t DIARawSymbol::getNumberOfAcceleratorPointerTags() const {697 return PrivateGetDIAValue(Symbol,698 &IDiaSymbol::get_numberOfAcceleratorPointerTags);699}700 701uint32_t DIARawSymbol::getNumberOfColumns() const {702 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfColumns);703}704 705uint32_t DIARawSymbol::getNumberOfModifiers() const {706 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfModifiers);707}708 709uint32_t DIARawSymbol::getNumberOfRegisterIndices() const {710 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRegisterIndices);711}712 713uint32_t DIARawSymbol::getNumberOfRows() const {714 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_numberOfRows);715}716 717std::string DIARawSymbol::getObjectFileName() const {718 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_objectFileName);719}720 721uint32_t DIARawSymbol::getOemId() const {722 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemId);723}724 725SymIndexId DIARawSymbol::getOemSymbolId() const {726 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemSymbolId);727}728 729uint32_t DIARawSymbol::getOffsetInUdt() const {730 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offsetInUdt);731}732 733PDB_Cpu DIARawSymbol::getPlatform() const {734 return PrivateGetDIAValue<DWORD, PDB_Cpu>(Symbol, &IDiaSymbol::get_platform);735}736 737uint32_t DIARawSymbol::getRank() const {738 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_rank);739}740 741codeview::RegisterId DIARawSymbol::getRegisterId() const {742 return PrivateGetDIAValue<DWORD, codeview::RegisterId>(743 Symbol, &IDiaSymbol::get_registerId);744}745 746uint32_t DIARawSymbol::getRegisterType() const {747 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_registerType);748}749 750uint32_t DIARawSymbol::getRelativeVirtualAddress() const {751 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_relativeVirtualAddress);752}753 754uint32_t DIARawSymbol::getSamplerSlot() const {755 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_samplerSlot);756}757 758uint32_t DIARawSymbol::getSignature() const {759 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_signature);760}761 762uint32_t DIARawSymbol::getSizeInUdt() const {763 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sizeInUdt);764}765 766uint32_t DIARawSymbol::getSlot() const {767 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_slot);768}769 770std::string DIARawSymbol::getSourceFileName() const {771 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sourceFileName);772}773 774std::unique_ptr<IPDBLineNumber> DIARawSymbol::getSrcLineOnTypeDefn() const {775 CComPtr<IDiaLineNumber> LineNumber;776 if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)777 return nullptr;778 779 return std::make_unique<DIALineNumber>(LineNumber);780}781 782uint32_t DIARawSymbol::getStride() const {783 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);784}785 786SymIndexId DIARawSymbol::getSubTypeId() const {787 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_subTypeId);788}789 790std::string DIARawSymbol::getSymbolsFileName() const {791 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symbolsFileName);792}793 794SymIndexId DIARawSymbol::getSymIndexId() const {795 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symIndexId);796}797 798uint32_t DIARawSymbol::getTargetOffset() const {799 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetOffset);800}801 802uint32_t DIARawSymbol::getTargetRelativeVirtualAddress() const {803 return PrivateGetDIAValue(Symbol,804 &IDiaSymbol::get_targetRelativeVirtualAddress);805}806 807uint64_t DIARawSymbol::getTargetVirtualAddress() const {808 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetVirtualAddress);809}810 811uint32_t DIARawSymbol::getTargetSection() const {812 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_targetSection);813}814 815uint32_t DIARawSymbol::getTextureSlot() const {816 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_textureSlot);817}818 819uint32_t DIARawSymbol::getTimeStamp() const {820 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_timeStamp);821}822 823uint32_t DIARawSymbol::getToken() const {824 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_token);825}826 827SymIndexId DIARawSymbol::getTypeId() const {828 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_typeId);829}830 831uint32_t DIARawSymbol::getUavSlot() const {832 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_uavSlot);833}834 835std::string DIARawSymbol::getUndecoratedName() const {836 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_undecoratedName);837}838 839SymIndexId DIARawSymbol::getUnmodifiedTypeId() const {840 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unmodifiedTypeId);841}842 843SymIndexId DIARawSymbol::getUpperBoundId() const {844 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_upperBoundId);845}846 847Variant DIARawSymbol::getValue() const {848 VARIANT Value;849 Value.vt = VT_EMPTY;850 if (S_OK != Symbol->get_value(&Value))851 return Variant();852 853 return VariantFromVARIANT(Value);854}855 856uint32_t DIARawSymbol::getVirtualBaseDispIndex() const {857 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseDispIndex);858}859 860uint32_t DIARawSymbol::getVirtualBaseOffset() const {861 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseOffset);862}863 864SymIndexId DIARawSymbol::getVirtualTableShapeId() const {865 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualTableShapeId);866}867 868std::unique_ptr<PDBSymbolTypeBuiltin>869DIARawSymbol::getVirtualBaseTableType() const {870 CComPtr<IDiaSymbol> TableType;871 if (FAILED(Symbol->get_virtualBaseTableType(&TableType)) || !TableType)872 return nullptr;873 874 auto RawVT = std::make_unique<DIARawSymbol>(Session, TableType);875 auto Pointer =876 PDBSymbol::createAs<PDBSymbolTypePointer>(Session, std::move(RawVT));877 return unique_dyn_cast<PDBSymbolTypeBuiltin>(Pointer->getPointeeType());878}879 880PDB_DataKind DIARawSymbol::getDataKind() const {881 return PrivateGetDIAValue<DWORD, PDB_DataKind>(Symbol,882 &IDiaSymbol::get_dataKind);883}884 885PDB_SymType DIARawSymbol::getSymTag() const {886 return PrivateGetDIAValue<DWORD, PDB_SymType>(Symbol,887 &IDiaSymbol::get_symTag);888}889 890codeview::GUID DIARawSymbol::getGuid() const {891 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_guid);892}893 894int32_t DIARawSymbol::getOffset() const {895 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_offset);896}897 898int32_t DIARawSymbol::getThisAdjust() const {899 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_thisAdjust);900}901 902int32_t DIARawSymbol::getVirtualBasePointerOffset() const {903 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBasePointerOffset);904}905 906PDB_LocType DIARawSymbol::getLocationType() const {907 return PrivateGetDIAValue<DWORD, PDB_LocType>(Symbol,908 &IDiaSymbol::get_locationType);909}910 911PDB_Machine DIARawSymbol::getMachineType() const {912 return PrivateGetDIAValue<DWORD, PDB_Machine>(Symbol,913 &IDiaSymbol::get_machineType);914}915 916codeview::ThunkOrdinal DIARawSymbol::getThunkOrdinal() const {917 return PrivateGetDIAValue<DWORD, codeview::ThunkOrdinal>(918 Symbol, &IDiaSymbol::get_thunkOrdinal);919}920 921uint64_t DIARawSymbol::getLength() const {922 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_length);923}924 925uint64_t DIARawSymbol::getLiveRangeLength() const {926 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_liveRangeLength);927}928 929uint64_t DIARawSymbol::getVirtualAddress() const {930 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualAddress);931}932 933PDB_UdtType DIARawSymbol::getUdtKind() const {934 return PrivateGetDIAValue<DWORD, PDB_UdtType>(Symbol,935 &IDiaSymbol::get_udtKind);936}937 938bool DIARawSymbol::hasConstructor() const {939 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constructor);940}941 942bool DIARawSymbol::hasCustomCallingConvention() const {943 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_customCallingConvention);944}945 946bool DIARawSymbol::hasFarReturn() const {947 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_farReturn);948}949 950bool DIARawSymbol::isCode() const {951 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_code);952}953 954bool DIARawSymbol::isCompilerGenerated() const {955 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_compilerGenerated);956}957 958bool DIARawSymbol::isConstType() const {959 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_constType);960}961 962bool DIARawSymbol::isEditAndContinueEnabled() const {963 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_editAndContinueEnabled);964}965 966bool DIARawSymbol::isFunction() const {967 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_function);968}969 970bool DIARawSymbol::getAddressTaken() const {971 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_addressTaken);972}973 974bool DIARawSymbol::getNoStackOrdering() const {975 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noStackOrdering);976}977 978bool DIARawSymbol::hasAlloca() const {979 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAlloca);980}981 982bool DIARawSymbol::hasAssignmentOperator() const {983 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasAssignmentOperator);984}985 986bool DIARawSymbol::hasCTypes() const {987 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCTypes);988}989 990bool DIARawSymbol::hasCastOperator() const {991 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasCastOperator);992}993 994bool DIARawSymbol::hasDebugInfo() const {995 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasDebugInfo);996}997 998bool DIARawSymbol::hasEH() const {999 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEH);1000}1001 1002bool DIARawSymbol::hasEHa() const {1003 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasEHa);1004}1005 1006bool DIARawSymbol::hasInlAsm() const {1007 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasInlAsm);1008}1009 1010bool DIARawSymbol::hasInlineAttribute() const {1011 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_inlSpec);1012}1013 1014bool DIARawSymbol::hasInterruptReturn() const {1015 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_interruptReturn);1016}1017 1018bool DIARawSymbol::hasFramePointer() const {1019 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_framePointerPresent);1020}1021 1022bool DIARawSymbol::hasLongJump() const {1023 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasLongJump);1024}1025 1026bool DIARawSymbol::hasManagedCode() const {1027 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasManagedCode);1028}1029 1030bool DIARawSymbol::hasNestedTypes() const {1031 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasNestedTypes);1032}1033 1034bool DIARawSymbol::hasNoInlineAttribute() const {1035 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noInline);1036}1037 1038bool DIARawSymbol::hasNoReturnAttribute() const {1039 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_noReturn);1040}1041 1042bool DIARawSymbol::hasOptimizedCodeDebugInfo() const {1043 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_optimizedCodeDebugInfo);1044}1045 1046bool DIARawSymbol::hasOverloadedOperator() const {1047 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_overloadedOperator);1048}1049 1050bool DIARawSymbol::hasSEH() const {1051 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSEH);1052}1053 1054bool DIARawSymbol::hasSecurityChecks() const {1055 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSecurityChecks);1056}1057 1058bool DIARawSymbol::hasSetJump() const {1059 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_hasSetJump);1060}1061 1062bool DIARawSymbol::hasStrictGSCheck() const {1063 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_strictGSCheck);1064}1065 1066bool DIARawSymbol::isAcceleratorGroupSharedLocal() const {1067 return PrivateGetDIAValue(Symbol,1068 &IDiaSymbol::get_isAcceleratorGroupSharedLocal);1069}1070 1071bool DIARawSymbol::isAcceleratorPointerTagLiveRange() const {1072 return PrivateGetDIAValue(Symbol,1073 &IDiaSymbol::get_isAcceleratorPointerTagLiveRange);1074}1075 1076bool DIARawSymbol::isAcceleratorStubFunction() const {1077 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAcceleratorStubFunction);1078}1079 1080bool DIARawSymbol::isAggregated() const {1081 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isAggregated);1082}1083 1084bool DIARawSymbol::isIntroVirtualFunction() const {1085 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intro);1086}1087 1088bool DIARawSymbol::isCVTCIL() const {1089 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCVTCIL);1090}1091 1092bool DIARawSymbol::isConstructorVirtualBase() const {1093 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isConstructorVirtualBase);1094}1095 1096bool DIARawSymbol::isCxxReturnUdt() const {1097 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isCxxReturnUdt);1098}1099 1100bool DIARawSymbol::isDataAligned() const {1101 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isDataAligned);1102}1103 1104bool DIARawSymbol::isHLSLData() const {1105 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHLSLData);1106}1107 1108bool DIARawSymbol::isHotpatchable() const {1109 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isHotpatchable);1110}1111 1112bool DIARawSymbol::isIndirectVirtualBaseClass() const {1113 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_indirectVirtualBaseClass);1114}1115 1116bool DIARawSymbol::isInterfaceUdt() const {1117 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isInterfaceUdt);1118}1119 1120bool DIARawSymbol::isIntrinsic() const {1121 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_intrinsic);1122}1123 1124bool DIARawSymbol::isLTCG() const {1125 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isLTCG);1126}1127 1128bool DIARawSymbol::isLocationControlFlowDependent() const {1129 return PrivateGetDIAValue(Symbol,1130 &IDiaSymbol::get_isLocationControlFlowDependent);1131}1132 1133bool DIARawSymbol::isMSILNetmodule() const {1134 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMSILNetmodule);1135}1136 1137bool DIARawSymbol::isMatrixRowMajor() const {1138 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMatrixRowMajor);1139}1140 1141bool DIARawSymbol::isManagedCode() const {1142 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_managed);1143}1144 1145bool DIARawSymbol::isMSILCode() const {1146 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_msil);1147}1148 1149bool DIARawSymbol::isMultipleInheritance() const {1150 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isMultipleInheritance);1151}1152 1153bool DIARawSymbol::isNaked() const {1154 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isNaked);1155}1156 1157bool DIARawSymbol::isNested() const {1158 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_nested);1159}1160 1161bool DIARawSymbol::isOptimizedAway() const {1162 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isOptimizedAway);1163}1164 1165bool DIARawSymbol::isPacked() const {1166 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_packed);1167}1168 1169bool DIARawSymbol::isPointerBasedOnSymbolValue() const {1170 return PrivateGetDIAValue(Symbol,1171 &IDiaSymbol::get_isPointerBasedOnSymbolValue);1172}1173 1174bool DIARawSymbol::isPointerToDataMember() const {1175 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToDataMember);1176}1177 1178bool DIARawSymbol::isPointerToMemberFunction() const {1179 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isPointerToMemberFunction);1180}1181 1182bool DIARawSymbol::isPureVirtual() const {1183 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_pure);1184}1185 1186bool DIARawSymbol::isRValueReference() const {1187 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_RValueReference);1188}1189 1190bool DIARawSymbol::isRefUdt() const {1191 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isRefUdt);1192}1193 1194bool DIARawSymbol::isReference() const {1195 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_reference);1196}1197 1198bool DIARawSymbol::isRestrictedType() const {1199 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_restrictedType);1200}1201 1202bool DIARawSymbol::isReturnValue() const {1203 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isReturnValue);1204}1205 1206bool DIARawSymbol::isSafeBuffers() const {1207 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSafeBuffers);1208}1209 1210bool DIARawSymbol::isScoped() const {1211 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_scoped);1212}1213 1214bool DIARawSymbol::isSdl() const {1215 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSdl);1216}1217 1218bool DIARawSymbol::isSingleInheritance() const {1219 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSingleInheritance);1220}1221 1222bool DIARawSymbol::isSplitted() const {1223 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isSplitted);1224}1225 1226bool DIARawSymbol::isStatic() const {1227 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStatic);1228}1229 1230bool DIARawSymbol::hasPrivateSymbols() const {1231 // hasPrivateSymbols is the opposite of isStripped, but we expose1232 // hasPrivateSymbols as a more intuitive interface.1233 return !PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isStripped);1234}1235 1236bool DIARawSymbol::isUnalignedType() const {1237 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unalignedType);1238}1239 1240bool DIARawSymbol::isUnreached() const {1241 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_notReached);1242}1243 1244bool DIARawSymbol::isValueUdt() const {1245 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isValueUdt);1246}1247 1248bool DIARawSymbol::isVirtual() const {1249 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtual);1250}1251 1252bool DIARawSymbol::isVirtualBaseClass() const {1253 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseClass);1254}1255 1256bool DIARawSymbol::isVirtualInheritance() const {1257 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_isVirtualInheritance);1258}1259 1260bool DIARawSymbol::isVolatileType() const {1261 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_volatileType);1262}1263 1264bool DIARawSymbol::wasInlined() const {1265 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_wasInlined);1266}1267 1268std::string DIARawSymbol::getUnused() const {1269 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unused);1270}1271