[llvm] r341695 - [codeview] Improve readobj FPO dumper and pdbutil register names
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 7 11:48:27 PDT 2018
Author: rnk
Date: Fri Sep 7 11:48:27 2018
New Revision: 341695
URL: http://llvm.org/viewvc/llvm-project?rev=341695&view=rev
Log:
[codeview] Improve readobj FPO dumper and pdbutil register names
The improved dumping helps me investigate PR38857.
Modified:
llvm/trunk/test/DebugInfo/COFF/fpo-csrs.ll
llvm/trunk/test/DebugInfo/COFF/fpo-shrink-wrap.ll
llvm/trunk/test/MC/COFF/cv-fpo-csrs.s
llvm/trunk/test/MC/COFF/cv-fpo-setframe.s
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
Modified: llvm/trunk/test/DebugInfo/COFF/fpo-csrs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/fpo-csrs.ll?rev=341695&r1=341694&r2=341695&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/fpo-csrs.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/fpo-csrs.ll Fri Sep 7 11:48:27 2018
@@ -78,12 +78,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
; OBJ-NEXT: PrologSize: 0x1
; OBJ-NEXT: SavedRegsSize: 0x0
; OBJ-NEXT: Flags [ (0x4)
; OBJ-NEXT: IsFunctionStart (0x4)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x1
@@ -91,11 +95,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $esi $T0 4 - ^ =
; OBJ-NEXT: PrologSize: 0x0
; OBJ-NEXT: SavedRegsSize: 0x4
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $esi $T0 4 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NOT: FrameData
@@ -136,12 +145,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
; OBJ-NEXT: PrologSize: 0x2
; OBJ-NEXT: SavedRegsSize: 0x0
; OBJ-NEXT: Flags [ (0x4)
; OBJ-NEXT: IsFunctionStart (0x4)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x1
@@ -149,11 +162,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $edi $T0 4 - ^ =
; OBJ-NEXT: PrologSize: 0x1
; OBJ-NEXT: SavedRegsSize: 0x4
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $edi $T0 4 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x2
@@ -161,11 +179,17 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $edi $T0 4 - ^ = $esi $T0 8 - ^ =
; OBJ-NEXT: PrologSize: 0x0
; OBJ-NEXT: SavedRegsSize: 0x8
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $edi $T0 4 - ^ =
+; OBJ-NEXT: $esi $T0 8 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NOT: FrameData
@@ -207,12 +231,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
; OBJ-NEXT: PrologSize: 0x3
; OBJ-NEXT: SavedRegsSize: 0x0
; OBJ-NEXT: Flags [ (0x4)
; OBJ-NEXT: IsFunctionStart (0x4)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x1
@@ -220,11 +248,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ =
; OBJ-NEXT: PrologSize: 0x2
; OBJ-NEXT: SavedRegsSize: 0x4
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebx $T0 4 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x2
@@ -232,11 +265,17 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = $edi $T0 8 - ^ =
; OBJ-NEXT: PrologSize: 0x1
; OBJ-NEXT: SavedRegsSize: 0x8
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebx $T0 4 - ^ =
+; OBJ-NEXT: $edi $T0 8 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x3
@@ -244,11 +283,18 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = $edi $T0 8 - ^ = $esi $T0 12 - ^ =
; OBJ-NEXT: PrologSize: 0x0
; OBJ-NEXT: SavedRegsSize: 0xC
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebx $T0 4 - ^ =
+; OBJ-NEXT: $edi $T0 8 - ^ =
+; OBJ-NEXT: $esi $T0 12 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NOT: FrameData
@@ -295,12 +341,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
; OBJ-NEXT: PrologSize: 0x4
; OBJ-NEXT: SavedRegsSize: 0x0
; OBJ-NEXT: Flags [ (0x4)
; OBJ-NEXT: IsFunctionStart (0x4)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x1
@@ -308,11 +358,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
; OBJ-NEXT: PrologSize: 0x3
; OBJ-NEXT: SavedRegsSize: 0x4
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x2
@@ -320,11 +375,17 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ =
; OBJ-NEXT: PrologSize: 0x2
; OBJ-NEXT: SavedRegsSize: 0x8
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: $ebx $T0 8 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x3
@@ -332,11 +393,18 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ =
; OBJ-NEXT: PrologSize: 0x1
; OBJ-NEXT: SavedRegsSize: 0xC
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: $ebx $T0 8 - ^ =
+; OBJ-NEXT: $edi $T0 12 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x4
@@ -344,11 +412,19 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ = $esi $T0 16 - ^ =
; OBJ-NEXT: PrologSize: 0x0
; OBJ-NEXT: SavedRegsSize: 0x10
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: $ebx $T0 8 - ^ =
+; OBJ-NEXT: $edi $T0 12 - ^ =
+; OBJ-NEXT: $esi $T0 16 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NOT: FrameData
@@ -395,12 +471,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
; OBJ-NEXT: PrologSize: 0x7
; OBJ-NEXT: SavedRegsSize: 0x0
; OBJ-NEXT: Flags [ (0x4)
; OBJ-NEXT: IsFunctionStart (0x4)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x1
@@ -408,11 +488,16 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
; OBJ-NEXT: PrologSize: 0x6
; OBJ-NEXT: SavedRegsSize: 0x4
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x2
@@ -420,11 +505,17 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ =
; OBJ-NEXT: PrologSize: 0x5
; OBJ-NEXT: SavedRegsSize: 0x8
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: $ebx $T0 8 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x3
@@ -432,11 +523,18 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ =
; OBJ-NEXT: PrologSize: 0x4
; OBJ-NEXT: SavedRegsSize: 0xC
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: $ebx $T0 8 - ^ =
+; OBJ-NEXT: $edi $T0 12 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x4
@@ -444,11 +542,19 @@ entry:
; OBJ-NEXT: LocalSize: 0x0
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ = $esi $T0 16 - ^ =
; OBJ-NEXT: PrologSize: 0x3
; OBJ-NEXT: SavedRegsSize: 0x10
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: $ebx $T0 8 - ^ =
+; OBJ-NEXT: $edi $T0 12 - ^ =
+; OBJ-NEXT: $esi $T0 16 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NEXT: FrameData {
; OBJ-NEXT: RvaStart: 0x7
@@ -456,11 +562,19 @@ entry:
; OBJ-NEXT: LocalSize: 0x8
; OBJ-NEXT: ParamsSize: 0x0
; OBJ-NEXT: MaxStackSize: 0x0
-; OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ = $esi $T0 16 - ^ =
; OBJ-NEXT: PrologSize: 0x0
; OBJ-NEXT: SavedRegsSize: 0x10
; OBJ-NEXT: Flags [ (0x0)
; OBJ-NEXT: ]
+; OBJ-NEXT: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebp $T0 4 - ^ =
+; OBJ-NEXT: $ebx $T0 8 - ^ =
+; OBJ-NEXT: $edi $T0 12 - ^ =
+; OBJ-NEXT: $esi $T0 16 - ^ =
+; OBJ-NEXT: ]
; OBJ-NEXT: }
; OBJ-NOT: FrameData
Modified: llvm/trunk/test/DebugInfo/COFF/fpo-shrink-wrap.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/fpo-shrink-wrap.ll?rev=341695&r1=341694&r2=341695&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/fpo-shrink-wrap.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/fpo-shrink-wrap.ll Fri Sep 7 11:48:27 2018
@@ -41,26 +41,48 @@
; OBJ: FrameData {
; OBJ: RvaStart: 0x0
; OBJ: CodeSize: 0x34
-; OBJ: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
; OBJ: PrologSize: 0x9
+; OBJ: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: ]
; OBJ: }
; OBJ: FrameData {
; OBJ: RvaStart: 0x7
; OBJ: CodeSize: 0x2D
-; OBJ: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ =
; OBJ: PrologSize: 0x2
+; OBJ: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebx $T0 4 - ^ =
+; OBJ-NEXT: ]
; OBJ: }
; OBJ: FrameData {
; OBJ: RvaStart: 0x8
; OBJ: CodeSize: 0x2C
-; OBJ: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = $edi $T0 8 - ^ =
; OBJ: PrologSize: 0x1
+; OBJ: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebx $T0 4 - ^ =
+; OBJ-NEXT: $edi $T0 8 - ^ =
+; OBJ-NEXT: ]
; OBJ: }
; OBJ: FrameData {
; OBJ: RvaStart: 0x9
; OBJ: CodeSize: 0x2B
-; OBJ: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebx $T0 4 - ^ = $edi $T0 8 - ^ = $esi $T0 12 - ^ =
; OBJ: PrologSize: 0x0
+; OBJ: FrameFunc [
+; OBJ-NEXT: $T0 .raSearch =
+; OBJ-NEXT: $eip $T0 ^ =
+; OBJ-NEXT: $esp $T0 4 + =
+; OBJ-NEXT: $ebx $T0 4 - ^ =
+; OBJ-NEXT: $edi $T0 8 - ^ =
+; OBJ-NEXT: $esi $T0 12 - ^ =
+; OBJ-NEXT: ]
; OBJ: }
; OBJ-NOT: FrameData
Modified: llvm/trunk/test/MC/COFF/cv-fpo-csrs.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/cv-fpo-csrs.s?rev=341695&r1=341694&r2=341695&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/cv-fpo-csrs.s (original)
+++ llvm/trunk/test/MC/COFF/cv-fpo-csrs.s Fri Sep 7 11:48:27 2018
@@ -71,12 +71,16 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
# OBJ-NEXT: PrologSize: 0x7
# OBJ-NEXT: SavedRegsSize: 0x0
# OBJ-NEXT: Flags [ (0x4)
# OBJ-NEXT: IsFunctionStart (0x4)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x1
@@ -84,11 +88,16 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
# OBJ-NEXT: PrologSize: 0x6
# OBJ-NEXT: SavedRegsSize: 0x4
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x2
@@ -96,11 +105,17 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ =
# OBJ-NEXT: PrologSize: 0x5
# OBJ-NEXT: SavedRegsSize: 0x8
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: $ebx $T0 8 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x3
@@ -108,11 +123,18 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ =
# OBJ-NEXT: PrologSize: 0x4
# OBJ-NEXT: SavedRegsSize: 0xC
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: $ebx $T0 8 - ^ =
+# OBJ-NEXT: $edi $T0 12 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x4
@@ -120,11 +142,19 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ = $esi $T0 16 - ^ =
# OBJ-NEXT: PrologSize: 0x3
# OBJ-NEXT: SavedRegsSize: 0x10
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: $ebx $T0 8 - ^ =
+# OBJ-NEXT: $edi $T0 12 - ^ =
+# OBJ-NEXT: $esi $T0 16 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x7
@@ -132,10 +162,18 @@ _foo:
# OBJ-NEXT: LocalSize: 0x14
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ = $esi $T0 16 - ^ =
# OBJ-NEXT: PrologSize: 0x0
# OBJ-NEXT: SavedRegsSize: 0x10
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: $ebx $T0 8 - ^ =
+# OBJ-NEXT: $edi $T0 12 - ^ =
+# OBJ-NEXT: $esi $T0 16 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NOT: FrameData
Modified: llvm/trunk/test/MC/COFF/cv-fpo-setframe.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/cv-fpo-setframe.s?rev=341695&r1=341694&r2=341695&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/cv-fpo-setframe.s (original)
+++ llvm/trunk/test/MC/COFF/cv-fpo-setframe.s Fri Sep 7 11:48:27 2018
@@ -74,12 +74,16 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
# OBJ-NEXT: PrologSize: 0x9
# OBJ-NEXT: SavedRegsSize: 0x0
# OBJ-NEXT: Flags [ (0x4)
# OBJ-NEXT: IsFunctionStart (0x4)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x1
@@ -87,11 +91,16 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
# OBJ-NEXT: PrologSize: 0x8
# OBJ-NEXT: SavedRegsSize: 0x4
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 .raSearch =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x3
@@ -99,11 +108,16 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
# OBJ-NEXT: PrologSize: 0x6
# OBJ-NEXT: SavedRegsSize: 0x4
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 $ebp 4 + =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x4
@@ -111,11 +125,17 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ =
# OBJ-NEXT: PrologSize: 0x5
# OBJ-NEXT: SavedRegsSize: 0x8
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 $ebp 4 + =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: $ebx $T0 8 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x5
@@ -123,11 +143,18 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ =
# OBJ-NEXT: PrologSize: 0x4
# OBJ-NEXT: SavedRegsSize: 0xC
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 $ebp 4 + =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: $ebx $T0 8 - ^ =
+# OBJ-NEXT: $edi $T0 12 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NEXT: FrameData {
# OBJ-NEXT: RvaStart: 0x6
@@ -135,10 +162,18 @@ _foo:
# OBJ-NEXT: LocalSize: 0x0
# OBJ-NEXT: ParamsSize: 0x4
# OBJ-NEXT: MaxStackSize: 0x0
-# OBJ-NEXT: FrameFunc: $T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $ebx $T0 8 - ^ = $edi $T0 12 - ^ = $esi $T0 16 - ^ =
# OBJ-NEXT: PrologSize: 0x3
# OBJ-NEXT: SavedRegsSize: 0x10
# OBJ-NEXT: Flags [ (0x0)
# OBJ-NEXT: ]
+# OBJ-NEXT: FrameFunc [
+# OBJ-NEXT: $T0 $ebp 4 + =
+# OBJ-NEXT: $eip $T0 ^ =
+# OBJ-NEXT: $esp $T0 4 + =
+# OBJ-NEXT: $ebp $T0 4 - ^ =
+# OBJ-NEXT: $ebx $T0 8 - ^ =
+# OBJ-NEXT: $edi $T0 12 - ^ =
+# OBJ-NEXT: $esi $T0 16 - ^ =
+# OBJ-NEXT: ]
# OBJ-NEXT: }
# OBJ-NOT: FrameData
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp?rev=341695&r1=341694&r2=341695&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp Fri Sep 7 11:48:27 2018
@@ -296,6 +296,14 @@ static std::string formatRegisterId(Regi
return formatUnknownEnum(Id);
}
+static std::string formatRegisterId(uint16_t Reg16) {
+ return formatRegisterId(RegisterId(Reg16));
+}
+
+static std::string formatRegisterId(ulittle16_t &Reg16) {
+ return formatRegisterId(uint16_t(Reg16));
+}
+
static std::string formatRange(LocalVariableAddrRange Range) {
return formatv("[{0},+{1})",
formatSegmentOffset(Range.ISectStart, Range.OffsetStart),
@@ -550,10 +558,11 @@ Error MinimalSymbolDumper::visitKnownRec
Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR,
DefRangeRegisterRelSym &Def) {
AutoIndent Indent(P, 7);
- P.formatLine("register = {0}, base ptr = {1}, offset in parent = {2}, has "
+ P.formatLine("register = {0}, offset = {1}, offset in parent = {2}, has "
"spilled udt = {3}",
- uint16_t(Def.Hdr.Register), int32_t(Def.Hdr.BasePointerOffset),
- Def.offsetInParent(), Def.hasSpilledUDTMember());
+ formatRegisterId(Def.Hdr.Register),
+ int32_t(Def.Hdr.BasePointerOffset), Def.offsetInParent(),
+ Def.hasSpilledUDTMember());
P.formatLine("range = {0}, gaps = {1}", formatRange(Def.Range),
formatGaps(P.getIndentLevel() + 9, Def.Gaps));
return Error::success();
@@ -564,8 +573,8 @@ Error MinimalSymbolDumper::visitKnownRec
AutoIndent Indent(P, 7);
P.formatLine("register = {0}, may have no name = {1}, range start = "
"{2}, length = {3}",
- uint16_t(DefRangeRegister.Hdr.Register),
- uint16_t(DefRangeRegister.Hdr.MayHaveNoName),
+ formatRegisterId(DefRangeRegister.Hdr.Register),
+ bool(DefRangeRegister.Hdr.MayHaveNoName),
formatSegmentOffset(DefRangeRegister.Range.ISectStart,
DefRangeRegister.Range.OffsetStart),
DefRangeRegister.Range.Range);
@@ -579,7 +588,7 @@ Error MinimalSymbolDumper::visitKnownRec
AutoIndent Indent(P, 7);
bool NoName = !!(Def.Hdr.MayHaveNoName == 0);
P.formatLine("register = {0}, may have no name = {1}, offset in parent = {2}",
- uint16_t(Def.Hdr.Register), NoName,
+ formatRegisterId(Def.Hdr.Register), NoName,
uint32_t(Def.Hdr.OffsetInParent));
P.formatLine("range = {0}, gaps = {1}", formatRange(Def.Range),
formatGaps(P.getIndentLevel() + 9, Def.Gaps));
@@ -606,8 +615,8 @@ Error MinimalSymbolDumper::visitKnownRec
Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR, FrameCookieSym &FC) {
AutoIndent Indent(P, 7);
P.formatLine("code offset = {0}, Register = {1}, kind = {2}, flags = {3}",
- FC.CodeOffset, FC.Register, formatCookieKind(FC.CookieKind),
- FC.Flags);
+ FC.CodeOffset, formatRegisterId(FC.Register),
+ formatCookieKind(FC.CookieKind), FC.Flags);
return Error::success();
}
Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=341695&r1=341694&r2=341695&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Fri Sep 7 11:48:27 2018
@@ -1062,10 +1062,28 @@ void COFFDumper::printCodeViewSymbolSect
W.printHex("LocalSize", FD.LocalSize);
W.printHex("ParamsSize", FD.ParamsSize);
W.printHex("MaxStackSize", FD.MaxStackSize);
- W.printString("FrameFunc", FrameFunc);
W.printHex("PrologSize", FD.PrologSize);
W.printHex("SavedRegsSize", FD.SavedRegsSize);
W.printFlags("Flags", FD.Flags, makeArrayRef(FrameDataFlags));
+
+ // The FrameFunc string is a small RPN program. It can be broken up into
+ // statements that end in the '=' operator, which assigns the value on
+ // the top of the stack to the previously pushed variable. Variables can
+ // be temporary values ($T0) or physical registers ($esp). Print each
+ // assignment on its own line to make these programs easier to read.
+ {
+ ListScope FFS(W, "FrameFunc");
+ while (!FrameFunc.empty()) {
+ size_t EqOrEnd = FrameFunc.find('=');
+ if (EqOrEnd == StringRef::npos)
+ EqOrEnd = FrameFunc.size();
+ else
+ ++EqOrEnd;
+ StringRef Stmt = FrameFunc.substr(0, EqOrEnd);
+ W.printString(Stmt);
+ FrameFunc = FrameFunc.drop_front(EqOrEnd).trim();
+ }
+ }
}
break;
}
More information about the llvm-commits
mailing list