[llvm] r308107 - [CodeView] Dump BuildInfoSym and ProcSym type indices
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 15 11:10:39 PDT 2017
Author: rnk
Date: Sat Jul 15 11:10:39 2017
New Revision: 308107
URL: http://llvm.org/viewvc/llvm-project?rev=308107&view=rev
Log:
[CodeView] Dump BuildInfoSym and ProcSym type indices
I need to print the type index in hex so that I can match it in
FileCheck for a test I'm writing.
Modified:
llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h
llvm/trunk/lib/DebugInfo/CodeView/SymbolDumper.cpp
llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h?rev=308107&r1=308106&r2=308107&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h Sat Jul 15 11:10:39 2017
@@ -848,7 +848,7 @@ public:
: SymbolRecord(SymbolRecordKind::BuildInfoSym),
RecordOffset(RecordOffset) {}
- uint32_t BuildId;
+ TypeIndex BuildId;
uint32_t RecordOffset;
};
Modified: llvm/trunk/lib/DebugInfo/CodeView/SymbolDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/SymbolDumper.cpp?rev=308107&r1=308106&r2=308107&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/CodeView/SymbolDumper.cpp (original)
+++ llvm/trunk/lib/DebugInfo/CodeView/SymbolDumper.cpp Sat Jul 15 11:10:39 2017
@@ -186,7 +186,7 @@ Error CVSymbolDumperImpl::visitKnownReco
Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
BuildInfoSym &BuildInfo) {
- W.printNumber("BuildId", BuildInfo.BuildId);
+ printTypeIndex("BuildId", BuildInfo.BuildId);
return Error::success();
}
Modified: llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test?rev=308107&r1=308106&r2=308107&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test (original)
+++ llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test Sat Jul 15 11:10:39 2017
@@ -472,13 +472,13 @@ ALL-NEXT: frontend = 18.0.31101
ALL-NEXT: flags = security checks
ALL-NEXT: 120 | S_GPROC32 [size = 44] `main`
ALL-NEXT: parent = 0, end = 196, addr = 0001:0016, code size = 10
-ALL-NEXT: debug start = 3, debug end = 8, flags = has fp
+ALL-NEXT: type = `0x1001 (int ())`, debug start = 3, debug end = 8, flags = has fp
ALL-NEXT: 164 | S_FRAMEPROC [size = 32]
ALL-NEXT: size = 0, padding size = 0, offset to padding = 0
ALL-NEXT: bytes of callee saved registers = 0, exception handler addr = 0000:0000
ALL-NEXT: flags = has async eh | opt speed
ALL-NEXT: 196 | S_END [size = 4]
-ALL-NEXT: 200 | S_BUILDINFO [size = 8] BuildId = `4110`
+ALL-NEXT: 200 | S_BUILDINFO [size = 8] BuildId = `0x100E`
ALL-NEXT: Mod 0001 | `* Linker *`:
ALL-NEXT: 4 | S_OBJNAME [size = 20] sig=0, `* Linker *`
ALL-NEXT: 24 | S_COMPILE3 [size = 48]
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp?rev=308107&r1=308106&r2=308107&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp Sat Jul 15 11:10:39 2017
@@ -725,8 +725,9 @@ Error MinimalSymbolDumper::visitKnownRec
Proc.Parent, Proc.End,
formatSegmentOffset(Proc.Segment, Proc.CodeOffset),
Proc.CodeSize);
- P.formatLine("debug start = {0}, debug end = {1}, flags = {2}", Proc.DbgStart,
- Proc.DbgEnd,
+ // FIXME: It seems FunctionType is sometimes an id and sometimes a type.
+ P.formatLine("type = `{0}`, debug start = {1}, debug end = {2}, flags = {3}",
+ typeIndex(Proc.FunctionType), Proc.DbgStart, Proc.DbgEnd,
formatProcSymFlags(P.getIndentLevel() + 9, Proc.Flags));
return Error::success();
}
More information about the llvm-commits
mailing list