LLVM-DEBUGINFO-ANALYZER(1) LLVM LLVM-DEBUGINFO-ANALYZER(1) (NAME) llvm-debuginfo-analyzer - . o (SYNOPSIS) o (DESCRIPTION) o (OPTIONS) o (GENERAL) o (ATTRIBUTES) o (PRINT) o (OUTPUT) o (REPORT) o (SELECTION) o (ELEMENTS) o (LINES) o (SCOPES) o (SYMBOLS) o (TYPES) o (COMPARE) o (WARNING) o (INTERNAL) o (EXAMPLES) o - o o o o o o o - o CodeView - Clang (Windows) o CodeView - MSVC (Windows) o DWARF - Clang (Linux) o DWARF - GCC (Linux) o - TYPEDEF o CodeView - Clang (Windows) o CodeView - MSVC (Windows) o DWARF - Clang (Linux) o DWARF - GCC (Linux) o - o CodeView - Clang (Windows) o CodeView - MSVC (Windows) o DWARF - Clang (Linux) o DWARF - GCC (Linux) o - o CODEVIEW - Clang (Windows) o CODEVIEW - MSVC (Windows) o DWARF - Clang (Linux) o DWARF - GCC (Linux) o - o WEBASSEMBLY o o o o o o (EXIT STATUS) o o (SEE ALSO) llvm-debuginfo-analyzer [options] [filename ...] (DESCRIPTION) llvm-debuginfo-analyzer debug text (binary object files) (logical view) . ELF Mach-O WebAssembly PDB COFF . . llvm-debuginfo-analyzer (canonical) . . : type scope symbol line C/C++ . (attributes) types classes functions variables parameters . --attribute . kind scope (kind) function class namespace . llvm-debuginfo-analyzer . (--print) (--report) (--select --select-offsets) . (--select-lines --select-scopes --select-symbols --select-types) . llvm-debuginfo-analyzer (--compare) (--warning) . (OPTIONS) llvm-debuginfo-analyzer : o GENERAL - LLVM . o ATTRIBUTES - . o PRINT - . o OUTPUT - . o REPORT - . o SELECTION - . o COMPARE - . o WARNING - . o INTERNAL - . GENERAL (response files) . -h, --help . (--help-hidden ). --help-list (--help-list-hidden ). --help-hidden . --print-all-options . --print-options . --version . @ . llvm-debuginfo-analyzer a.out . - llvm-debuginfo-analyzer ..SS " (ATTRIBUTES)" . : . --attribute= value . =all: . =extended: (low-level). =standard: (high-level). . (lexical scope level) ( ) . =global: Compile Unit . =format: (object file). =language: (source language). =level: (File=0, Compile Unit=1). =local: Compile Unit . =producer: (toolchain). . (cross reference) . =directories: . =filename: . =files: . =pathname: . =publics: (public) . (int bool ) (template instantiation) (type aliases). =argument: . =base: (int, bool, etc.). =generated: . =encoded: . =qualified: . =reference: . =size: . =subrange: (subrange) . =typename: (template). =underlying: (type definitions). (debug location) . (gap) . . =coverage: . =gaps: (). =location: . =range: . =register: . : (discriminators) (inlined) () ( dead-stripping) MS PDB. =discarded: (linker). =discriminator: (inlined). =inserted: . =linkage: (linkage) . =offset: . =qualifier: (Newstatement, BasicBlock, etc). =zero: . PE/COFF . MS . =system: MS PDB. standard extended . standard . =base =coverage =directories =discriminator =filename =files =format =language =level =producer =publics =range =reference =zero extended . . =argument =discarded =encoded =gaps =generated =global =inserted =linkage =local =location =offset =operation =pathname =qualified =qualifier =register =size =subrange =system =typename . --report . . --print= value . =all: . (--select) . elements . =elements: . =instructions: . =lines: . =scopes: ( ). =symbols: ( ). =types: ( ). : (--select) . =sizes: . =summary: . =warnings: . : --print=sizes ELF . (OUTPUT) . --output-file= - . llvm-debuginfo-analyzer << >> (split view) . (compilation unit) . --output-folder= --output=split . --output-level= (lexical level) . . --output= value . =all: . =json: JSON ( ). =split: (Compile Units). =text: . --output-sort= (: line). (--select-lines --select-scopes --select-symbols --select-types) . =none: ( ). =id: . =kind: . =line: . =name: . =offset: . (print compare select) . --report= value . =all: . =children: . =list: . =parents: . =view: . list - . . children parents view (scopes) (types) (symbols) (lines) . (lexical scoping) ( 0) (compilation unit) ( 1) . children (--select) (--compare) . parents (--select) (--compare) . view (--select) (--compare) . : 1. (--select) list . 2. view . (SELECTION) (--attribute) () . . (--select-nocase) (--select-regex). (ELEMENTS) . --select= . --select-offsets= . --attribute . --select-elements= condition . =discarded: (linker). =global: . =optimized: . --select-nocase --select . --select-regex --select . --select-nocase . : (--select-lines) (--select-scopes) (--select-symbols) (--select-types). (DWARF CodeView) kind ..SS " (LINES)" . debug line . --select-lines= kind . =AlwaysStepInto: (always step into) . =BasicBlock: (basic block) . =Discriminator: (discriminator) . =EndSequence: . =EpilogueBegin: (epilogue) . =LineAssembler: . =LineDebug: (debug lines) . =NeverStepInto: (never step into) . =NewStatement: (statement) . =PrologueEnd: (prologue) . (SCOPES) . --select-scopes= kind . =Aggregate: (union). =Array: . =Block: ( ). =CallSite: (call site). =CatchBlock: (catch block). =Class: . =CompileUnit: (compile unit). =EntryPoint: (subroutine). =Enumeration: (enumeration). =Function: . =FunctionType: (function pointer). =InlinedFunction: (inlined function). =Label: (label). =LexicalBlock: (lexical block). =Module: . =Namespace: (namespace). =Root: (main scope) . =Structure: (structure). =Subprogram: (subprogram). =Template: (template). =TemplateAlias: (template alias). =TemplatePack: (template pack). =TryBlock: try. =Union: (union). (SYMBOLS) . --select-symbols= kind . =CallSiteParameter: (call site). =Constant: (constant). =Inheritance: (base class). =Member: (member class). =Parameter: . =Unspecified: . =Variable: . . --select-types= kind : =Base: ( ). =Const: (const). =Enumerator: (Enumerator). =Import: (import). =ImportDeclaration: . =ImportModule: . =Pointer: . =PointerMember: . =Reference: . =Restrict: restrict. =RvalueReference: (R-value reference). =Subrange: . =TemplateParam: . =TemplateTemplateParam: . =TemplateTypeParam: . =TemplateValueParam: . =Typedef: (typedef). =Unspecified: . =Volatile: (volatile). (COMPARE) (debug information) . . . diff . llvm-debuginfo-analyzer . . DWARF CodeView . . --compare= value : =all: . =lines: . =scopes: . =symbols: . =types: . llvm-debuginfo-analyzer reference () target () . . missing () added () . --report ..SS " (WARNING)" llvm-debuginfo-analyzer . . --print . --warning= value . =all: . . =coverages: . =lines: . =locations: . =ranges: . (INTERNAL) . . debug . llvm-debuginfo-analyzer release debug . --internal= value . =all: . llvm-debuginfo-analyzer . =id: . =cmdline: . =integrity: . =none: . =tag: . : ELF . PE/COFF . llvm-debuginfo-analyzer . - (TEST CASE 1 - GENERAL OPTIONS) llvm-debuginfo-analyzer . X86 ELF Clang (-O0 -g) : 1 using INTPTR = const int *; 2 int foo(INTPTR ParamPtr, unsigned ParamUnsigned, bool ParamBool) { 3 if (ParamBool) { 4 typedef int INTEGER; 5 const INTEGER CONSTANT = 7; 6 return CONSTANT; 7 } 8 return ParamUnsigned; 9 } (PRINTING MODE) llvm-debuginfo-analyzer ( ) . (BASIC DETAILS) (lexical level) . llvm-debuginfo-analyzer --attribute=level,format --output-sort=offset --print=scopes,symbols,types,lines,instructions test-dwarf-clang.o llvm-debuginfo-analyzer --attribute=level,format --output-sort=offset --print=elements test-dwarf-clang.o . (scope level) ( ) . Logical View: [000] {File} 'test-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'test.cpp' [002] 2 {Function} extern not_inlined 'foo' -> 'int' [003] 2 {Parameter} 'ParamPtr' -> 'INTPTR' [003] 2 {Parameter} 'ParamUnsigned' -> 'unsigned int' [003] 2 {Parameter} 'ParamBool' -> 'bool' [003] {Block} [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' [004] 5 {Line} [004] {Code} 'movl $0x7, -0x1c(%rbp)' [004] 6 {Line} [004] {Code} 'movl $0x7, -0x4(%rbp)' [004] {Code} 'jmp 0x6' [004] 8 {Line} [004] {Code} 'movl -0x14(%rbp), %eax' [003] 4 {TypeAlias} 'INTEGER' -> 'int' [003] 2 {Line} [003] {Code} 'pushq %rbp' [003] {Code} 'movq %rsp, %rbp' [003] {Code} 'movb %dl, %al' [003] {Code} 'movq %rdi, -0x10(%rbp)' [003] {Code} 'movl %esi, -0x14(%rbp)' [003] {Code} 'andb $0x1, %al' [003] {Code} 'movb %al, -0x15(%rbp)' [003] 3 {Line} [003] {Code} 'testb $0x1, -0x15(%rbp)' [003] {Code} 'je 0x13' [003] 8 {Line} [003] {Code} 'movl %eax, -0x4(%rbp)' [003] 9 {Line} [003] {Code} 'movl -0x4(%rbp), %eax' [003] {Code} 'popq %rbp' [003] {Code} 'retq' [003] 9 {Line} [002] 1 {TypeAlias} 'INTPTR' -> '* const int' : [003] {Block} [003] 4 {TypeAlias} 'INTEGER' -> 'int' 'INTEGER' [003] {Block} ( 'true' 'if') typedef 'INTEGER' [004] ..SS " (SELECT LOGICAL ELEMENTS)" instructions symbols types 'inte' 'movl' (tab layout) . llvm-debuginfo-analyzer --attribute=level --select-nocase --select-regex --select=INTe --select=movl --report=list --print=symbols,types,instructions,summary test-dwarf-clang.o Logical View: [000] {File} 'test-dwarf-clang.o' [001] {CompileUnit} 'test.cpp' [003] {Code} 'movl $0x7, -0x1c(%rbp)' [003] {Code} 'movl $0x7, -0x4(%rbp)' [003] {Code} 'movl %eax, -0x4(%rbp)' [003] {Code} 'movl %esi, -0x14(%rbp)' [003] {Code} 'movl -0x14(%rbp), %eax' [003] {Code} 'movl -0x4(%rbp), %eax' [003] 4 {TypeAlias} 'INTEGER' -> 'int' [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' ----------------------------- Element Total Found ----------------------------- Scopes 3 0 Symbols 4 1 Types 2 1 Lines 17 6 ----------------------------- Total 26 8 (COMPARISON MODE) llvm-debuginfo-analyzer (logical views) . (toolchain) ( DWARF CodeView ). ( 'typedef int INTEGER') . GCC test-dwarf-gcc.o . llvm-debuginfo-analyzer --attribute=level --select-regex --select-nocase --select=INTe --report=list --print=symbols,types test-dwarf-clang.o test-dwarf-gcc.o Logical View: [000] {File} 'test-dwarf-clang.o' [001] {CompileUnit} 'test.cpp' [003] 4 {TypeAlias} 'INTEGER' -> 'int' [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' Logical View: [000] {File} 'test-dwarf-gcc.o' [001] {CompileUnit} 'test.cpp' [004] 4 {TypeAlias} 'INTEGER' -> 'int' [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' 'typedef INTEGER' (scope level) . GCC '4' . GCC DWARF Clang . (semantics) . CodeView MSVC Clang . : (logical view) (logical elements)..SS " (LOGICAL VIEW)" . llvm-debuginfo-analyzer . (-) (+) . llvm-debuginfo-analyzer --attribute=level --compare=types --report=view --print=symbols,types test-dwarf-clang.o test-dwarf-gcc.o Reference: 'test-dwarf-clang.o' Target: 'test-dwarf-gcc.o' Logical View: [000] {File} 'test-dwarf-clang.o' [001] {CompileUnit} 'test.cpp' [002] 1 {TypeAlias} 'INTPTR' -> '* const int' [002] 2 {Function} extern not_inlined 'foo' -> 'int' [003] {Block} [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' +[004] 4 {TypeAlias} 'INTEGER' -> 'int' [003] 2 {Parameter} 'ParamBool' -> 'bool' [003] 2 {Parameter} 'ParamPtr' -> 'INTPTR' [003] 2 {Parameter} 'ParamUnsigned' -> 'unsigned int' -[003] 4 {TypeAlias} 'INTEGER' -> 'int' ( ) . (LOGICAL ELEMENTS) . (lexical scope level) . llvm-debuginfo-analyzer --attribute=level --compare=types --report=list --print=symbols,types,summary test-dwarf-clang.o test-dwarf-gcc.o Reference: 'test-dwarf-clang.o' Target: 'test-dwarf-gcc.o' (1) Missing Types: -[003] 4 {TypeAlias} 'INTEGER' -> 'int' (1) Added Types: +[004] 4 {TypeAlias} 'INTEGER' -> 'int' ---------------------------------------- Element Expected Missing Added ---------------------------------------- Scopes 4 0 0 Symbols 0 0 0 Types 2 1 1 Lines 0 0 0 ---------------------------------------- Total 6 1 1 Reference Target: llvm-debuginfo-analyzer --attribute=level --compare=types --report=list --print=symbols,types,summary test-dwarf-gcc.o test-dwarf-clang.o Reference: 'test-dwarf-gcc.o' Target: 'test-dwarf-clang.o' (1) Missing Types: -[004] 4 {TypeAlias} 'INTEGER' -> 'int' (1) Added Types: +[003] 4 {TypeAlias} 'INTEGER' -> 'int' ---------------------------------------- Element Expected Missing Added ---------------------------------------- Scopes 4 0 0 Symbols 0 0 0 Types 2 1 1 Lines 0 0 0 ---------------------------------------- Total 6 1 1 Reference Target Added Types Missing Types ..SS " - (TEST CASE 2 - ASSEMBLER INSTRUCTIONS)" llvm-debuginfo-analyzer . X86 Codeview ELF Clang GCC MSVC (-O0 -g) Windows Linux . 1 extern int printf(const char * format, ... ); 2 3 int main() 4 { 5 printf("Hello, World\n"); 6 return 0; 7 } llvm-debuginfo-analyzer (MSVC Clang GCC) (CodeView DWARF) Windows Linux . llvm-debuginfo-analyzer --attribute=level,format,producer --print=lines,instructions hello-world-codeview-clang.o hello-world-codeview-msvc.o hello-world-dwarf-clang.o hello-world-dwarf-gcc.o CodeView - Clang (Windows) Logical View: [000] {File} 'hello-world-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'hello-world.cpp' [002] {Producer} 'clang version 14.0.0' [002] {Function} extern not_inlined 'main' -> 'int' [003] 4 {Line} [003] {Code} 'subq $0x28, %rsp' [003] {Code} 'movl $0x0, 0x24(%rsp)' [003] 5 {Line} [003] {Code} 'leaq (%rip), %rcx' [003] {Code} 'callq 0x0' [003] 6 {Line} [003] {Code} 'xorl %eax, %eax' [003] {Code} 'addq $0x28, %rsp' [003] {Code} 'retq' CodeView - MSVC (Windows) Logical View: [000] {File} 'hello-world-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'hello-world.cpp' [002] {Producer} 'Microsoft (R) Optimizing Compiler' [002] {Function} extern not_inlined 'main' -> 'int' [003] 4 {Line} [003] {Code} 'pushl %ebp' [003] {Code} 'movl %esp, %ebp' [003] 5 {Line} [003] {Code} 'pushl $0x0' [003] {Code} 'calll 0x0' [003] {Code} 'addl $0x4, %esp' [003] 6 {Line} [003] {Code} 'xorl %eax, %eax' [003] 7 {Line} [003] {Code} 'popl %ebp' [003] {Code} 'retl' Logical View: [000] {File} 'hello-world-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'hello-world.cpp' [002] {Producer} 'clang version 14.0.0' [002] 3 {Function} extern not_inlined 'main' -> 'int' [003] 4 {Line} [003] {Code} 'pushq %rbp' [003] {Code} 'movq %rsp, %rbp' [003] {Code} 'subq $0x10, %rsp' [003] {Code} 'movl $0x0, -0x4(%rbp)' [003] 5 {Line} [003] {Code} 'movabsq $0x0, %rdi' [003] {Code} 'movb $0x0, %al' [003] {Code} 'callq 0x0' [003] 6 {Line} [003] {Code} 'xorl %eax, %eax' [003] {Code} 'addq $0x10, %rsp' [003] {Code} 'popq %rbp' [003] {Code} 'retq' [003] 6 {Line} DWARF - GCC (Linux) Logical View: [000] {File} 'hello-world-dwarf-gcc.o' -> elf64-x86-64 [001] {CompileUnit} 'hello-world.cpp' [002] {Producer} 'GNU C++14 9.3.0' [002] 3 {Function} extern not_inlined 'main' -> 'int' [003] 4 {Line} [003] {Code} 'endbr64' [003] {Code} 'pushq %rbp' [003] {Code} 'movq %rsp, %rbp' [003] 5 {Line} [003] {Code} 'leaq (%rip), %rdi' [003] {Code} 'movl $0x0, %eax' [003] {Code} 'callq 0x0' [003] 6 {Line} [003] {Code} 'movl $0x0, %eax' [003] 7 {Line} [003] {Code} 'popq %rbp' [003] {Code} 'retq' [003] 7 {Line} . - TYPEDEF (TEST CASE 3 - INCORRECT LEXICAL SCOPE FOR TYPEDEF) llvm-debuginfo-analyzer . X86 Codeview ELF Clang GCC MSVC (-O0 -g). 1 int bar(float Input) { return (int)Input; } 2 3 unsigned foo(char Param) { 4 typedef int INT; // ** Definition for INT ** 5 INT Value = Param; 6 { 7 typedef float FLOAT; // ** Definition for FLOAT ** 8 { 9 FLOAT Added = Value + Param; 10 Value = bar(Added); 11 } 12 } 13 return Value + Param; 14 } (scope) Clang : PR44884 (Bugs LLVM) / PR44229 (GitHub LLVM) typedef . 4 typedef int INT; 7 typedef float FLOAT; llvm-debuginfo-analyzer (MSVC Clang GCC) (CodeView DWARF) . llvm-debuginfo-analyzer --attribute=level,format,producer --print=symbols,types,lines --output-sort=kind pr-44884-codeview-clang.o pr-44884-codeview-msvc.o pr-44884-dwarf-clang.o pr-44884-dwarf-gcc.o Logical View: [000] {File} 'pr-44884-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'pr-44884.cpp' [002] {Producer} 'clang version 14.0.0' [002] {Function} extern not_inlined 'bar' -> 'int' [003] {Parameter} 'Input' -> 'float' [003] 1 {Line} [002] {Function} extern not_inlined 'foo' -> 'unsigned' [003] {Block} [004] {Variable} 'Added' -> 'float' [004] 9 {Line} [004] 10 {Line} [003] {Parameter} 'Param' -> 'char' [003] {TypeAlias} 'FLOAT' -> 'float' [003] {TypeAlias} 'INT' -> 'int' [003] {Variable} 'Value' -> 'int' [003] 3 {Line} [003] 5 {Line} [003] 13 {Line} CodeView - MSVC () Logical View: [000] {File} 'pr-44884-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'pr-44884.cpp' [002] {Producer} 'Microsoft (R) Optimizing Compiler' [002] {Function} extern not_inlined 'bar' -> 'int' [003] {Variable} 'Input' -> 'float' [003] 1 {Line} [002] {Function} extern not_inlined 'foo' -> 'unsigned' [003] {Block} [004] {Block} [005] {Variable} 'Added' -> 'float' [004] {TypeAlias} 'FLOAT' -> 'float' [004] 9 {Line} [004] 10 {Line} [003] {TypeAlias} 'INT' -> 'int' [003] {Variable} 'Param' -> 'char' [003] {Variable} 'Value' -> 'int' [003] 3 {Line} [003] 5 {Line} [003] 13 {Line} [003] 14 {Line} DWARF - Clang () Logical View: [000] {File} 'pr-44884-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-44884.cpp' [002] {Producer} 'clang version 14.0.0' [002] 1 {Function} extern not_inlined 'bar' -> 'int' [003] 1 {Parameter} 'Input' -> 'float' [003] 1 {Line} [003] 1 {Line} [003] 1 {Line} [002] 3 {Function} extern not_inlined 'foo' -> 'unsigned int' [003] {Block} [004] 9 {Variable} 'Added' -> 'FLOAT' [004] 9 {Line} [004] 9 {Line} [004] 9 {Line} [004] 9 {Line} [004] 9 {Line} [004] 10 {Line} [004] 10 {Line} [004] 10 {Line} [004] 13 {Line} [003] 3 {Parameter} 'Param' -> 'char' [003] 7 {TypeAlias} 'FLOAT' -> 'float' [003] 4 {TypeAlias} 'INT' -> 'int' [003] 5 {Variable} 'Value' -> 'INT' [003] 3 {Line} [003] 5 {Line} [003] 5 {Line} [003] 13 {Line} [003] 13 {Line} [003] 13 {Line} [003] 13 {Line} Logical View: [000] {File} 'pr-44884-dwarf-gcc.o' -> elf32-littlearm [001] {CompileUnit} 'pr-44884.cpp' [002] {Producer} 'GNU C++14 10.2.1 20201103' [002] 1 {Function} extern not_inlined 'bar' -> 'int' [003] 1 {Parameter} 'Input' -> 'float' [003] 1 {Line} [003] 1 {Line} [003] 1 {Line} [002] 3 {Function} extern not_inlined 'foo' -> 'unsigned int' [003] {Block} [004] {Block} [005] 9 {Variable} 'Added' -> 'FLOAT' [005] 9 {Line} [005] 9 {Line} [005] 9 {Line} [005] 10 {Line} [005] 13 {Line} [004] 7 {TypeAlias} 'FLOAT' -> 'float' [003] 3 {Parameter} 'Param' -> 'char' [003] 4 {TypeAlias} 'INT' -> 'int' [003] 5 {Variable} 'Value' -> 'INT' [003] 3 {Line} [003] 5 {Line} [003] 13 {Line} [003] 14 {Line} [003] 14 {Line} Clang typedef (3) . GCC MSVC typedef . llvm-debuginfo-analyzer Typedef . llvm-debuginfo-analyzer --attribute=level,format --output-sort=name --select-types=Typedef --report=list --print=types pr-44884-*.o Logical View: [000] {File} 'pr-44884-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'pr_44884.cpp' [003] {TypeAlias} 'FLOAT' -> 'float' [003] {TypeAlias} 'INT' -> 'int' Logical View: [000] {File} 'pr-44884-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'pr_44884.cpp' [004] {TypeAlias} 'FLOAT' -> 'float' [003] {TypeAlias} 'INT' -> 'int' Logical View: [000] {File} 'pr-44884-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'pr_44884.cpp' [003] 7 {TypeAlias} 'FLOAT' -> 'float' [003] 4 {TypeAlias} 'INT' -> 'int' Logical View: [000] {File} 'pr-44884-dwarf-gcc.o' -> elf32-littlearm [001] {CompileUnit} 'pr_44884.cpp' [004] 7 {TypeAlias} 'FLOAT' -> 'float' [003] 4 {TypeAlias} 'INT' -> 'int' CodeView . ..SS - (TEST CASE 4 - MISSING NESTED ENUMERATIONS) llvm-debuginfo-analyzer . X86 Codeview ELF Clang GCC MSVC (-O0 -g). 1 struct Struct { 2 union Union { 3 enum NestedEnum { RED, BLUE }; 4 }; 5 Union U; 6 }; 7 8 Struct S; 9 int test() { 10 return S.U.BLUE; 11 } (scope issue) Clang : PR46466 (Bugs LLVM) / PR45811 (GitHub LLVM) llvm-debuginfo-analyzer (MSVC Clang GCC) (CodeView DWARF) . llvm-debuginfo-analyzer --attribute=level,format,producer --output-sort=name --print=symbols,types pr-46466-codeview-clang.o pr-46466-codeview-msvc.o pr-46466-dwarf-clang.o pr-46466-dwarf-gcc.o CodeView - Clang (Windows) Logical View: [000] {File} 'pr-46466-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'pr-46466.cpp' [002] {Producer} 'clang version 14.0.0' [002] {Variable} extern 'S' -> 'Struct' [002] 1 {Struct} 'Struct' [003] {Member} public 'U' -> 'Union' [003] 2 {Union} 'Union' [004] 3 {Enumeration} 'NestedEnum' -> 'int' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' CodeView - MSVC (Windows) Logical View: [000] {File} 'pr-46466-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'pr-46466.cpp' [002] {Producer} 'Microsoft (R) Optimizing Compiler' [002] {Variable} extern 'S' -> 'Struct' [002] 1 {Struct} 'Struct' [003] {Member} public 'U' -> 'Union' [003] 2 {Union} 'Union' [004] 3 {Enumeration} 'NestedEnum' -> 'int' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' Logical View: [000] {File} 'pr-46466-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-46466.cpp' [002] {Producer} 'clang version 14.0.0' [002] 8 {Variable} extern 'S' -> 'Struct' [002] 1 {Struct} 'Struct' [003] 5 {Member} public 'U' -> 'Union' DWARF - GCC (Linux) Logical View: [000] {File} 'pr-46466-dwarf-gcc.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-46466.cpp' [002] {Producer} 'GNU C++14 9.3.0' [002] 8 {Variable} extern 'S' -> 'Struct' [002] 1 {Struct} 'Struct' [003] 5 {Member} public 'U' -> 'Union' [003] 2 {Union} 'Union' [004] 3 {Enumeration} 'NestedEnum' -> 'unsigned int' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' DWARF Clang RED BLUE . DWARF GCC CodeView Clang MSVC . llvm-debuginfo-analyzer Enumerator . . llvm-debuginfo-analyzer --attribute=format,level --output-sort=name --select-types=Enumerator --report=parents --print=types pr-46466-*.o Logical View: [000] {File} 'pr-46466-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'pr-46466.cpp' [002] 1 {Struct} 'Struct' [003] 2 {Union} 'Union' [004] 3 {Enumeration} 'NestedEnum' -> 'int' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' Logical View: [000] {File} 'pr-46466-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'pr-46466.cpp' [002] 1 {Struct} 'Struct' [003] 2 {Union} 'Union' [004] 3 {Enumeration} 'NestedEnum' -> 'int' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' Logical View: [000] {File} 'pr-46466-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-46466.cpp' Logical View: [000] {File} 'pr-46466-dwarf-gcc.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-46466.cpp' [002] 1 {Struct} 'Struct' [003] 2 {Union} 'Union' [004] 3 {Enumeration} 'NestedEnum' -> 'unsigned int' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' llvm-debuginfo-analyzer Enumerator . . llvm-debuginfo-analyzer --attribute=format,level --output-sort=name --select-types=Enumerator --print=types,summary pr-46466-*.o Logical View: [000] {File} 'pr-46466-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'pr-46466.cpp' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' ----------------------------- Element Total Found ----------------------------- Scopes 5 0 Symbols 2 0 Types 6 2 Lines 0 0 ----------------------------- Total 13 2 Logical View: [000] {File} 'pr-46466-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'pr-46466.cpp' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' ----------------------------- Element Total Found ----------------------------- Scopes 5 0 Symbols 2 0 Types 7 2 Lines 0 0 ----------------------------- Total 14 2 Logical View: [000] {File} 'pr-46466-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-46466.cpp' ----------------------------- Element Total Found ----------------------------- Scopes 4 0 Symbols 0 0 Types 0 0 Lines 0 0 ----------------------------- Total 4 0 Logical View: [000] {File} 'pr-46466-dwarf-gcc.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-46466.cpp' [005] {Enumerator} 'BLUE' = '0x1' [005] {Enumerator} 'RED' = '0x0' ----------------------------- Element Total Found ----------------------------- Scopes 5 0 Symbols 0 0 Types 2 2 Lines 0 0 ----------------------------- Total 7 2 Found Types DWARF Clang . - (TEST CASE 5 - INCORRECT LEXICAL SCOPE FOR VARIABLE) llvm-debuginfo-analyzer . X86 Codeview ELF Clang GCC MSVC (-O0 -g). // definitions.h #ifdef _MSC_VER #define forceinline __forceinline #elif defined(__clang__) #if __has_attribute(__always_inline__) #define forceinline inline __attribute__((__always_inline__)) #else #define forceinline inline #endif #elif defined(__GNUC__) #define forceinline inline __attribute__((__always_inline__)) #else #define forceinline inline #error #endif inline forceinline . #include "definitions.h" 1 #include "definitions.h" 2 forceinline int InlineFunction(int Param) { 3 int Var_1 = Param; 4 { 5 int Var_2 = Param + Var_1; 6 Var_1 = Var_2; 7 } 8 return Var_1; 9 } 10 11 int test(int Param_1, int Param_2) { 12 int A = Param_1; 13 A += InlineFunction(Param_2); 14 return A; 15 } Clang : PR43860 (Bugs LLVM) / PR43205 (GitHub) llvm-debuginfo-analyzer (MSVC Clang GCC) (CodeView DWARF) . llvm-debuginfo-analyzer --attribute=level,format,producer --output-sort=name --print=symbols pr-43860-codeview-clang.o pr-43860-codeview-msvc.o pr-43860-dwarf-clang.o pr-43860-dwarf-gcc.o Logical View: [000] {File} 'pr-43860-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'pr-43860.cpp' [002] {Producer} 'clang version 14.0.0' [002] 2 {Function} inlined 'InlineFunction' -> 'int' [003] {Parameter} '' -> 'int' [002] {Function} extern not_inlined 'test' -> 'int' [003] {Variable} 'A' -> 'int' [003] {InlinedFunction} inlined 'InlineFunction' -> 'int' [004] {Parameter} 'Param' -> 'int' [004] {Variable} 'Var_1' -> 'int' [004] {Variable} 'Var_2' -> 'int' [003] {Parameter} 'Param_1' -> 'int' [003] {Parameter} 'Param_2' -> 'int' CODEVIEW - MSVC () Logical View: [000] {File} 'pr-43860-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'pr-43860.cpp' [002] {Producer} 'Microsoft (R) Optimizing Compiler' [002] {Function} extern not_inlined 'InlineFunction' -> 'int' [003] {Block} [004] {Variable} 'Var_2' -> 'int' [003] {Variable} 'Param' -> 'int' [003] {Variable} 'Var_1' -> 'int' [002] {Function} extern not_inlined 'test' -> 'int' [003] {Variable} 'A' -> 'int' [003] {Variable} 'Param_1' -> 'int' [003] {Variable} 'Param_2' -> 'int' DWARF - Clang () Logical View: [000] {File} 'pr-43860-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-43860.cpp' [002] {Producer} 'clang version 14.0.0' [002] 2 {Function} extern inlined 'InlineFunction' -> 'int' [003] {Block} [004] 5 {Variable} 'Var_2' -> 'int' [003] 2 {Parameter} 'Param' -> 'int' [003] 3 {Variable} 'Var_1' -> 'int' [002] 11 {Function} extern not_inlined 'test' -> 'int' [003] 12 {Variable} 'A' -> 'int' [003] 13 {InlinedFunction} inlined 'InlineFunction' -> 'int' [004] {Block} [005] {Variable} 'Var_2' -> 'int' [004] {Parameter} 'Param' -> 'int' [004] {Variable} 'Var_1' -> 'int' [003] 11 {Parameter} 'Param_1' -> 'int' [003] 11 {Parameter} 'Param_2' -> 'int' DWARF - GCC () Logical View: [000] {File} 'pr-43860-dwarf-gcc.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-43860.cpp' [002] {Producer} 'GNU C++14 9.3.0' [002] 2 {Function} extern declared_inlined 'InlineFunction' -> 'int' [003] {Block} [004] 5 {Variable} 'Var_2' -> 'int' [003] 2 {Parameter} 'Param' -> 'int' [003] 3 {Variable} 'Var_1' -> 'int' [002] 11 {Function} extern not_inlined 'test' -> 'int' [003] 12 {Variable} 'A' -> 'int' [003] 13 {InlinedFunction} declared_inlined 'InlineFunction' -> 'int' [004] {Block} [005] {Variable} 'Var_2' -> 'int' [004] {Parameter} 'Param' -> 'int' [004] {Variable} 'Var_1' -> 'int' [003] 11 {Parameter} 'Param_1' -> 'int' [003] 11 {Parameter} 'Param_2' -> 'int' CodeView Clang Var_1 Var_2 InlineFuction (4) . DWARF GCC/Clang CodeView MSVC : 3 4. llvm-debuginfo-analyzer var . . llvm-debuginfo-analyzer --attribute=level,format --output-sort=name --select-regex --select-nocase --select=Var --report=list --print=symbols pr-43860-*.o Logical View: [000] {File} 'pr-43860-codeview-clang.o' -> COFF-x86-64 [001] {CompileUnit} 'pr-43860.cpp' [004] {Variable} 'Var_1' -> 'int' [004] {Variable} 'Var_2' -> 'int' Logical View: [000] {File} 'pr-43860-codeview-msvc.o' -> COFF-i386 [001] {CompileUnit} 'pr-43860.cpp' [003] {Variable} 'Var_1' -> 'int' [004] {Variable} 'Var_2' -> 'int' Logical View: [000] {File} 'pr-43860-dwarf-clang.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-43860.cpp' [004] {Variable} 'Var_1' -> 'int' [003] 3 {Variable} 'Var_1' -> 'int' [005] {Variable} 'Var_2' -> 'int' [004] 5 {Variable} 'Var_2' -> 'int' Logical View: [000] {File} 'pr-43860-dwarf-gcc.o' -> elf64-x86-64 [001] {CompileUnit} 'pr-43860.cpp' [004] {Variable} 'Var_1' -> 'int' [003] 3 {Variable} 'Var_1' -> 'int' [005] {Variable} 'Var_2' -> 'int' [004] 5 {Variable} 'Var_2' -> 'int' CodeView . ..SS " - (TEST CASE 6 - FULL LOGICAL VIEW)" llvm-debuginfo-analyzer . llvm-debuginfo-analyzer --attribute=all --print=all test-dwarf-clang.o Logical View: [0x0000000000][000] {File} 'test-dwarf-clang.o' -> elf64-x86-64 [0x000000000b][001] {CompileUnit} 'test.cpp' [0x000000000b][002] {Producer} 'clang version 12.0.0' {Directory} '' {File} 'test.cpp' {Public} 'foo' [0x0000000000:0x000000003a] [0x000000000b][002] {Range} Lines 2:9 [0x0000000000:0x000000003a] [0x00000000bc][002] {BaseType} 'bool' [0x0000000099][002] {BaseType} 'int' [0x00000000b5][002] {BaseType} 'unsigned int' [0x00000000a0][002] {Source} '/test.cpp' [0x00000000a0][002] 1 {TypeAlias} 'INTPTR' -> [0x00000000ab]'* const int' [0x000000002a][002] 2 {Function} extern not_inlined 'foo' -> [0x0000000099]'int' [0x000000002a][003] {Range} Lines 2:9 [0x0000000000:0x000000003a] [0x000000002a][003] {Linkage} 0x2 '_Z3fooPKijb' [0x0000000071][003] {Block} [0x0000000071][004] {Range} Lines 5:8 [0x000000001c:0x000000002f] [0x000000007e][004] 5 {Variable} 'CONSTANT' -> [0x00000000c3]'const INTEGER' [0x000000007e][005] {Coverage} 100.00% [0x000000007f][005] {Location} [0x000000007f][006] {Entry} Stack Offset: -28 (0xffffffffffffffe4) [DW_OP_fbreg] [0x000000001c][004] 5 {Line} {NewStatement} '/test.cpp' [0x000000001c][004] {Code} 'movl $0x7, -0x1c(%rbp)' [0x0000000023][004] 6 {Line} {NewStatement} '/test.cpp' [0x0000000023][004] {Code} 'movl $0x7, -0x4(%rbp)' [0x000000002a][004] {Code} 'jmp 0x6' [0x000000002f][004] 8 {Line} {NewStatement} '/test.cpp' [0x000000002f][004] {Code} 'movl -0x14(%rbp), %eax' [0x0000000063][003] 2 {Parameter} 'ParamBool' -> [0x00000000bc]'bool' [0x0000000063][004] {Coverage} 100.00% [0x0000000064][004] {Location} [0x0000000064][005] {Entry} Stack Offset: -21 (0xffffffffffffffeb) [DW_OP_fbreg] [0x0000000047][003] 2 {Parameter} 'ParamPtr' -> [0x00000000a0]'INTPTR' [0x0000000047][004] {Coverage} 100.00% [0x0000000048][004] {Location} [0x0000000048][005] {Entry} Stack Offset: -16 (0xfffffffffffffff0) [DW_OP_fbreg] [0x0000000055][003] 2 {Parameter} 'ParamUnsigned' -> [0x00000000b5]'unsigned int' [0x0000000055][004] {Coverage} 100.00% [0x0000000056][004] {Location} [0x0000000056][005] {Entry} Stack Offset: -20 (0xffffffffffffffec) [DW_OP_fbreg] [0x000000008d][003] 4 {TypeAlias} 'INTEGER' -> [0x0000000099]'int' [0x0000000000][003] 2 {Line} {NewStatement} '/test.cpp' [0x0000000000][003] {Code} 'pushq %rbp' [0x0000000001][003] {Code} 'movq %rsp, %rbp' [0x0000000004][003] {Code} 'movb %dl, %al' [0x0000000006][003] {Code} 'movq %rdi, -0x10(%rbp)' [0x000000000a][003] {Code} 'movl %esi, -0x14(%rbp)' [0x000000000d][003] {Code} 'andb $0x1, %al' [0x000000000f][003] {Code} 'movb %al, -0x15(%rbp)' [0x0000000012][003] 3 {Line} {NewStatement} {PrologueEnd} '/test.cpp' [0x0000000012][003] {Code} 'testb $0x1, -0x15(%rbp)' [0x0000000016][003] {Code} 'je 0x13' [0x0000000032][003] 8 {Line} '/test.cpp' [0x0000000032][003] {Code} 'movl %eax, -0x4(%rbp)' [0x0000000035][003] 9 {Line} {NewStatement} '/test.cpp' [0x0000000035][003] {Code} 'movl -0x4(%rbp), %eax' [0x0000000038][003] {Code} 'popq %rbp' [0x0000000039][003] {Code} 'retq' [0x000000003a][003] 9 {Line} {NewStatement} {EndSequence} '/test.cpp' ----------------------------- Element Total Printed ----------------------------- Scopes 3 3 Symbols 4 4 Types 5 5 Lines 25 25 ----------------------------- Total 37 37 Scope Sizes: 189 (100.00%) : [0x000000000b][001] {CompileUnit} 'test.cpp' 110 ( 58.20%) : [0x000000002a][002] 2 {Function} extern not_inlined 'foo' -> [0x0000000099]'int' 27 ( 14.29%) : [0x0000000071][003] {Block} Totals by lexical level: [001]: 189 (100.00%) [002]: 110 ( 58.20%) [003]: 27 ( 14.29%) Scope Sizes DWARF . [0x000000002a][002] 2 {Function} extern not_inlined 'foo' -> [0x0000000099]'int' [0x000000002a][003] {Range} Lines 2:9 [0x0000000000:0x000000003a] [0x000000002a][003] {Linkage} 0x2 '_Z3fooPKijb' [0x0000000071][003] {Block} [0x0000000071][004] {Range} Lines 5:8 [0x000000001c:0x000000002f] [0x000000007e][004] 5 {Variable} 'CONSTANT' -> [0x00000000c3]'const INTEGER' [0x000000007e][005] {Coverage} 100.00% [0x000000007f][005] {Location} [0x000000007f][006] {Entry} Stack Offset: -28 (0xffffffffffffffe4) [DW_OP_fbreg] {Range} . foo 2 9 . {Coverage} {Location} . ..SS " (WEBASSEMBLY SUPPORT)" WebAssembly llvm-debuginfo-analyzer . - WebAssembly Clang (-O0 -g --target=wasm32) : 1 using INTPTR = const int *; 2 int foo(INTPTR ParamPtr, unsigned ParamUnsigned, bool ParamBool) { 3 if (ParamBool) { 4 typedef int INTEGER; 5 const INTEGER CONSTANT = 7; 6 return CONSTANT; 7 } 8 return ParamUnsigned; 9 } (PRINT BASIC DETAILS) . llvm-debuginfo-analyzer --attribute=level,format --output-sort=offset --print=scopes,symbols,types,lines,instructions test-clang.o llvm-debuginfo-analyzer --attribute=level,format --output-sort=offset --print=elements test-clang.o . ( ) . Logical View: [000] {File} 'test-clang.o' -> WASM [001] {CompileUnit} 'test.cpp' [002] 2 {Function} extern not_inlined 'foo' -> 'int' [003] 2 {Parameter} 'ParamPtr' -> 'INTPTR' [003] 2 {Parameter} 'ParamUnsigned' -> 'unsigned int' [003] 2 {Parameter} 'ParamBool' -> 'bool' [003] {Block} [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' [004] 5 {Line} [004] {Code} 'i32.const 7' [004] {Code} 'local.set 10' [004] {Code} 'local.get 5' [004] {Code} 'local.get 10' [004] {Code} 'i32.store 12' [004] 6 {Line} [004] {Code} 'i32.const 7' [004] {Code} 'local.set 11' [004] {Code} 'local.get 5' [004] {Code} 'local.get 11' [004] {Code} 'i32.store 28' [004] {Code} 'br 1' [004] - {Line} [004] {Code} 'end' [003] 4 {TypeAlias} 'INTEGER' -> 'int' [003] 2 {Line} [003] {Code} 'nop' [003] {Code} 'end' [003] {Code} 'i64.div_s' [003] {Code} 'global.get 0' [003] {Code} 'local.set 3' [003] {Code} 'i32.const 32' [003] {Code} 'local.set 4' [003] {Code} 'local.get 3' [003] {Code} 'local.get 4' [003] {Code} 'i32.sub' [003] {Code} 'local.set 5' [003] {Code} 'local.get 5' [003] {Code} 'local.get 0' [003] {Code} 'i32.store 24' [003] {Code} 'local.get 5' [003] {Code} 'local.get 1' [003] {Code} 'i32.store 20' [003] {Code} 'local.get 2' [003] {Code} 'local.set 6' [003] {Code} 'local.get 5' [003] {Code} 'local.get 6' [003] {Code} 'i32.store8 19' [003] 3 {Line} [003] {Code} 'local.get 5' [003] {Code} 'i32.load8_u 19' [003] {Code} 'local.set 7' [003] 3 {Line} [003] {Code} 'i32.const 1' [003] {Code} 'local.set 8' [003] {Code} 'local.get 7' [003] {Code} 'local.get 8' [003] {Code} 'i32.and' [003] {Code} 'local.set 9' [003] {Code} 'block' [003] {Code} 'block' [003] {Code} 'local.get 9' [003] {Code} 'i32.eqz' [003] {Code} 'br_if 0' [003] 8 {Line} [003] {Code} 'local.get 5' [003] {Code} 'i32.load 20' [003] {Code} 'local.set 12' [003] 8 {Line} [003] {Code} 'local.get 5' [003] {Code} 'local.get 12' [003] {Code} 'i32.store 28' [003] - {Line} [003] {Code} 'end' [003] 9 {Line} [003] {Code} 'local.get 5' [003] {Code} 'i32.load 28' [003] {Code} 'local.set 13' [003] {Code} 'local.get 13' [003] {Code} 'return' [003] {Code} 'end' [003] 9 {Line} [003] {Code} 'unreachable' [002] 1 {TypeAlias} 'INTPTR' -> '* const int' instructions symbols types 'block' '.store' . llvm-debuginfo-analyzer --attribute=level --select-nocase --select-regex --select=BLOCK --select=.store --report=list --print=symbols,types,instructions,summary test-clang.o Logical View: [000] {File} 'test-clang.o' [001] {CompileUnit} 'test.cpp' [003] {Code} 'block' [003] {Code} 'block' [004] {Code} 'i32.store 12' [003] {Code} 'i32.store 20' [003] {Code} 'i32.store 24' [004] {Code} 'i32.store 28' [003] {Code} 'i32.store 28' [003] {Code} 'i32.store8 19' ----------------------------- Element Total Printed ----------------------------- Scopes 3 0 Symbols 4 0 Types 2 0 Lines 62 8 ----------------------------- Total 71 8 (COMPARISON MODE) ( 'typedef int INTEGER') . GCC test-dwarf-gcc.o . llvm-debuginfo-analyzer --attribute=level --select-regex --select-nocase --select=INTe --report=list --print=symbols,types test-clang.o test-dwarf-gcc.o Logical View: [000] {File} 'test-clang.o' [001] {CompileUnit} 'test.cpp' [003] 4 {TypeAlias} 'INTEGER' -> 'int' [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' Logical View: [000] {File} 'test-dwarf-gcc.o' [001] {CompileUnit} 'test.cpp' [004] 4 {TypeAlias} 'INTEGER' -> 'int' [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' 'typedef INTEGER' (scope level) . GCC '4' . : ..SS " (LOGICAL VIEW)" . (-) (+) . llvm-debuginfo-analyzer --attribute=level --compare=types --report=view --print=symbols,types test-clang.o test-dwarf-gcc.o Reference: 'test-clang.o' Target: 'test-dwarf-gcc.o' Logical View: [000] {File} 'test-clang.o' [001] {CompileUnit} 'test.cpp' [002] 1 {TypeAlias} 'INTPTR' -> '* const int' [002] 2 {Function} extern not_inlined 'foo' -> 'int' [003] {Block} [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER' +[004] 4 {TypeAlias} 'INTEGER' -> 'int' [003] 2 {Parameter} 'ParamBool' -> 'bool' [003] 2 {Parameter} 'ParamPtr' -> 'INTPTR' [003] 2 {Parameter} 'ParamUnsigned' -> 'unsigned int' -[003] 4 {TypeAlias} 'INTEGER' -> 'int' ( ) . (LOGICAL ELEMENTS) . (lexical scope level) . llvm-debuginfo-analyzer --attribute=level --compare=types --report=list --print=symbols,types,summary test-clang.o test-dwarf-gcc.o Reference: 'test-clang.o' Target: 'test-dwarf-gcc.o' (1) Missing Types: -[003] 4 {TypeAlias} 'INTEGER' -> 'int' (1) Added Types: +[004] 4 {TypeAlias} 'INTEGER' -> 'int' ---------------------------------------- Element Expected Missing Added ---------------------------------------- Scopes 4 0 0 Symbols 0 0 0 Types 2 1 1 Lines 0 0 0 ---------------------------------------- Total 6 1 1 Reference Target: llvm-debuginfo-analyzer --attribute=level --compare=types --report=list --print=symbols,types,summary test-dwarf-gcc.o test-clang.o Reference: 'test-dwarf-gcc.o' Target: 'test-clang.o' (1) Missing Types: -[004] 4 {TypeAlias} 'INTEGER' -> 'int' (1) Added Types: +[003] 4 {TypeAlias} 'INTEGER' -> 'int' ---------------------------------------- Element Expected Missing Added ---------------------------------------- Scopes 4 0 0 Symbols 0 0 0 Types 2 1 1 Lines 0 0 0 ---------------------------------------- Total 6 1 1 Reference Target Added Types Missing Types ..SH " (EXIT STATUS)" llvm-debuginfo-analyzer 0 . 1 . (LIMITATIONS AND KNOWN ISSUES) Limitations . (SEE ALSO) llvm-dwarfdump (AUTHORS) LLVM (https://llvm.org). (COPYRIGHT) 2003-2026, LLVM Project 22 2026-07-15 LLVM-DEBUGINFO-ANALYZER(1)