[llvm] r257813 - [codeview] Dump function callees and add more labels to inlinee info
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 13:50:06 PST 2016
Author: rnk
Date: Thu Jan 14 15:50:05 2016
New Revision: 257813
URL: http://llvm.org/viewvc/llvm-project?rev=257813&view=rev
Log:
[codeview] Dump function callees and add more labels to inlinee info
I kept forgetting which number is the line delta and which is the code
delta.
Modified:
llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=257813&r1=257812&r2=257813&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Thu Jan 14 15:50:05 2016
@@ -1420,19 +1420,19 @@ void COFFDumper::printCodeViewSymbolsSub
case Invalid:
return error(object_error::parse_failed);
case CodeOffset:
- W.printNumber("CodeOffset", GetCompressedAnnotation());
+ W.printHex("CodeOffset", GetCompressedAnnotation());
break;
case ChangeCodeOffsetBase:
W.printNumber("ChangeCodeOffsetBase", GetCompressedAnnotation());
break;
case ChangeCodeOffset:
- W.printNumber("ChangeCodeOffset", GetCompressedAnnotation());
+ W.printHex("ChangeCodeOffset", GetCompressedAnnotation());
break;
case ChangeCodeLength:
W.printNumber("ChangeCodeLength", GetCompressedAnnotation());
break;
case ChangeFile:
- W.printNumber("ChangeFile", GetCompressedAnnotation());
+ W.printHex("ChangeFile", GetCompressedAnnotation());
break;
case ChangeLineOffset:
W.printNumber("ChangeLineOffset",
@@ -1453,14 +1453,19 @@ void COFFDumper::printCodeViewSymbolsSub
break;
case ChangeCodeOffsetAndLineOffset: {
uint32_t Annotation = GetCompressedAnnotation();
- uint32_t Operands[] = {Annotation >> 4, Annotation & 0xf};
- W.printList("ChangeCodeOffsetAndLineOffset", Operands);
+ uint32_t SourceDelta = Annotation >> 4;
+ uint32_t CodeOffset = Annotation & 0xf;
+ W.startLine() << "ChangeCodeOffsetAndLineOffset: {SourceDelta: "
+ << SourceDelta << ", CodeOffset: " << W.hex(CodeOffset)
+ << "}\n";
break;
}
case ChangeCodeLengthAndCodeOffset: {
- uint32_t Operands[] = {GetCompressedAnnotation(),
- GetCompressedAnnotation()};
- W.printList("ChangeCodeLengthAndCodeOffset", Operands);
+ uint32_t Length = GetCompressedAnnotation();
+ uint32_t CodeOffset = GetCompressedAnnotation();
+ W.startLine() << "ChangeCodeLengthAndCodeOffset: {Length: "
+ << W.hex(Length)
+ << ", CodeOffset: " << W.hex(CodeOffset) << "}\n";
break;
}
case ChangeColumnEnd:
@@ -1476,6 +1481,19 @@ void COFFDumper::printCodeViewSymbolsSub
break;
}
+ case S_CALLERS:
+ case S_CALLEES: {
+ ListScope S(W, Kind == S_CALLEES ? "Callees" : "Callers");
+ uint32_t Count;
+ error(consumeUInt32(SymData, Count));
+ for (uint32_t I = 0; I < Count; ++I) {
+ const TypeIndex *FuncID;
+ error(consumeObject(SymData, FuncID));
+ printTypeIndex("FuncID", *FuncID);
+ }
+ break;
+ }
+
case S_LOCAL: {
DictScope S(W, "Local");
const LocalSym *Local;
More information about the llvm-commits
mailing list