| 1 | LogicalView unit tests input files generation |
| 2 | ============================================= |
| 3 | |
| 4 | # Source file: test.cpp |
| 5 | |
| 6 | ``` |
| 7 | using INTPTR = const int *; |
| 8 | int foo(INTPTR ParamPtr, unsigned ParamUnsigned, bool ParamBool) { |
| 9 | if (ParamBool) { |
| 10 | typedef int INTEGER; |
| 11 | const INTEGER CONSTANT = 7; |
| 12 | return CONSTANT; |
| 13 | } |
| 14 | return ParamUnsigned; |
| 15 | } |
| 16 | ``` |
| 17 | |
| 18 | # Linux binary files: |
| 19 | |
| 20 | ## test-dwarf-clang.o |
| 21 | |
| 22 | ```clang -c -w -g -gdwarf-4 -O0 test.cpp -o test-dwarf-clang.o``` |
| 23 | |
| 24 | ## test-dwarf-gcc.o |
| 25 | |
| 26 | ```g++ -c -w -g -O0 test.cpp -o test-dwarf-gcc.o``` |
| 27 | |
| 28 | # Windows binary files: |
| 29 | |
| 30 | ## test-codeview-clang.o |
| 31 | |
| 32 | ```clang++.exe --target=x86_64-windows -c -w -g -gcodeview test.cpp -o test-codeview-clang.o``` |
| 33 | |
| 34 | ## test-codeview-msvc.o |
| 35 | |
| 36 | ```cl.exe /nologo /EHsc /Od /Z7 /Fotest-codeview-msvc.o /c test.cpp``` |
| 37 | |
| 38 | ## test-codeview-pdb-msvc.o and test-codeview-pdb-msvc-.pdb |
| 39 | |
| 40 | ```cl.exe /nologo /EHsc /Od /Zi /Fotest-codeview-pdb-msvc.o /Fdtest-codeview-pdb-msvc-.pdb /c test.cpp``` |
| 41 | |
| 42 | ## test-codeview-msvc.lib |
| 43 | |
| 44 | This file is a static library embedding the **test-codeview-msvc.o** object file. |
| 45 | It is generated by the "lib.exe" tool shipped with MSVC compiler. |
| 46 | |
| 47 | ```lib.exe /OUT:test-codeview-msvc.lib test-codeview-msvc.o``` |