Skip to content

Commit

Permalink
[codeview] Dump def range lengths in hex
Browse files Browse the repository at this point in the history
It makes it easier to correlate with assembly dumps, which are typically
given with hex offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260619 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rnk committed Feb 11, 2016
1 parent 267497c commit f7640fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions test/DebugInfo/COFF/local-variables.ll
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
; OBJ: LocalVariableAddrRange {
; OBJ: OffsetStart: .text+0x8
; OBJ: ISectStart: 0x0
; OBJ: Range: 79
; OBJ: Range: 0x4F
; OBJ: }
; OBJ: }
; OBJ: Local {
Expand All @@ -139,7 +139,7 @@
; OBJ: LocalVariableAddrRange {
; OBJ: OffsetStart: .text+0xC
; OBJ: ISectStart: 0x0
; OBJ: Range: 33
; OBJ: Range: 0x21
; OBJ: }
; OBJ: }
; OBJ: Local {
Expand All @@ -156,7 +156,7 @@
; OBJ: LocalVariableAddrRange {
; OBJ: OffsetStart: .text+0x2D
; OBJ: ISectStart: 0x0
; OBJ: Range: 36
; OBJ: Range: 0x24
; OBJ: }
; OBJ: }
; OBJ: InlineSite {
Expand Down Expand Up @@ -184,7 +184,7 @@
; OBJ: LocalVariableAddrRange {
; OBJ: OffsetStart: .text+0x14
; OBJ: ISectStart: 0x0
; OBJ: Range: 25
; OBJ: Range: 0x19
; OBJ: }
; OBJ: }
; OBJ: InlineSiteEnd {
Expand Down Expand Up @@ -214,7 +214,7 @@
; OBJ: LocalVariableAddrRange {
; OBJ: OffsetStart: .text+0x35
; OBJ: ISectStart: 0x0
; OBJ: Range: 23
; OBJ: Range: 0x17
; OBJ: }
; OBJ: }
; OBJ: InlineSiteEnd {
Expand Down
2 changes: 1 addition & 1 deletion test/MC/COFF/cv-def-range.s
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Ltmp3:
# CHECK: LocalVariableAddrRange {
# CHECK: OffsetStart: .text+0x9
# CHECK: ISectStart: 0x0
# CHECK: Range: 15
# CHECK: Range: 0xF
# CHECK: }
# CHECK: }
# CHECK: BlockRelocations [
Expand Down
6 changes: 3 additions & 3 deletions tools/llvm-readobj/COFFDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1907,16 +1907,16 @@ void COFFDumper::printLocalVariableAddrRange(
DictScope S(W, "LocalVariableAddrRange");
printRelocatedField("OffsetStart", Sec, SectionContents, &Range.OffsetStart);
W.printHex("ISectStart", Range.ISectStart);
W.printNumber("Range", Range.Range);
W.printHex("Range", Range.Range);
}

void COFFDumper::printLocalVariableAddrGap(StringRef &SymData) {
while (!SymData.empty()) {
const LocalVariableAddrGap *Gap;
error(consumeObject(SymData, Gap));
ListScope S(W, "LocalVariableAddrGap");
W.printNumber("GapStartOffset", Gap->GapStartOffset);
W.printNumber("Range", Gap->Range);
W.printHex("GapStartOffset", Gap->GapStartOffset);
W.printHex("Range", Gap->Range);
}
}

Expand Down

0 comments on commit f7640fe

Please sign in to comment.