mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-03 05:41:42 +00:00
[codeview] Add support for new type records.
This adds support for parsing and dumping the following symbol types: S_LPROCREF S_ENVBLOCK S_COMPILE2 S_REGISTER S_COFFGROUP S_SECTION S_THUNK32 S_TRAMPOLINE As of this patch, the test PDB files no longer have any unknown symbol types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270628 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d8d0146e5
commit
2d4f33a508
@ -126,13 +126,10 @@ CV_SYMBOL(S_UNAMESPACE_ST , 0x1029)
|
||||
CV_SYMBOL(S_ST_MAX , 0x1100)
|
||||
|
||||
|
||||
CV_SYMBOL(S_THUNK32 , 0x1102)
|
||||
CV_SYMBOL(S_WITH32 , 0x1104)
|
||||
CV_SYMBOL(S_REGISTER , 0x1106)
|
||||
CV_SYMBOL(S_MANYREG , 0x110a)
|
||||
CV_SYMBOL(S_LPROCMIPS , 0x1114)
|
||||
CV_SYMBOL(S_GPROCMIPS , 0x1115)
|
||||
CV_SYMBOL(S_COMPILE2 , 0x1116)
|
||||
CV_SYMBOL(S_MANYREG2 , 0x1117)
|
||||
CV_SYMBOL(S_LPROCIA64 , 0x1118)
|
||||
CV_SYMBOL(S_GPROCIA64 , 0x1119)
|
||||
@ -148,12 +145,10 @@ CV_SYMBOL(S_MANREGREL , 0x1122)
|
||||
CV_SYMBOL(S_MANMANYREG2 , 0x1123)
|
||||
CV_SYMBOL(S_UNAMESPACE , 0x1124)
|
||||
CV_SYMBOL(S_DATAREF , 0x1126)
|
||||
CV_SYMBOL(S_LPROCREF , 0x1127)
|
||||
CV_SYMBOL(S_ANNOTATIONREF , 0x1128)
|
||||
CV_SYMBOL(S_TOKENREF , 0x1129)
|
||||
CV_SYMBOL(S_GMANPROC , 0x112a)
|
||||
CV_SYMBOL(S_LMANPROC , 0x112b)
|
||||
CV_SYMBOL(S_TRAMPOLINE , 0x112c)
|
||||
CV_SYMBOL(S_ATTR_FRAMEREL , 0x112e)
|
||||
CV_SYMBOL(S_ATTR_REGISTER , 0x112f)
|
||||
CV_SYMBOL(S_ATTR_REGREL , 0x1130)
|
||||
@ -164,11 +159,8 @@ CV_SYMBOL(S_SEPCODE , 0x1132)
|
||||
CV_SYMBOL(S_LOCAL_2005 , 0x1133)
|
||||
CV_SYMBOL(S_DEFRANGE_2005 , 0x1134)
|
||||
CV_SYMBOL(S_DEFRANGE2_2005, 0x1135)
|
||||
CV_SYMBOL(S_SECTION , 0x1136)
|
||||
CV_SYMBOL(S_COFFGROUP , 0x1137)
|
||||
CV_SYMBOL(S_EXPORT , 0x1138)
|
||||
CV_SYMBOL(S_DISCARDED , 0x113b)
|
||||
CV_SYMBOL(S_ENVBLOCK , 0x113d)
|
||||
|
||||
// Current symbol types for most procedures as of this writing.
|
||||
CV_SYMBOL(S_LPROCMIPS_ID , 0x1148)
|
||||
@ -179,7 +171,6 @@ CV_SYMBOL(S_GPROCIA64_ID , 0x114b)
|
||||
CV_SYMBOL(S_DEFRANGE_HLSL , 0x1150)
|
||||
CV_SYMBOL(S_GDATA_HLSL , 0x1151)
|
||||
CV_SYMBOL(S_LDATA_HLSL , 0x1152)
|
||||
CV_SYMBOL(S_FILESTATIC , 0x1153)
|
||||
CV_SYMBOL(S_LOCAL_DPC_GROUPSHARED, 0x1154)
|
||||
CV_SYMBOL(S_DEFRANGE_DPC_PTR_TAG, 0x1157)
|
||||
CV_SYMBOL(S_DPC_SYM_TAG_MAP, 0x1158)
|
||||
@ -199,6 +190,11 @@ SYMBOL_RECORD(S_END , 0x0006, ScopeEndSym)
|
||||
SYMBOL_RECORD_ALIAS(S_INLINESITE_END , 0x114e, InlineSiteEnd, ScopeEndSym)
|
||||
SYMBOL_RECORD_ALIAS(S_PROC_ID_END , 0x114f, ProcEnd, ScopeEndSym)
|
||||
|
||||
SYMBOL_RECORD(S_THUNK32 , 0x1102, Thunk32Sym)
|
||||
SYMBOL_RECORD(S_TRAMPOLINE , 0x112c, TrampolineSym)
|
||||
SYMBOL_RECORD(S_SECTION , 0x1136, SectionSym)
|
||||
SYMBOL_RECORD(S_COFFGROUP , 0x1137, CoffGroupSym)
|
||||
|
||||
SYMBOL_RECORD(S_LPROC32 , 0x110f, ProcSym)
|
||||
SYMBOL_RECORD_ALIAS(S_GPROC32 , 0x1110, GlobalProcSym, ProcSym)
|
||||
SYMBOL_RECORD_ALIAS(S_LPROC32_ID , 0x1146, ProcIdSym, ProcSym)
|
||||
@ -206,8 +202,14 @@ SYMBOL_RECORD_ALIAS(S_GPROC32_ID , 0x1147, GlobalProcIdSym, ProcSym)
|
||||
SYMBOL_RECORD_ALIAS(S_LPROC32_DPC , 0x1155, DPCProcSym, ProcSym)
|
||||
SYMBOL_RECORD_ALIAS(S_LPROC32_DPC_ID , 0x1156, DPCProcIdSym, ProcSym)
|
||||
|
||||
SYMBOL_RECORD(S_REGISTER , 0x1106, RegisterSym)
|
||||
SYMBOL_RECORD(S_PUB32 , 0x110e, PublicSym32)
|
||||
|
||||
SYMBOL_RECORD(S_PROCREF , 0x1125, ProcRefSym)
|
||||
SYMBOL_RECORD_ALIAS(S_LPROCREF, 0x1127, LocalProcRef, ProcRefSym)
|
||||
|
||||
|
||||
SYMBOL_RECORD(S_ENVBLOCK , 0x113d, EnvBlockSym)
|
||||
|
||||
SYMBOL_RECORD(S_INLINESITE , 0x114d, InlineSiteSym)
|
||||
SYMBOL_RECORD(S_LOCAL , 0x113e, LocalSym)
|
||||
@ -221,9 +223,11 @@ SYMBOL_RECORD(S_DEFRANGE_REGISTER_REL, 0x1145, DefRangeRegisterRelSym)
|
||||
SYMBOL_RECORD(S_BLOCK32 , 0x1103, BlockSym)
|
||||
SYMBOL_RECORD(S_LABEL32 , 0x1105, LabelSym)
|
||||
SYMBOL_RECORD(S_OBJNAME , 0x1101, ObjNameSym)
|
||||
SYMBOL_RECORD(S_COMPILE2 , 0x1116, Compile2Sym)
|
||||
SYMBOL_RECORD(S_COMPILE3 , 0x113c, Compile3Sym)
|
||||
SYMBOL_RECORD(S_FRAMEPROC , 0x1012, FrameProcSym)
|
||||
SYMBOL_RECORD(S_CALLSITEINFO , 0x1139, CallSiteInfoSym)
|
||||
SYMBOL_RECORD(S_FILESTATIC , 0x1153, FileStaticSym)
|
||||
SYMBOL_RECORD(S_HEAPALLOCSITE , 0x115e, HeapAllocationSiteSym)
|
||||
SYMBOL_RECORD(S_FRAMECOOKIE , 0x113a, FrameCookieSym)
|
||||
|
||||
|
@ -405,8 +405,21 @@ enum class ProcSymFlags : uint8_t {
|
||||
};
|
||||
CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ProcSymFlags)
|
||||
|
||||
/// Corresponds to COMPILESYM2::Flags bitfield.
|
||||
enum class CompileSym2Flags : uint32_t {
|
||||
EC = 1 << 8,
|
||||
NoDbgInfo = 1 << 9,
|
||||
LTCG = 1 << 10,
|
||||
NoDataAlign = 1 << 11,
|
||||
ManagedPresent = 1 << 12,
|
||||
SecurityChecks = 1 << 13,
|
||||
HotPatch = 1 << 14,
|
||||
CVTCIL = 1 << 15,
|
||||
MSILModule = 1 << 16,
|
||||
};
|
||||
|
||||
/// Corresponds to COMPILESYM3::Flags bitfield.
|
||||
enum CompileSym3Flags : uint32_t {
|
||||
enum class CompileSym3Flags : uint32_t {
|
||||
EC = 1 << 8,
|
||||
NoDbgInfo = 1 << 9,
|
||||
LTCG = 1 << 10,
|
||||
@ -446,6 +459,72 @@ enum class FrameCookieKind : uint32_t {
|
||||
XorFramePointer,
|
||||
XorR13,
|
||||
};
|
||||
|
||||
// Corresponds to CV_HREG_e enum.
|
||||
enum class RegisterId : uint16_t {
|
||||
Unknown = 0,
|
||||
VFrame = 30006,
|
||||
AL = 1,
|
||||
CL = 2,
|
||||
DL = 3,
|
||||
BL = 4,
|
||||
AH = 5,
|
||||
CH = 6,
|
||||
DH = 7,
|
||||
BH = 8,
|
||||
AX = 9,
|
||||
CX = 10,
|
||||
DX = 11,
|
||||
BX = 12,
|
||||
SP = 13,
|
||||
BP = 14,
|
||||
SI = 15,
|
||||
DI = 16,
|
||||
EAX = 17,
|
||||
ECX = 18,
|
||||
EDX = 19,
|
||||
EBX = 20,
|
||||
ESP = 21,
|
||||
EBP = 22,
|
||||
ESI = 23,
|
||||
EDI = 24,
|
||||
ES = 25,
|
||||
CS = 26,
|
||||
SS = 27,
|
||||
DS = 28,
|
||||
FS = 29,
|
||||
GS = 30,
|
||||
IP = 31,
|
||||
RAX = 328,
|
||||
RBX = 329,
|
||||
RCX = 330,
|
||||
RDX = 331,
|
||||
RSI = 332,
|
||||
RDI = 333,
|
||||
RBP = 334,
|
||||
RSP = 335,
|
||||
R8 = 336,
|
||||
R9 = 337,
|
||||
R10 = 338,
|
||||
R11 = 339,
|
||||
R12 = 340,
|
||||
R13 = 341,
|
||||
R14 = 342,
|
||||
R15 = 343,
|
||||
};
|
||||
|
||||
/// These values correspond to the THUNK_ORDINAL enumeration.
|
||||
enum class ThunkOrdinal {
|
||||
Standard,
|
||||
ThisAdjustor,
|
||||
Vcall,
|
||||
Pcode,
|
||||
UnknownLoad,
|
||||
TrampIncremental,
|
||||
BranchIsland
|
||||
};
|
||||
|
||||
enum class TrampolineType { TrampIncremental, BranchIsland };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,25 @@ template <typename T> struct serialize_vector_tail_impl {
|
||||
std::vector<T> &Item;
|
||||
};
|
||||
|
||||
struct serialize_null_term_string_array_impl {
|
||||
serialize_null_term_string_array_impl(std::vector<StringRef> &Item)
|
||||
: Item(Item) {}
|
||||
|
||||
std::error_code deserialize(ArrayRef<uint8_t> &Data) const {
|
||||
StringRef Field;
|
||||
// Stop when we run out of bytes or we hit record padding bytes.
|
||||
while (Data.front() != 0) {
|
||||
if (auto EC = consume(Data, Field))
|
||||
return EC;
|
||||
Item.push_back(Field);
|
||||
}
|
||||
Data = Data.drop_front(1);
|
||||
return std::error_code();
|
||||
}
|
||||
|
||||
std::vector<StringRef> &Item;
|
||||
};
|
||||
|
||||
template <typename T> struct serialize_arrayref_tail_impl {
|
||||
serialize_arrayref_tail_impl(ArrayRef<T> &Item) : Item(Item) {}
|
||||
|
||||
@ -158,6 +177,11 @@ serialize_array_impl<T, U> serialize_array(ArrayRef<T> &Item, U Func) {
|
||||
return serialize_array_impl<T, U>(Item, Func);
|
||||
}
|
||||
|
||||
inline serialize_null_term_string_array_impl
|
||||
serialize_null_term_string_array(std::vector<StringRef> &Item) {
|
||||
return serialize_null_term_string_array_impl(Item);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
serialize_vector_tail_impl<T> serialize_array_tail(std::vector<T> &Item) {
|
||||
return serialize_vector_tail_impl<T>(Item);
|
||||
@ -186,6 +210,10 @@ template <typename T> serialize_numeric_impl<T> serialize_numeric(T &Item) {
|
||||
// This is an array that exhausts the remainder of the input buffer.
|
||||
#define CV_ARRAY_FIELD_TAIL(I) serialize_array_tail(I)
|
||||
|
||||
// This is an array that consumes null terminated strings until a double null
|
||||
// is encountered.
|
||||
#define CV_STRING_ARRAY_NULL_TERM(I) serialize_null_term_string_array(I)
|
||||
|
||||
#define CV_NUMERIC_FIELD(I) serialize_numeric(I)
|
||||
|
||||
template <typename T, typename U>
|
||||
@ -200,6 +228,12 @@ std::error_code consume(ArrayRef<uint8_t> &Data,
|
||||
return Item.deserialize(Data);
|
||||
}
|
||||
|
||||
inline std::error_code
|
||||
consume(ArrayRef<uint8_t> &Data,
|
||||
const serialize_null_term_string_array_impl &Item) {
|
||||
return Item.deserialize(Data);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::error_code consume(ArrayRef<uint8_t> &Data,
|
||||
const serialize_vector_tail_impl<T> &Item) {
|
||||
|
@ -79,6 +79,139 @@ public:
|
||||
StringRef Name;
|
||||
};
|
||||
|
||||
// S_THUNK32
|
||||
class Thunk32Sym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle32_t Parent;
|
||||
ulittle32_t End;
|
||||
ulittle32_t Next;
|
||||
ulittle32_t Off;
|
||||
ulittle16_t Seg;
|
||||
ulittle16_t Len;
|
||||
uint8_t Ord; // ThunkOrdinal enumeration
|
||||
// Name: The null-terminated name follows.
|
||||
// Variant portion of thunk
|
||||
};
|
||||
|
||||
Thunk32Sym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H,
|
||||
StringRef Name, ArrayRef<uint8_t> VariantData)
|
||||
: SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H), Name(Name),
|
||||
VariantData(VariantData) {}
|
||||
|
||||
static ErrorOr<Thunk32Sym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
StringRef Name;
|
||||
ArrayRef<uint8_t> VariantData;
|
||||
|
||||
CV_DESERIALIZE(Data, H, Name, CV_ARRAY_FIELD_TAIL(VariantData));
|
||||
|
||||
return Thunk32Sym(Kind, RecordOffset, H, Name, VariantData);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
StringRef Name;
|
||||
ArrayRef<uint8_t> VariantData;
|
||||
};
|
||||
|
||||
// S_TRAMPOLINE
|
||||
class TrampolineSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle16_t Type; // TrampolineType enum
|
||||
ulittle16_t Size;
|
||||
ulittle32_t ThunkOff;
|
||||
ulittle32_t TargetOff;
|
||||
ulittle16_t ThunkSection;
|
||||
ulittle16_t TargetSection;
|
||||
};
|
||||
|
||||
TrampolineSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H)
|
||||
: SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H) {}
|
||||
|
||||
static ErrorOr<TrampolineSym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
|
||||
CV_DESERIALIZE(Data, H);
|
||||
|
||||
return TrampolineSym(Kind, RecordOffset, H);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
};
|
||||
|
||||
// S_SECTION
|
||||
class SectionSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle16_t SectionNumber;
|
||||
uint8_t Alignment;
|
||||
uint8_t Reserved; // Must be 0
|
||||
ulittle32_t Rva;
|
||||
ulittle32_t Length;
|
||||
ulittle32_t Characteristics;
|
||||
// Name: The null-terminated name follows.
|
||||
};
|
||||
|
||||
SectionSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H,
|
||||
StringRef Name)
|
||||
: SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H), Name(Name) {
|
||||
}
|
||||
|
||||
static ErrorOr<SectionSym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
StringRef Name;
|
||||
|
||||
CV_DESERIALIZE(Data, H, Name);
|
||||
|
||||
return SectionSym(Kind, RecordOffset, H, Name);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
StringRef Name;
|
||||
};
|
||||
|
||||
// S_COFFGROUP
|
||||
class CoffGroupSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle32_t Size;
|
||||
ulittle32_t Characteristics;
|
||||
ulittle32_t Offset;
|
||||
ulittle16_t Segment;
|
||||
// Name: The null-terminated name follows.
|
||||
};
|
||||
|
||||
CoffGroupSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H,
|
||||
StringRef Name)
|
||||
: SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H), Name(Name) {
|
||||
}
|
||||
|
||||
static ErrorOr<CoffGroupSym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
StringRef Name;
|
||||
|
||||
CV_DESERIALIZE(Data, H, Name);
|
||||
|
||||
return CoffGroupSym(Kind, RecordOffset, H, Name);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
StringRef Name;
|
||||
};
|
||||
|
||||
class ScopeEndSym : public SymbolRecord {
|
||||
public:
|
||||
ScopeEndSym(SymbolRecordKind Kind, uint32_t RecordOffset)
|
||||
@ -95,7 +228,7 @@ public:
|
||||
class CallerSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
uint32_t Count;
|
||||
ulittle32_t Count;
|
||||
};
|
||||
|
||||
CallerSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *Header,
|
||||
@ -363,7 +496,35 @@ public:
|
||||
StringRef Name;
|
||||
};
|
||||
|
||||
// S_PROCREF
|
||||
// S_REGISTER
|
||||
class RegisterSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle32_t Index; // Type index or Metadata token
|
||||
ulittle16_t Register; // RegisterId enumeration
|
||||
// Name: The null-terminated name follows.
|
||||
};
|
||||
|
||||
RegisterSym(uint32_t RecordOffset, const Hdr *H, StringRef Name)
|
||||
: SymbolRecord(SymbolRecordKind::RegisterSym), RecordOffset(RecordOffset),
|
||||
Header(*H), Name(Name) {}
|
||||
|
||||
static ErrorOr<RegisterSym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
StringRef Name;
|
||||
CV_DESERIALIZE(Data, H, Name);
|
||||
|
||||
return RegisterSym(RecordOffset, H, Name);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
StringRef Name;
|
||||
};
|
||||
|
||||
// S_PROCREF, S_LPROCREF
|
||||
class ProcRefSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
@ -794,13 +955,106 @@ public:
|
||||
StringRef Name;
|
||||
};
|
||||
|
||||
// S_ENVBLOCK
|
||||
class EnvBlockSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
uint8_t Reserved;
|
||||
// Sequence of zero terminated strings.
|
||||
};
|
||||
|
||||
EnvBlockSym(uint32_t RecordOffset, const Hdr *H,
|
||||
const std::vector<StringRef> &Fields)
|
||||
: SymbolRecord(SymbolRecordKind::EnvBlockSym), RecordOffset(RecordOffset),
|
||||
Header(*H), Fields(Fields) {}
|
||||
|
||||
static ErrorOr<EnvBlockSym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
std::vector<StringRef> Fields;
|
||||
CV_DESERIALIZE(Data, H, CV_STRING_ARRAY_NULL_TERM(Fields));
|
||||
|
||||
return EnvBlockSym(RecordOffset, H, Fields);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
std::vector<StringRef> Fields;
|
||||
};
|
||||
|
||||
// S_FILESTATIC
|
||||
class FileStaticSym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle32_t Index; // Type Index
|
||||
ulittle32_t ModFilenameOffset; // Index of mod filename in string table
|
||||
ulittle16_t Flags; // LocalSymFlags enum
|
||||
// Name: The null-terminated name follows.
|
||||
};
|
||||
|
||||
FileStaticSym(uint32_t RecordOffset, const Hdr *H, StringRef Name)
|
||||
: SymbolRecord(SymbolRecordKind::FileStaticSym),
|
||||
RecordOffset(RecordOffset), Header(*H), Name(Name) {}
|
||||
|
||||
static ErrorOr<FileStaticSym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
StringRef Name;
|
||||
CV_DESERIALIZE(Data, H, Name);
|
||||
|
||||
return FileStaticSym(RecordOffset, H, Name);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
StringRef Name;
|
||||
};
|
||||
|
||||
// S_COMPILE2
|
||||
class Compile2Sym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle32_t flags; // CompileSym2Flags enum
|
||||
uint8_t getLanguage() const { return flags & 0xFF; }
|
||||
unsigned short Machine; // CPUType enum
|
||||
unsigned short VersionFrontendMajor;
|
||||
unsigned short VersionFrontendMinor;
|
||||
unsigned short VersionFrontendBuild;
|
||||
unsigned short VersionBackendMajor;
|
||||
unsigned short VersionBackendMinor;
|
||||
unsigned short VersionBackendBuild;
|
||||
// Version: The null-terminated version string follows.
|
||||
// Optional block of zero terminated strings terminated with a double zero.
|
||||
};
|
||||
|
||||
Compile2Sym(uint32_t RecordOffset, const Hdr *H, StringRef Version)
|
||||
: SymbolRecord(SymbolRecordKind::Compile2Sym), RecordOffset(RecordOffset),
|
||||
Header(*H), Version(Version) {}
|
||||
|
||||
static ErrorOr<Compile2Sym> deserialize(SymbolRecordKind Kind,
|
||||
uint32_t RecordOffset,
|
||||
ArrayRef<uint8_t> &Data) {
|
||||
const Hdr *H = nullptr;
|
||||
StringRef Version;
|
||||
CV_DESERIALIZE(Data, H, Version);
|
||||
|
||||
return Compile2Sym(RecordOffset, H, Version);
|
||||
}
|
||||
|
||||
uint32_t RecordOffset;
|
||||
Hdr Header;
|
||||
StringRef Version;
|
||||
};
|
||||
|
||||
// S_COMPILE3
|
||||
class Compile3Sym : public SymbolRecord {
|
||||
public:
|
||||
struct Hdr {
|
||||
ulittle32_t flags; // CompileSym3Flags enum
|
||||
uint8_t getLanguage() const { return flags & 0xff; }
|
||||
ulittle16_t Machine; // CPUType
|
||||
ulittle16_t Machine; // CPUType enum
|
||||
ulittle16_t VersionFrontendMajor;
|
||||
ulittle16_t VersionFrontendMinor;
|
||||
ulittle16_t VersionFrontendBuild;
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
uint32_t getLiveRangeStartAddressOffset() const override;
|
||||
uint32_t getLiveRangeStartAddressSection() const override;
|
||||
uint32_t getLiveRangeStartRelativeVirtualAddress() const override;
|
||||
PDB_RegisterId getLocalBasePointerRegisterId() const override;
|
||||
codeview::RegisterId getLocalBasePointerRegisterId() const override;
|
||||
uint32_t getLowerBoundId() const override;
|
||||
uint32_t getMemorySpaceKind() const override;
|
||||
std::string getName() const override;
|
||||
@ -74,7 +74,7 @@ public:
|
||||
uint32_t getOffsetInUdt() const override;
|
||||
PDB_Cpu getPlatform() const override;
|
||||
uint32_t getRank() const override;
|
||||
PDB_RegisterId getRegisterId() const override;
|
||||
codeview::RegisterId getRegisterId() const override;
|
||||
uint32_t getRegisterType() const override;
|
||||
uint32_t getRelativeVirtualAddress() const override;
|
||||
uint32_t getSamplerSlot() const override;
|
||||
@ -110,7 +110,7 @@ public:
|
||||
int32_t getVirtualBasePointerOffset() const override;
|
||||
PDB_LocType getLocationType() const override;
|
||||
PDB_Machine getMachineType() const override;
|
||||
PDB_ThunkOrdinal getThunkOrdinal() const override;
|
||||
codeview::ThunkOrdinal getThunkOrdinal() const override;
|
||||
uint64_t getLength() const override;
|
||||
uint64_t getLiveRangeLength() const override;
|
||||
uint64_t getVirtualAddress() const override;
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "PDBTypes.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/DebugInfo/CodeView/CodeView.h"
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
@ -67,7 +68,7 @@ public:
|
||||
virtual uint32_t getLiveRangeStartAddressOffset() const = 0;
|
||||
virtual uint32_t getLiveRangeStartAddressSection() const = 0;
|
||||
virtual uint32_t getLiveRangeStartRelativeVirtualAddress() const = 0;
|
||||
virtual PDB_RegisterId getLocalBasePointerRegisterId() const = 0;
|
||||
virtual codeview::RegisterId getLocalBasePointerRegisterId() const = 0;
|
||||
virtual uint32_t getLowerBoundId() const = 0;
|
||||
virtual uint32_t getMemorySpaceKind() const = 0;
|
||||
virtual std::string getName() const = 0;
|
||||
@ -82,7 +83,7 @@ public:
|
||||
virtual uint32_t getOffsetInUdt() const = 0;
|
||||
virtual PDB_Cpu getPlatform() const = 0;
|
||||
virtual uint32_t getRank() const = 0;
|
||||
virtual PDB_RegisterId getRegisterId() const = 0;
|
||||
virtual codeview::RegisterId getRegisterId() const = 0;
|
||||
virtual uint32_t getRegisterType() const = 0;
|
||||
virtual uint32_t getRelativeVirtualAddress() const = 0;
|
||||
virtual uint32_t getSamplerSlot() const = 0;
|
||||
@ -118,7 +119,7 @@ public:
|
||||
virtual int32_t getVirtualBasePointerOffset() const = 0;
|
||||
virtual PDB_LocType getLocationType() const = 0;
|
||||
virtual PDB_Machine getMachineType() const = 0;
|
||||
virtual PDB_ThunkOrdinal getThunkOrdinal() const = 0;
|
||||
virtual codeview::ThunkOrdinal getThunkOrdinal() const = 0;
|
||||
virtual uint64_t getLength() const = 0;
|
||||
virtual uint64_t getLiveRangeLength() const = 0;
|
||||
virtual uint64_t getVirtualAddress() const = 0;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#define LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
|
||||
|
||||
#include "PDBTypes.h"
|
||||
#include "llvm/DebugInfo/CodeView/CodeView.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <unordered_map>
|
||||
|
||||
@ -22,9 +23,9 @@ typedef std::unordered_map<PDB_SymType, int> TagStats;
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_CallingConv &Conv);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_DataKind &Data);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_RegisterId &Reg);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const codeview::RegisterId &Reg);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_ThunkOrdinal &Thunk);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const codeview::ThunkOrdinal &Thunk);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag);
|
||||
|
@ -217,18 +217,6 @@ enum class PDB_LocType {
|
||||
Max
|
||||
};
|
||||
|
||||
/// These values correspond to the THUNK_ORDINAL enumeration, and are documented
|
||||
/// here: https://msdn.microsoft.com/en-us/library/dh0k8hft.aspx
|
||||
enum class PDB_ThunkOrdinal {
|
||||
Standard,
|
||||
ThisAdjustor,
|
||||
Vcall,
|
||||
Pcode,
|
||||
UnknownLoad,
|
||||
TrampIncremental,
|
||||
BranchIsland
|
||||
};
|
||||
|
||||
/// These values correspond to the UdtKind enumeration, and are documented
|
||||
/// here: https://msdn.microsoft.com/en-us/library/wcstk66t.aspx
|
||||
enum class PDB_UdtType { Struct, Class, Union, Interface };
|
||||
@ -264,58 +252,6 @@ enum class PDB_BuiltinType {
|
||||
HResult = 31
|
||||
};
|
||||
|
||||
enum class PDB_RegisterId {
|
||||
Unknown = 0,
|
||||
VFrame = 30006,
|
||||
AL = 1,
|
||||
CL = 2,
|
||||
DL = 3,
|
||||
BL = 4,
|
||||
AH = 5,
|
||||
CH = 6,
|
||||
DH = 7,
|
||||
BH = 8,
|
||||
AX = 9,
|
||||
CX = 10,
|
||||
DX = 11,
|
||||
BX = 12,
|
||||
SP = 13,
|
||||
BP = 14,
|
||||
SI = 15,
|
||||
DI = 16,
|
||||
EAX = 17,
|
||||
ECX = 18,
|
||||
EDX = 19,
|
||||
EBX = 20,
|
||||
ESP = 21,
|
||||
EBP = 22,
|
||||
ESI = 23,
|
||||
EDI = 24,
|
||||
ES = 25,
|
||||
CS = 26,
|
||||
SS = 27,
|
||||
DS = 28,
|
||||
FS = 29,
|
||||
GS = 30,
|
||||
IP = 31,
|
||||
RAX = 328,
|
||||
RBX = 329,
|
||||
RCX = 330,
|
||||
RDX = 331,
|
||||
RSI = 332,
|
||||
RDI = 333,
|
||||
RBP = 334,
|
||||
RSP = 335,
|
||||
R8 = 336,
|
||||
R9 = 337,
|
||||
R10 = 338,
|
||||
R11 = 339,
|
||||
R12 = 340,
|
||||
R13 = 341,
|
||||
R14 = 342,
|
||||
R15 = 343,
|
||||
};
|
||||
|
||||
enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 };
|
||||
|
||||
struct VersionInfo {
|
||||
|
@ -34,6 +34,58 @@ namespace {
|
||||
#define CV_ENUM_ENT(ns, enum) \
|
||||
{ #enum, ns::enum }
|
||||
|
||||
static const EnumEntry<uint16_t> RegisterNames[] = {
|
||||
CV_ENUM_CLASS_ENT(RegisterId, Unknown),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, VFrame),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, AL),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, CL),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, DL),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, BL),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, AH),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, CH),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, DH),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, BH),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, AX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, CX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, DX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, BX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, SP),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, BP),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, SI),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, DI),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, EAX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, ECX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, EDX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, EBX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, ESP),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, EBP),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, ESI),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, EDI),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, ES),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, CS),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, SS),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, DS),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, FS),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, GS),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, IP),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RAX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RBX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RCX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RDX),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RSI),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RDI),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RBP),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, RSP),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R8),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R9),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R10),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R11),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R12),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R13),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R14),
|
||||
CV_ENUM_CLASS_ENT(RegisterId, R15),
|
||||
};
|
||||
|
||||
static const EnumEntry<uint8_t> ProcSymFlagNames[] = {
|
||||
CV_ENUM_CLASS_ENT(ProcSymFlags, HasFP),
|
||||
CV_ENUM_CLASS_ENT(ProcSymFlags, HasIRET),
|
||||
@ -78,6 +130,18 @@ static const EnumEntry<codeview::SourceLanguage> SourceLanguages[] = {
|
||||
CV_ENUM_ENT(SourceLanguage, HLSL),
|
||||
};
|
||||
|
||||
static const EnumEntry<uint32_t> CompileSym2FlagNames[] = {
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, EC),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, NoDbgInfo),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, LTCG),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, NoDataAlign),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, ManagedPresent),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, SecurityChecks),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, HotPatch),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, CVTCIL),
|
||||
CV_ENUM_CLASS_ENT(CompileSym2Flags, MSILModule),
|
||||
};
|
||||
|
||||
static const EnumEntry<uint32_t> CompileSym3FlagNames[] = {
|
||||
CV_ENUM_CLASS_ENT(CompileSym3Flags, EC),
|
||||
CV_ENUM_CLASS_ENT(CompileSym3Flags, NoDbgInfo),
|
||||
@ -177,6 +241,21 @@ static const EnumEntry<uint32_t> FrameProcSymFlags[] = {
|
||||
CV_ENUM_CLASS_ENT(FrameProcedureOptions, GuardCfw),
|
||||
};
|
||||
|
||||
static const EnumEntry<uint8_t> ThunkOrdinalNames[] = {
|
||||
CV_ENUM_CLASS_ENT(ThunkOrdinal, Standard),
|
||||
CV_ENUM_CLASS_ENT(ThunkOrdinal, ThisAdjustor),
|
||||
CV_ENUM_CLASS_ENT(ThunkOrdinal, Vcall),
|
||||
CV_ENUM_CLASS_ENT(ThunkOrdinal, Pcode),
|
||||
CV_ENUM_CLASS_ENT(ThunkOrdinal, UnknownLoad),
|
||||
CV_ENUM_CLASS_ENT(ThunkOrdinal, TrampIncremental),
|
||||
CV_ENUM_CLASS_ENT(ThunkOrdinal, BranchIsland),
|
||||
};
|
||||
|
||||
static const EnumEntry<uint16_t> TrampolineNames[] = {
|
||||
CV_ENUM_CLASS_ENT(TrampolineType, TrampIncremental),
|
||||
CV_ENUM_CLASS_ENT(TrampolineType, BranchIsland),
|
||||
};
|
||||
|
||||
/// Use this private dumper implementation to keep implementation details about
|
||||
/// the visitor out of SymbolDumper.h.
|
||||
class CVSymbolDumperImpl : public CVSymbolVisitor<CVSymbolDumperImpl> {
|
||||
@ -254,6 +333,49 @@ void CVSymbolDumperImpl::visitBlockSym(SymbolKind Kind, BlockSym &Block) {
|
||||
W.printString("LinkageName", LinkageName);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitThunk32Sym(SymbolKind Kind, Thunk32Sym &Thunk) {
|
||||
DictScope S(W, "Thunk32");
|
||||
W.printNumber("Parent", Thunk.Header.Parent);
|
||||
W.printNumber("End", Thunk.Header.End);
|
||||
W.printNumber("Next", Thunk.Header.Next);
|
||||
W.printNumber("Off", Thunk.Header.Off);
|
||||
W.printNumber("Seg", Thunk.Header.Seg);
|
||||
W.printNumber("Len", Thunk.Header.Len);
|
||||
W.printEnum("Ordinal", Thunk.Header.Ord, makeArrayRef(ThunkOrdinalNames));
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitTrampolineSym(SymbolKind Kind,
|
||||
TrampolineSym &Tramp) {
|
||||
DictScope S(W, "Trampoline");
|
||||
W.printEnum("Type", Tramp.Header.Type, makeArrayRef(TrampolineNames));
|
||||
W.printNumber("Size", Tramp.Header.Size);
|
||||
W.printNumber("ThunkOff", Tramp.Header.ThunkOff);
|
||||
W.printNumber("TargetOff", Tramp.Header.TargetOff);
|
||||
W.printNumber("ThunkSection", Tramp.Header.ThunkSection);
|
||||
W.printNumber("TargetSection", Tramp.Header.TargetSection);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitSectionSym(SymbolKind Kind, SectionSym &Section) {
|
||||
DictScope S(W, "Section");
|
||||
W.printNumber("SectionNumber", Section.Header.SectionNumber);
|
||||
W.printNumber("Alignment", Section.Header.Alignment);
|
||||
W.printNumber("Reserved", Section.Header.Reserved);
|
||||
W.printNumber("Rva", Section.Header.Rva);
|
||||
W.printNumber("Length", Section.Header.Length);
|
||||
W.printHex("Characteristics", Section.Header.Characteristics);
|
||||
W.printString("Name", Section.Name);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitCoffGroupSym(SymbolKind Kind,
|
||||
CoffGroupSym &CoffGroup) {
|
||||
DictScope S(W, "COFF Group");
|
||||
W.printNumber("Size", CoffGroup.Header.Size);
|
||||
W.printHex("Characteristics", CoffGroup.Header.Characteristics);
|
||||
W.printNumber("Offset", CoffGroup.Header.Offset);
|
||||
W.printNumber("Segment", CoffGroup.Header.Segment);
|
||||
W.printString("Name", CoffGroup.Name);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitBPRelativeSym(SymbolKind Kind,
|
||||
BPRelativeSym &BPRel) {
|
||||
DictScope S(W, "BPRelativeSym");
|
||||
@ -287,9 +409,59 @@ void CVSymbolDumperImpl::visitCallSiteInfoSym(SymbolKind Kind,
|
||||
W.printString("LinkageName", LinkageName);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitEnvBlockSym(SymbolKind Kind,
|
||||
EnvBlockSym &EnvBlock) {
|
||||
DictScope S(W, "EnvBlock");
|
||||
|
||||
W.printNumber("Reserved", EnvBlock.Header.Reserved);
|
||||
ListScope L(W, "Entries");
|
||||
for (auto Entry : EnvBlock.Fields) {
|
||||
W.printString(Entry);
|
||||
}
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitFileStaticSym(SymbolKind Kind,
|
||||
FileStaticSym &FileStatic) {
|
||||
DictScope S(W, "FileStatic");
|
||||
W.printNumber("Index", FileStatic.Header.Index);
|
||||
W.printNumber("ModFilenameOffset", FileStatic.Header.ModFilenameOffset);
|
||||
W.printFlags("Flags", uint16_t(FileStatic.Header.Flags),
|
||||
makeArrayRef(LocalFlags));
|
||||
W.printString("Name", FileStatic.Name);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitCompile2Sym(SymbolKind Kind,
|
||||
Compile2Sym &Compile2) {
|
||||
DictScope S(W, "CompilerFlags2");
|
||||
|
||||
W.printEnum("Language", Compile2.Header.getLanguage(),
|
||||
makeArrayRef(SourceLanguages));
|
||||
W.printFlags("Flags", Compile2.Header.flags & ~0xff,
|
||||
makeArrayRef(CompileSym2FlagNames));
|
||||
W.printEnum("Machine", unsigned(Compile2.Header.Machine),
|
||||
makeArrayRef(CPUTypeNames));
|
||||
std::string FrontendVersion;
|
||||
{
|
||||
raw_string_ostream Out(FrontendVersion);
|
||||
Out << Compile2.Header.VersionFrontendMajor << '.'
|
||||
<< Compile2.Header.VersionFrontendMinor << '.'
|
||||
<< Compile2.Header.VersionFrontendBuild;
|
||||
}
|
||||
std::string BackendVersion;
|
||||
{
|
||||
raw_string_ostream Out(BackendVersion);
|
||||
Out << Compile2.Header.VersionBackendMajor << '.'
|
||||
<< Compile2.Header.VersionBackendMinor << '.'
|
||||
<< Compile2.Header.VersionBackendBuild;
|
||||
}
|
||||
W.printString("FrontendVersion", FrontendVersion);
|
||||
W.printString("BackendVersion", BackendVersion);
|
||||
W.printString("VersionName", Compile2.Version);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitCompile3Sym(SymbolKind Kind,
|
||||
Compile3Sym &Compile3) {
|
||||
DictScope S(W, "CompilerFlags");
|
||||
DictScope S(W, "CompilerFlags3");
|
||||
|
||||
W.printEnum("Language", Compile3.Header.getLanguage(),
|
||||
makeArrayRef(SourceLanguages));
|
||||
@ -537,6 +709,15 @@ void CVSymbolDumperImpl::visitInlineSiteSym(SymbolKind Kind,
|
||||
}
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitRegisterSym(SymbolKind Kind,
|
||||
RegisterSym &Register) {
|
||||
DictScope S(W, "RegisterSym");
|
||||
W.printNumber("Type", Register.Header.Index);
|
||||
W.printEnum("Seg", uint16_t(Register.Header.Register),
|
||||
makeArrayRef(RegisterNames));
|
||||
W.printString("Name", Register.Name);
|
||||
}
|
||||
|
||||
void CVSymbolDumperImpl::visitPublicSym32(SymbolKind Kind,
|
||||
PublicSym32 &Public) {
|
||||
DictScope S(W, "PublicSym");
|
||||
|
@ -534,8 +534,8 @@ uint32_t DIARawSymbol::getLiveRangeStartRelativeVirtualAddress() const {
|
||||
Symbol, &IDiaSymbol::get_liveRangeStartRelativeVirtualAddress);
|
||||
}
|
||||
|
||||
PDB_RegisterId DIARawSymbol::getLocalBasePointerRegisterId() const {
|
||||
return PrivateGetDIAValue<DWORD, PDB_RegisterId>(
|
||||
codeview::RegisterId DIARawSymbol::getLocalBasePointerRegisterId() const {
|
||||
return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
|
||||
Symbol, &IDiaSymbol::get_localBasePointerRegisterId);
|
||||
}
|
||||
|
||||
@ -596,9 +596,9 @@ uint32_t DIARawSymbol::getRank() const {
|
||||
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_rank);
|
||||
}
|
||||
|
||||
PDB_RegisterId DIARawSymbol::getRegisterId() const {
|
||||
return PrivateGetDIAValue<DWORD, PDB_RegisterId>(Symbol,
|
||||
&IDiaSymbol::get_registerId);
|
||||
codeview::RegisterId DIARawSymbol::getRegisterId() const {
|
||||
return PrivateGetDIAValue<DWORD, codeview::RegisterId>(
|
||||
Symbol, &IDiaSymbol::get_registerId);
|
||||
}
|
||||
|
||||
uint32_t DIARawSymbol::getRegisterType() const {
|
||||
@ -751,8 +751,8 @@ PDB_Machine DIARawSymbol::getMachineType() const {
|
||||
&IDiaSymbol::get_machineType);
|
||||
}
|
||||
|
||||
PDB_ThunkOrdinal DIARawSymbol::getThunkOrdinal() const {
|
||||
return PrivateGetDIAValue<DWORD, PDB_ThunkOrdinal>(
|
||||
codeview::ThunkOrdinal DIARawSymbol::getThunkOrdinal() const {
|
||||
return PrivateGetDIAValue<DWORD, codeview::ThunkOrdinal>(
|
||||
Symbol, &IDiaSymbol::get_thunkOrdinal);
|
||||
}
|
||||
|
||||
|
@ -90,55 +90,56 @@ raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_DataKind &Data) {
|
||||
return OS;
|
||||
}
|
||||
|
||||
raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_RegisterId &Reg) {
|
||||
raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
|
||||
const codeview::RegisterId &Reg) {
|
||||
switch (Reg) {
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, AL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, CL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, DL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, BL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, AH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, CH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, DH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, BH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, AX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, CX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, DX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, BX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, SP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, BP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, SI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, DI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, EAX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, ECX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, EDX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, EBX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, ESP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, EBP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, ESI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, EDI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, ES, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, CS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, SS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, DS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, FS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, GS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, IP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RAX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RBX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RCX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RDX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RSI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RDI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RBP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, RSP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R8, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R9, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R10, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R11, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R12, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R13, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R14, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, R15, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, AL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BL, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, AH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BH, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, AX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, SP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, BP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, SI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EAX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ECX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EDX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EBX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ESP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EBP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ESI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, EDI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, ES, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, CS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, SS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, DS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, FS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, GS, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, IP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RAX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RBX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RCX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RDX, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RSI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RDI, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RBP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, RSP, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R8, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R9, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R10, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R11, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R12, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R13, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R14, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::RegisterId, R15, OS)
|
||||
default:
|
||||
OS << static_cast<int>(Reg);
|
||||
}
|
||||
@ -164,15 +165,15 @@ raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_LocType &Loc) {
|
||||
}
|
||||
|
||||
raw_ostream &llvm::pdb::operator<<(raw_ostream &OS,
|
||||
const PDB_ThunkOrdinal &Thunk) {
|
||||
const codeview::ThunkOrdinal &Thunk) {
|
||||
switch (Thunk) {
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, BranchIsland, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, Pcode, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, Standard, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, ThisAdjustor, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, TrampIncremental, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, UnknownLoad, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, Vcall, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, BranchIsland, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, Pcode, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, Standard, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, ThisAdjustor, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, TrampIncremental, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, UnknownLoad, OS)
|
||||
CASE_OUTPUT_ENUM_CLASS_NAME(codeview::ThunkOrdinal, Vcall, OS)
|
||||
}
|
||||
return OS;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: CompilerFlags {
|
||||
; EMPTY-NEXT: CompilerFlags3 {
|
||||
; EMPTY-NEXT: Language: Cpp (0x1)
|
||||
; EMPTY-NEXT: Flags [ (0x2000)
|
||||
; EMPTY-NEXT: SecurityChecks (0x2000)
|
||||
@ -238,7 +238,7 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: CompilerFlags {
|
||||
; EMPTY-NEXT: CompilerFlags3 {
|
||||
; EMPTY-NEXT: Language: Link (0x7)
|
||||
; EMPTY-NEXT: Flags [ (0x0)
|
||||
; EMPTY-NEXT: ]
|
||||
@ -254,9 +254,16 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_ENVBLOCK (0x113D)
|
||||
; EMPTY-NEXT: Length: 168
|
||||
; EMPTY-NEXT: EnvBlock {
|
||||
; EMPTY-NEXT: Reserved: 0
|
||||
; EMPTY-NEXT: Entries [
|
||||
; EMPTY-NEXT: cwd
|
||||
; EMPTY-NEXT: d:\src\llvm\test\DebugInfo\PDB\Inputs
|
||||
; EMPTY-NEXT: exe
|
||||
; EMPTY-NEXT: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\link.exe
|
||||
; EMPTY-NEXT: pdb
|
||||
; EMPTY-NEXT: d:\src\llvm\test\DebugInfo\PDB\Inputs\empty.pdb
|
||||
; EMPTY-NEXT: ]
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 00637764 00643A5C 7372635C 6C6C766D |.cwd.d:\src\llvm|
|
||||
@ -273,18 +280,27 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_TRAMPOLINE (0x112C)
|
||||
; EMPTY-NEXT: Length: 16
|
||||
; EMPTY-NEXT: Trampoline {
|
||||
; EMPTY-NEXT: Type: TrampIncremental (0x0)
|
||||
; EMPTY-NEXT: Size: 5
|
||||
; EMPTY-NEXT: ThunkOff: 5
|
||||
; EMPTY-NEXT: TargetOff: 16
|
||||
; EMPTY-NEXT: ThunkSection: 1
|
||||
; EMPTY-NEXT: TargetSection: 1
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 00000500 05000000 10000000 01000100 |................|
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_SECTION (0x1136)
|
||||
; EMPTY-NEXT: Length: 24
|
||||
; EMPTY-NEXT: Section {
|
||||
; EMPTY-NEXT: SectionNumber: 1
|
||||
; EMPTY-NEXT: Alignment: 12
|
||||
; EMPTY-NEXT: Reserved: 0
|
||||
; EMPTY-NEXT: Rva: 4096
|
||||
; EMPTY-NEXT: Length: 4122
|
||||
; EMPTY-NEXT: Characteristics: 0x60000020
|
||||
; EMPTY-NEXT: Name: .text
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 01000C00 00100000 1A100000 20000060 |............ ..`|
|
||||
@ -292,9 +308,12 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_COFFGROUP (0x1137)
|
||||
; EMPTY-NEXT: Length: 24
|
||||
; EMPTY-NEXT: COFF Group {
|
||||
; EMPTY-NEXT: Size: 4122
|
||||
; EMPTY-NEXT: Characteristics: 0x60000020
|
||||
; EMPTY-NEXT: Offset: 0
|
||||
; EMPTY-NEXT: Segment: 1
|
||||
; EMPTY-NEXT: Name: .text$mn
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 1A100000 20000060 00000000 01002E74 |.... ..`.......t|
|
||||
@ -302,9 +321,14 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_SECTION (0x1136)
|
||||
; EMPTY-NEXT: Length: 24
|
||||
; EMPTY-NEXT: Section {
|
||||
; EMPTY-NEXT: SectionNumber: 2
|
||||
; EMPTY-NEXT: Alignment: 12
|
||||
; EMPTY-NEXT: Reserved: 0
|
||||
; EMPTY-NEXT: Rva: 12288
|
||||
; EMPTY-NEXT: Length: 690
|
||||
; EMPTY-NEXT: Characteristics: 0x40000040
|
||||
; EMPTY-NEXT: Name: .rdata
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 02000C00 00300000 B2020000 40000040 |.....0......@..@|
|
||||
@ -312,9 +336,12 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_COFFGROUP (0x1137)
|
||||
; EMPTY-NEXT: Length: 24
|
||||
; EMPTY-NEXT: COFF Group {
|
||||
; EMPTY-NEXT: Size: 323
|
||||
; EMPTY-NEXT: Characteristics: 0x40000040
|
||||
; EMPTY-NEXT: Offset: 0
|
||||
; EMPTY-NEXT: Segment: 2
|
||||
; EMPTY-NEXT: Name: .rdata
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 43010000 40000040 00000000 02002E72 |C...@..@.......r|
|
||||
@ -322,9 +349,12 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_COFFGROUP (0x1137)
|
||||
; EMPTY-NEXT: Length: 24
|
||||
; EMPTY-NEXT: COFF Group {
|
||||
; EMPTY-NEXT: Size: 0
|
||||
; EMPTY-NEXT: Characteristics: 0x40000040
|
||||
; EMPTY-NEXT: Offset: 323
|
||||
; EMPTY-NEXT: Segment: 2
|
||||
; EMPTY-NEXT: Name: .edata
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 00000000 40000040 43010000 02002E65 |....@..@C......e|
|
||||
@ -332,9 +362,12 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_COFFGROUP (0x1137)
|
||||
; EMPTY-NEXT: Length: 28
|
||||
; EMPTY-NEXT: COFF Group {
|
||||
; EMPTY-NEXT: Size: 366
|
||||
; EMPTY-NEXT: Characteristics: 0x40000040
|
||||
; EMPTY-NEXT: Offset: 324
|
||||
; EMPTY-NEXT: Segment: 2
|
||||
; EMPTY-NEXT: Name: .rdata$debug
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 6E010000 40000040 44010000 02002E72 |n...@..@D......r|
|
||||
@ -342,9 +375,14 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_SECTION (0x1136)
|
||||
; EMPTY-NEXT: Length: 24
|
||||
; EMPTY-NEXT: Section {
|
||||
; EMPTY-NEXT: SectionNumber: 3
|
||||
; EMPTY-NEXT: Alignment: 12
|
||||
; EMPTY-NEXT: Reserved: 0
|
||||
; EMPTY-NEXT: Rva: 16384
|
||||
; EMPTY-NEXT: Length: 4
|
||||
; EMPTY-NEXT: Characteristics: 0xC0000040
|
||||
; EMPTY-NEXT: Name: .data
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 03000C00 00400000 04000000 400000C0 |.....@......@...|
|
||||
@ -352,9 +390,12 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_COFFGROUP (0x1137)
|
||||
; EMPTY-NEXT: Length: 20
|
||||
; EMPTY-NEXT: COFF Group {
|
||||
; EMPTY-NEXT: Size: 4
|
||||
; EMPTY-NEXT: Characteristics: 0xC0000080
|
||||
; EMPTY-NEXT: Offset: 0
|
||||
; EMPTY-NEXT: Segment: 3
|
||||
; EMPTY-NEXT: Name: .bss
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 04000000 800000C0 00000000 03002E62 |...............b|
|
||||
@ -362,9 +403,14 @@
|
||||
; EMPTY-NEXT: )
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: {
|
||||
; EMPTY-NEXT: UnknownSym {
|
||||
; EMPTY-NEXT: Kind: S_SECTION (0x1136)
|
||||
; EMPTY-NEXT: Length: 24
|
||||
; EMPTY-NEXT: Section {
|
||||
; EMPTY-NEXT: SectionNumber: 4
|
||||
; EMPTY-NEXT: Alignment: 12
|
||||
; EMPTY-NEXT: Reserved: 0
|
||||
; EMPTY-NEXT: Rva: 20480
|
||||
; EMPTY-NEXT: Length: 8
|
||||
; EMPTY-NEXT: Characteristics: 0x42000040
|
||||
; EMPTY-NEXT: Name: .reloc
|
||||
; EMPTY-NEXT: }
|
||||
; EMPTY-NEXT: Bytes (
|
||||
; EMPTY-NEXT: 0000: 04000C00 00500000 08000000 40000042 |.....P......@..B|
|
||||
|
@ -158,9 +158,9 @@ void CompilandDumper::dump(const PDBSymbolThunk &Symbol) {
|
||||
|
||||
Printer.NewLine();
|
||||
Printer << "thunk ";
|
||||
PDB_ThunkOrdinal Ordinal = Symbol.getThunkOrdinal();
|
||||
codeview::ThunkOrdinal Ordinal = Symbol.getThunkOrdinal();
|
||||
uint64_t VA = Symbol.getVirtualAddress();
|
||||
if (Ordinal == PDB_ThunkOrdinal::TrampIncremental) {
|
||||
if (Ordinal == codeview::ThunkOrdinal::TrampIncremental) {
|
||||
uint64_t Target = Symbol.getTargetVirtualAddress();
|
||||
WithColor(Printer, PDB_ColorItem::Address).get() << format_hex(VA, 10);
|
||||
Printer << " -> ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user