llvm.org GIT mirror llvm / 4a5ccd4
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308107 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 2 years ago
4 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
847847 : SymbolRecord(SymbolRecordKind::BuildInfoSym),
848848 RecordOffset(RecordOffset) {}
849849
850 uint32_t BuildId;
850 TypeIndex BuildId;
851851
852852 uint32_t RecordOffset;
853853 };
185185
186186 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
187187 BuildInfoSym &BuildInfo) {
188 W.printNumber("BuildId", BuildInfo.BuildId);
188 printTypeIndex("BuildId", BuildInfo.BuildId);
189189 return Error::success();
190190 }
191191
471471 ALL-NEXT: flags = security checks
472472 ALL-NEXT: 120 | S_GPROC32 [size = 44] `main`
473473 ALL-NEXT: parent = 0, end = 196, addr = 0001:0016, code size = 10
474 ALL-NEXT: debug start = 3, debug end = 8, flags = has fp
474 ALL-NEXT: type = `0x1001 (int ())`, debug start = 3, debug end = 8, flags = has fp
475475 ALL-NEXT: 164 | S_FRAMEPROC [size = 32]
476476 ALL-NEXT: size = 0, padding size = 0, offset to padding = 0
477477 ALL-NEXT: bytes of callee saved registers = 0, exception handler addr = 0000:0000
478478 ALL-NEXT: flags = has async eh | opt speed
479479 ALL-NEXT: 196 | S_END [size = 4]
480 ALL-NEXT: 200 | S_BUILDINFO [size = 8] BuildId = `4110`
480 ALL-NEXT: 200 | S_BUILDINFO [size = 8] BuildId = `0x100E`
481481 ALL-NEXT: Mod 0001 | `* Linker *`:
482482 ALL-NEXT: 4 | S_OBJNAME [size = 20] sig=0, `* Linker *`
483483 ALL-NEXT: 24 | S_COMPILE3 [size = 48]
724724 Proc.Parent, Proc.End,
725725 formatSegmentOffset(Proc.Segment, Proc.CodeOffset),
726726 Proc.CodeSize);
727 P.formatLine("debug start = {0}, debug end = {1}, flags = {2}", Proc.DbgStart,
728 Proc.DbgEnd,
727 // FIXME: It seems FunctionType is sometimes an id and sometimes a type.
728 P.formatLine("type = `{0}`, debug start = {1}, debug end = {2}, flags = {3}",
729 typeIndex(Proc.FunctionType), Proc.DbgStart, Proc.DbgEnd,
729730 formatProcSymFlags(P.getIndentLevel() + 9, Proc.Flags));
730731 return Error::success();
731732 }