forked from OSchip/llvm-project
[COFF] Make it clearer that the symbols subsection holds function display name rather than just name
llvm-svn: 221812
This commit is contained in:
parent
73a6bca32b
commit
a11b32b7e5
|
@ -215,7 +215,7 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) {
|
|||
Asm->OutStreamer.EmitCOFFSecRel32(Fn);
|
||||
Asm->OutStreamer.EmitCOFFSectionIndex(Fn);
|
||||
Asm->EmitInt8(0);
|
||||
// Emit the function name as a null-terminated string.
|
||||
// Emit the function display name as a null-terminated string.
|
||||
Asm->OutStreamer.EmitBytes(FuncName);
|
||||
Asm->EmitInt8(0);
|
||||
Asm->OutStreamer.EmitLabel(ProcSegmentEnd);
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
; OBJ32-NEXT: Type: 0xF1
|
||||
; OBJ32-NOT: ]
|
||||
; OBJ32: ProcStart {
|
||||
; OBJ32-NEXT: FunctionName: f
|
||||
; OBJ32-NEXT: DisplayName: f
|
||||
; OBJ32-NEXT: Section: _f
|
||||
; OBJ32-NEXT: CodeSize: 0x6
|
||||
; OBJ32-NEXT: }
|
||||
|
@ -200,7 +200,7 @@
|
|||
; OBJ64-NEXT: Type: 0xF1
|
||||
; OBJ64-NOT: ]
|
||||
; OBJ64: ProcStart {
|
||||
; OBJ64-NEXT: FunctionName: f
|
||||
; OBJ64-NEXT: DisplayName: f
|
||||
; OBJ64-NEXT: Section: f
|
||||
; OBJ64-NEXT: CodeSize: 0xE
|
||||
; OBJ64-NEXT: }
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
; OBJ32-NEXT: Type: 0xF1
|
||||
; OBJ32-NOT: ]
|
||||
; OBJ32: ProcStart {
|
||||
; OBJ32-NEXT: FunctionName: f
|
||||
; OBJ32-NEXT: DisplayName: f
|
||||
; OBJ32-NEXT: Section: _f
|
||||
; OBJ32-NEXT: CodeSize: 0x10
|
||||
; OBJ32-NEXT: }
|
||||
|
@ -260,7 +260,7 @@
|
|||
; OBJ64-NEXT: Type: 0xF1
|
||||
; OBJ64-NOT: ]
|
||||
; OBJ64: ProcStart {
|
||||
; OBJ64-NEXT: FunctionName: f
|
||||
; OBJ64-NEXT: DisplayName: f
|
||||
; OBJ64-NEXT: Section: f
|
||||
; OBJ64-NEXT: CodeSize: 0x18
|
||||
; OBJ64-NEXT: }
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
; OBJ32-NEXT: Type: 0xF1
|
||||
; OBJ32-NOT: ]
|
||||
; OBJ32: ProcStart {
|
||||
; OBJ32-NEXT: FunctionName: x
|
||||
; OBJ32-NEXT: DisplayName: x
|
||||
; OBJ32-NEXT: Section: _x
|
||||
; OBJ32-NEXT: CodeSize: 0x6
|
||||
; OBJ32-NEXT: }
|
||||
|
@ -224,7 +224,7 @@
|
|||
; OBJ32-NEXT: Type: 0xF1
|
||||
; OBJ32-NOT: ]
|
||||
; OBJ32: ProcStart {
|
||||
; OBJ32-NEXT: FunctionName: y
|
||||
; OBJ32-NEXT: DisplayName: y
|
||||
; OBJ32-NEXT: Section: _y
|
||||
; OBJ32-NEXT: CodeSize: 0x6
|
||||
; OBJ32-NEXT: }
|
||||
|
@ -237,7 +237,7 @@
|
|||
; OBJ32-NEXT: Type: 0xF1
|
||||
; OBJ32-NOT: ]
|
||||
; OBJ32: ProcStart {
|
||||
; OBJ32-NEXT: FunctionName: f
|
||||
; OBJ32-NEXT: DisplayName: f
|
||||
; OBJ32-NEXT: Section: _f
|
||||
; OBJ32-NEXT: CodeSize: 0x10
|
||||
; OBJ32-NEXT: }
|
||||
|
@ -481,7 +481,7 @@
|
|||
; OBJ64-NEXT: Type: 0xF1
|
||||
; OBJ64-NOT: ]
|
||||
; OBJ64: ProcStart {
|
||||
; OBJ64-NEXT: FunctionName: x
|
||||
; OBJ64-NEXT: DisplayName: x
|
||||
; OBJ64-NEXT: Section: x
|
||||
; OBJ64-NEXT: CodeSize: 0xE
|
||||
; OBJ64-NEXT: }
|
||||
|
@ -494,7 +494,7 @@
|
|||
; OBJ64-NEXT: Type: 0xF1
|
||||
; OBJ64-NOT: ]
|
||||
; OBJ64: ProcStart {
|
||||
; OBJ64-NEXT: FunctionName: y
|
||||
; OBJ64-NEXT: DisplayName: y
|
||||
; OBJ64-NEXT: Section: y
|
||||
; OBJ64-NEXT: CodeSize: 0xE
|
||||
; OBJ64-NEXT: }
|
||||
|
@ -507,7 +507,7 @@
|
|||
; OBJ64-NEXT: Type: 0xF1
|
||||
; OBJ64-NOT: ]
|
||||
; OBJ64: ProcStart {
|
||||
; OBJ64-NEXT: FunctionName: f
|
||||
; OBJ64-NEXT: DisplayName: f
|
||||
; OBJ64-NEXT: Section: f
|
||||
; OBJ64-NEXT: CodeSize: 0x18
|
||||
; OBJ64-NEXT: }
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
; OBJ32-NEXT: Type: 0xF1
|
||||
; OBJ32-NOT: ]
|
||||
; OBJ32: ProcStart {
|
||||
; OBJ32-NEXT: FunctionName: f
|
||||
; OBJ32-NEXT: DisplayName: f
|
||||
; OBJ32-NEXT: Section: _f
|
||||
; OBJ32-NEXT: CodeSize: 0x6
|
||||
; OBJ32-NEXT: }
|
||||
|
@ -189,7 +189,7 @@
|
|||
; OBJ64-NEXT: Type: 0xF1
|
||||
; OBJ64-NOT: ]
|
||||
; OBJ64: ProcStart {
|
||||
; OBJ64-NEXT: FunctionName: f
|
||||
; OBJ64-NEXT: DisplayName: f
|
||||
; OBJ64-NEXT: Section: f
|
||||
; OBJ64-NEXT: CodeSize: 0xE
|
||||
; OBJ64-NEXT: }
|
||||
|
|
|
@ -41,7 +41,7 @@ MFUN32-NEXT: Subsection [
|
|||
MFUN32-NEXT: Type: 0xF1
|
||||
MFUN32-NEXT: PayloadSize: 0x4B
|
||||
MFUN32: ProcStart {
|
||||
MFUN32-NEXT: FunctionName: x
|
||||
MFUN32-NEXT: DisplayName: x
|
||||
MFUN32-NEXT: Section: _x
|
||||
MFUN32-NEXT: CodeSize: 0xA
|
||||
MFUN32-NEXT: }
|
||||
|
@ -60,7 +60,7 @@ MFUN32-NEXT: Subsection [
|
|||
MFUN32-NEXT: Type: 0xF1
|
||||
MFUN32-NEXT: PayloadSize: 0x4B
|
||||
MFUN32: ProcStart {
|
||||
MFUN32-NEXT: FunctionName: y
|
||||
MFUN32-NEXT: DisplayName: y
|
||||
MFUN32-NEXT: Section: _y
|
||||
MFUN32-NEXT: CodeSize: 0xA
|
||||
MFUN32-NEXT: }
|
||||
|
@ -79,7 +79,7 @@ MFUN32-NEXT: Subsection [
|
|||
MFUN32-NEXT: Type: 0xF1
|
||||
MFUN32-NEXT: PayloadSize: 0x4B
|
||||
MFUN32: ProcStart {
|
||||
MFUN32-NEXT: FunctionName: f
|
||||
MFUN32-NEXT: DisplayName: f
|
||||
MFUN32-NEXT: Section: _f
|
||||
MFUN32-NEXT: CodeSize: 0x14
|
||||
MFUN32-NEXT: }
|
||||
|
@ -146,7 +146,7 @@ MFUN64-NEXT: Subsection [
|
|||
MFUN64-NEXT: Type: 0xF1
|
||||
MFUN64-NEXT: PayloadSize: 0x4B
|
||||
MFUN64: ProcStart {
|
||||
MFUN64-NEXT: FunctionName: x
|
||||
MFUN64-NEXT: DisplayName: x
|
||||
MFUN64-NEXT: Section: x
|
||||
MFUN64-NEXT: CodeSize: 0xE
|
||||
MFUN64-NEXT: }
|
||||
|
@ -161,7 +161,7 @@ MFUN64-NEXT: Subsection [
|
|||
MFUN64-NEXT: Type: 0xF1
|
||||
MFUN64-NEXT: PayloadSize: 0x4B
|
||||
MFUN64: ProcStart {
|
||||
MFUN64-NEXT: FunctionName: y
|
||||
MFUN64-NEXT: DisplayName: y
|
||||
MFUN64-NEXT: Section: y
|
||||
MFUN64-NEXT: CodeSize: 0xE
|
||||
MFUN64-NEXT: }
|
||||
|
@ -176,7 +176,7 @@ MFUN64-NEXT: Subsection [
|
|||
MFUN64-NEXT: Type: 0xF1
|
||||
MFUN64-NEXT: PayloadSize: 0x4B
|
||||
MFUN64: ProcStart {
|
||||
MFUN64-NEXT: FunctionName: f
|
||||
MFUN64-NEXT: DisplayName: f
|
||||
MFUN64-NEXT: Section: f
|
||||
MFUN64-NEXT: CodeSize: 0x18
|
||||
MFUN64-NEXT: }
|
||||
|
@ -271,7 +271,7 @@ MFILE32-NEXT: Subsection [
|
|||
MFILE32-NEXT: Type: 0xF1
|
||||
MFILE32-NEXT: PayloadSize: 0x4B
|
||||
MFILE32: ProcStart {
|
||||
MFILE32-NEXT: FunctionName: f
|
||||
MFILE32-NEXT: DisplayName: f
|
||||
MFILE32-NEXT: Section: _f
|
||||
MFILE32-NEXT: CodeSize: 0x14
|
||||
MFILE32-NEXT: }
|
||||
|
@ -327,7 +327,7 @@ MFILE64-NEXT: Subsection [
|
|||
MFILE64-NEXT: Type: 0xF1
|
||||
MFILE64-NEXT: PayloadSize: 0x4B
|
||||
MFILE64: ProcStart {
|
||||
MFILE64-NEXT: FunctionName: f
|
||||
MFILE64-NEXT: DisplayName: f
|
||||
MFILE64-NEXT: Section: f
|
||||
MFILE64-NEXT: CodeSize: 0x18
|
||||
MFILE64-NEXT: }
|
||||
|
@ -393,7 +393,7 @@ RUN: llvm-readobj -s -codeview-linetables %p/Inputs/comdat-function-linetables.o
|
|||
RUN: | FileCheck %s -check-prefix MCOMDAT
|
||||
|
||||
MCOMDAT: ProcStart {
|
||||
MCOMDAT-NEXT: FunctionName: f
|
||||
MCOMDAT-NEXT: DisplayName: f
|
||||
MCOMDAT-NEXT: Section: ?f@@YAHXZ
|
||||
MCOMDAT-NEXT: CodeSize: 0x7
|
||||
MCOMDAT-NEXT: }
|
||||
|
@ -408,7 +408,7 @@ MCOMDAT-NEXT: +0x5: 4
|
|||
MCOMDAT-NEXT: ]
|
||||
MCOMDAT-NEXT: ]
|
||||
MCOMDAT: ProcStart {
|
||||
MCOMDAT-NEXT: FunctionName: g
|
||||
MCOMDAT-NEXT: DisplayName: g
|
||||
MCOMDAT-NEXT: Section: ?g@@YAHXZ
|
||||
MCOMDAT-NEXT: CodeSize: 0x7
|
||||
MCOMDAT-NEXT: }
|
||||
|
|
|
@ -669,12 +669,12 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection,
|
|||
return;
|
||||
Offset += 4;
|
||||
DE.getU8(&Offset, Unused, 3);
|
||||
StringRef FunctionName = DE.getCStr(&Offset);
|
||||
StringRef DisplayName = DE.getCStr(&Offset);
|
||||
if (!DE.isValidOffset(Offset)) {
|
||||
error(object_error::parse_failed);
|
||||
return;
|
||||
}
|
||||
W.printString("FunctionName", FunctionName);
|
||||
W.printString("DisplayName", DisplayName);
|
||||
W.printString("Section", SectionName);
|
||||
W.printHex("CodeSize", CodeSize);
|
||||
|
||||
|
|
Loading…
Reference in New Issue