xref: /llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/cmdline.test (revision b2ea9ec7fcf37ca01979c11c5b2b1cab0e1ae212)
1RUN: llvm-debuginfo-analyzer --version 2>&1 | FileCheck --check-prefix=VERSION %s
2VERSION: {{ version }}
3
4RUN: llvm-debuginfo-analyzer -h > %t 2>&1
5RUN: FileCheck -input-file=%t %s --check-prefix=HELP --implicit-check-not=out-file
6RUN: llvm-debuginfo-analyzer --help > %t 2>&1
7RUN: FileCheck -input-file=%t %s --check-prefix=HELP --implicit-check-not=out-file
8HELP: OVERVIEW: Printing a logical representation of low-level debug information.
9HELP: USAGE: llvm-debuginfo-analyzer{{[^ ]*}} [options] <input object files or .dSYM bundles>
10HELP: OPTIONS:
11HELP: Generic Options:
12HELP:   --help          - Display available options (--help-hidden for more)
13HELP:   --help-list     - Display list of available options (--help-list-hidden for more)
14HELP:   --version       - Display the version of this program
15HELP: Print Options:
16HELP: These control which elements are printed.
17HELP:   --print=<value> - Element to print.
18HELP:     =all          -   All elements.
19HELP:     =elements     -   Instructions, lines, scopes, symbols and types.
20HELP:     =instructions -   Assembler instructions.
21HELP:     =lines        -   Lines referenced in the debug information.
22HELP:     =scopes       -   A lexical block (Function, Class, etc.).
23HELP:     =sizes        -   Scope contributions to the debug information.
24HELP:     =summary      -   Summary of elements missing/added/matched/printed.
25HELP:     =symbols      -   Symbols (Variable, Members, etc.).
26HELP:     =types        -   Types (Pointer, Reference, etc.).
27HELP:     =warnings     -   Warnings detected.
28HELP: Pass @FILE as argument to read options from FILE.
29
30RUN: llvm-debuginfo-analyzer --help-hidden > %t 2>&1
31RUN: FileCheck -input-file=%t %s --check-prefix=HELP-ALL --implicit-check-not=out-file
32HELP-ALL: OVERVIEW: Printing a logical representation of low-level debug information.
33HELP-ALL: USAGE: llvm-debuginfo-analyzer{{[^ ]*}} [options] <input object files or .dSYM bundles>
34HELP-ALL: OPTIONS:
35HELP-ALL: Attribute Options:
36HELP-ALL: These control extra attributes that are added when the element is printed.
37HELP-ALL:   --attribute=<value>        - Element attributes.
38HELP-ALL:     =all                     -   Include all attributes.
39HELP-ALL:     =argument                -   Template parameters replaced by its arguments.
40HELP-ALL:     =base                    -   Base types (int, bool, etc.).
41HELP-ALL:     =coverage                -   Symbol location coverage.
42HELP-ALL:     =directories             -   Directories referenced in the debug information.
43HELP-ALL:     =discarded               -   Discarded elements by the linker.
44HELP-ALL:     =discriminator           -   Discriminators for inlined function instances.
45HELP-ALL:     =encoded                 -   Template arguments encoded in the template name.
46HELP-ALL:     =extended                -   Advanced attributes alias.
47HELP-ALL:     =filename                -   Filename where the element is defined.
48HELP-ALL:     =files                   -   Files referenced in the debug information.
49HELP-ALL:     =format                  -   Object file format name.
50HELP-ALL:     =gaps                    -   Missing debug location (gaps).
51HELP-ALL:     =generated               -   Compiler generated elements.
52HELP-ALL:     =global                  -   Element referenced across Compile Units.
53HELP-ALL:     =inserted                -   Generated inlined abstract references.
54HELP-ALL:     =level                   -   Lexical scope level (File=0, Compile Unit=1).
55HELP-ALL:     =linkage                 -   Linkage name.
56HELP-ALL:     =local                   -   Element referenced only in the Compile Unit.
57HELP-ALL:     =location                -   Element debug location.
58HELP-ALL:     =offset                  -   Debug information offset.
59HELP-ALL:     =pathname                -   Pathname where the element is defined.
60HELP-ALL:     =producer                -   Toolchain identification name.
61HELP-ALL:     =publics                 -   Function names that are public.
62HELP-ALL:     =qualified               -   The element type include parents in its name.
63HELP-ALL:     =qualifier               -   Line qualifiers (Newstatement, BasicBlock, etc.).
64HELP-ALL:     =range                   -   Debug location ranges.
65HELP-ALL:     =reference               -   Element declaration and definition references.
66HELP-ALL:     =register                -   Processor register names.
67HELP-ALL:     =standard                -   Basic attributes alias.
68HELP-ALL:     =subrange                -   Subrange encoding information for arrays.
69HELP-ALL:     =system                  -   Display PDB's MS system elements.
70HELP-ALL:     =typename                -   Include Parameters in templates.
71HELP-ALL:     =underlying              -   Underlying type for type definitions.
72HELP-ALL:     =zero                    -   Zero line numbers.
73HELP-ALL: Compare Options:
74HELP-ALL: These control the view comparison.
75HELP-ALL:   --compare=<value>          - Elements to compare.
76HELP-ALL:     =all                     -   Compare all elements.
77HELP-ALL:     =lines                   -   Lines.
78HELP-ALL:     =scopes                  -   Scopes.
79HELP-ALL:     =symbols                 -   Symbols.
80HELP-ALL:     =types                   -   Types.
81HELP-ALL:   --compare-context          - Add the view as compare context.
82HELP-ALL: Generic Options:
83HELP-ALL:   -h                         - Alias for --help
84HELP-ALL:   --help                     - Display available options (--help-hidden for more)
85HELP-ALL:   --help-hidden              - Display all available options
86HELP-ALL:   --help-list                - Display list of available options (--help-list-hidden for more)
87HELP-ALL:   --help-list-hidden         - Display list of all available options
88HELP-ALL:   --print-all-options        - Print all option values after command line parsing
89HELP-ALL:   --print-options            - Print non-default options after command line parsing
90HELP-ALL:   --version                  - Display the version of this program
91HELP-ALL: Internal Options:
92HELP-ALL: Internal traces and extra debugging code.
93HELP-ALL:   --internal=<value>         - Traces to enable.
94HELP-ALL:     =all                     -   Enable all traces.
95HELP-ALL:     =cmdline                 -   Print command line.
96HELP-ALL:     =id                      -   Print unique element ID
97HELP-ALL:     =integrity               -   Check elements integrity.
98HELP-ALL:     =none                    -   Ignore element line number.
99HELP-ALL:     =tag                     -   Debug information tags.
100HELP-ALL: Output Options:
101HELP-ALL: These control the output generated.
102HELP-ALL:   --output=<value>           - Outputs for view.
103HELP-ALL:     =all                     -   All outputs.
104HELP-ALL:     =split                   -   Split the output by Compile Units.
105HELP-ALL:     =text                    -   Use a free form text output.
106HELP-ALL:     =json                    -   Use JSON as the output format.
107HELP-ALL:   --output-file=<filename>   - Redirect output to the specified file.
108HELP-ALL:   --output-folder=<pathname> - Folder name for view splitting.
109HELP-ALL:   --output-level=<N>         - Only print to a depth of N elements.
110HELP-ALL:   --output-sort=<value>      - Primary key when ordering logical view (default: line).
111HELP-ALL:     =kind                    -   Sort by element kind.
112HELP-ALL:     =line                    -   Sort by element line number.
113HELP-ALL:     =name                    -   Sort by element name.
114HELP-ALL:     =offset                  -   Sort by element offset.
115HELP-ALL: Print Options:
116HELP-ALL: These control which elements are printed.
117HELP-ALL:   --print=<value>            - Element to print.
118HELP-ALL:     =all                     -   All elements.
119HELP-ALL:     =elements                -   Instructions, lines, scopes, symbols and types.
120HELP-ALL:     =instructions            -   Assembler instructions.
121HELP-ALL:     =lines                   -   Lines referenced in the debug information.
122HELP-ALL:     =scopes                  -   A lexical block (Function, Class, etc.).
123HELP-ALL:     =sizes                   -   Scope contributions to the debug information.
124HELP-ALL:     =summary                 -   Summary of elements missing/added/matched/printed.
125HELP-ALL:     =symbols                 -   Symbols (Variable, Members, etc.).
126HELP-ALL:     =types                   -   Types (Pointer, Reference, etc.).
127HELP-ALL:     =warnings                -   Warnings detected.
128HELP-ALL: Report Options:
129HELP-ALL: These control how the elements are printed.
130HELP-ALL:   --report=<value>           - Reports layout used for print, compare and select.
131HELP-ALL:     =all                     -   Generate all reports.
132HELP-ALL:     =children                -   Selected elements are displayed in a tree view (Include children)
133HELP-ALL:     =list                    -   Selected elements are displayed in a tabular format.
134HELP-ALL:     =parents                 -   Selected elements are displayed in a tree view. (Include parents)
135HELP-ALL:     =view                    -   Selected elements are displayed in a tree view (Include parents and children.
136HELP-ALL: Select Options:
137HELP-ALL: These control which elements are selected.
138HELP-ALL:   --select=<pattern>         - Search elements matching the given pattern.
139HELP-ALL:   --select-elements=<value>  - Conditions to use when printing elements.
140HELP-ALL:     =Discarded               -   Discarded elements by the linker.
141HELP-ALL:     =Global                  -   Element referenced across Compile Units.
142HELP-ALL:     =Optimized               -   Generated inlined abstract references.
143HELP-ALL:   --select-lines=<value>     - Line kind to use when printing lines.
144HELP-ALL:     =AlwaysStepInto          -   Always Step Into.
145HELP-ALL:     =BasicBlock              -   Basic block.
146HELP-ALL:     =Discriminator           -   Discriminator.
147HELP-ALL:     =EndSequence             -   End sequence.
148HELP-ALL:     =EpilogueBegin.          -   Epilogue begin.
149HELP-ALL:     =LineDebug               -   Debug line.
150HELP-ALL:     =LineAssembler           -   Assembler line.
151HELP-ALL:     =NeverStepInto           -   Never Step Into.
152HELP-ALL:     =NewStatement            -   New statement.
153HELP-ALL:     =PrologueEnd             -   Prologue end.
154HELP-ALL:   --select-nocase            - Ignore case distinctions when searching.
155HELP-ALL:   --select-offsets=<offset>  - Offset element to print.
156HELP-ALL:   --select-regex             - Treat any <pattern> strings as regular expressions when selecting instead of just as an exact string match.
157HELP-ALL:   --select-scopes=<value>    - Scope kind to use when printing scopes.
158HELP-ALL:     =Aggregate               -   Class, Structure or Union.
159HELP-ALL:     =Array                   -   Array.
160HELP-ALL:     =Block                   -   Lexical block.
161HELP-ALL:     =CallSite                -   Call site block.
162HELP-ALL:     =CatchBlock              -   Exception catch block.
163HELP-ALL:     =Class                   -   Class.
164HELP-ALL:     =CompileUnit             -   Compile unit.
165HELP-ALL:     =EntryPoint              -   Function entry point.
166HELP-ALL:     =Enumeration             -   Enumeration.
167HELP-ALL:     =Function                -   Function.
168HELP-ALL:     =FunctionType            -   Function type.
169HELP-ALL:     =InlinedFunction         -   Inlined function.
170HELP-ALL:     =Label                   -   Label.
171HELP-ALL:     =LexicalBlock            -   Lexical block.
172HELP-ALL:     =Namespace               -   Namespace.
173HELP-ALL:     =Root                    -   Root.
174HELP-ALL:     =Structure               -   Structure.
175HELP-ALL:     =Subprogram              -   Subprogram.
176HELP-ALL:     =Template                -   Template.
177HELP-ALL:     =TemplateAlias           -   Template alias.
178HELP-ALL:     =TemplatePack            -   Template pack.
179HELP-ALL:     =TryBlock                -   Exception try block.
180HELP-ALL:     =Union                   -   Union.
181HELP-ALL:   --select-symbols=<value>   - Symbol kind to use when printing symbols.
182HELP-ALL:     =CallSiteParameter       -   Call site parameter.
183HELP-ALL:     =Constant                -   Constant.
184HELP-ALL:     =Inheritance             -   Inheritance.
185HELP-ALL:     =Member                  -   Member.
186HELP-ALL:     =Parameter               -   Parameter.
187HELP-ALL:     =Unspecified             -   Unspecified parameter.
188HELP-ALL:     =Variable                -   Variable.
189HELP-ALL:   --select-types=<value>     - Type kind to use when printing types.
190HELP-ALL:     =Base                    -   Base Type (int, bool, etc.).
191HELP-ALL:     =Const                   -   Constant specifier.
192HELP-ALL:     =Enumerator              -   Enumerator.
193HELP-ALL:     =Import                  -   Import.
194HELP-ALL:     =ImportDeclaration       -   Import declaration.
195HELP-ALL:     =ImportModule            -   Import module.
196HELP-ALL:     =Pointer                 -   Pointer.
197HELP-ALL:     =PointerMember           -   Pointer to member.
198HELP-ALL:     =Reference               -   Reference type.
199HELP-ALL:     =Restrict                -   Restrict specifier.
200HELP-ALL:     =RvalueReference         -   Rvalue reference.
201HELP-ALL:     =Subrange                -   Array subrange.
202HELP-ALL:     =TemplateParam           -   Template Parameter.
203HELP-ALL:     =TemplateTemplateParam   -   Template template parameter.
204HELP-ALL:     =TemplateTypeParam       -   Template type parameter.
205HELP-ALL:     =TemplateValueParam      -   Template value parameter.
206HELP-ALL:     =Typedef                 -   Type definition.
207HELP-ALL:     =Unspecified             -   Unspecified type.
208HELP-ALL:     =Volatile                -   Volatile specifier.
209HELP-ALL: Warning Options:
210HELP-ALL: These control the generated warnings.
211HELP-ALL:   --warning=<value>          - Warnings to generate.
212HELP-ALL:     =all                     -   All warnings.
213HELP-ALL:     =coverages               -   Invalid symbol coverages values.
214HELP-ALL:     =lines                   -   Debug lines that are zero.
215HELP-ALL:     =locations               -   Invalid symbol locations.
216HELP-ALL:     =ranges                  -   Invalid code ranges.
217HELP-ALL: Pass @FILE as argument to read options from FILE.
218