aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm14/tools/llvm-objdump/ObjdumpOpts.td
blob: 9f27a6cdf163fb7f0e31f920fa88c91c2cfe14ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
include "llvm/Option/OptParser.td"

multiclass Eq<string name, string help> {
  def NAME : Separate<["--"], name>;
  def NAME #_eq : Joined<["--"], name #"=">,
                  Alias<!cast<Separate>(NAME)>,
                  HelpText<help>;
}

def help : Flag<["--"], "help">,
  HelpText<"Display available options (--help-hidden for more)">;

def help_hidden : Flag<["--"], "help-hidden">,
  Flags<[HelpHidden]>,
  HelpText<"Display all available options">;

def version : Flag<["--"], "version">,
  HelpText<"Display the version of this program">;
def : Flag<["-"], "v">, Alias<version>, HelpText<"Alias for --version">;

def adjust_vma_EQ : Joined<["--"], "adjust-vma=">,
  MetaVarName<"offset">,
  HelpText<"Increase the displayed address by the specified offset">;

def all_headers : Flag<["--"], "all-headers">,
  HelpText<"Display all available header information, "
           "relocation entries and the symbol table">;
def : Flag<["-"], "x">, Alias<all_headers>, HelpText<"Alias for --all-headers">;

def arch_name_EQ : Joined<["--"], "arch-name=">,
  HelpText<"Target arch to disassemble for, "
            "see --version for available targets">;
def archive_headers : Flag<["--"], "archive-headers">,
  HelpText<"Display archive header information">;

def : Flag<["-"], "a">, Alias<archive_headers>,
  HelpText<"Alias for --archive-headers">;

def demangle : Flag<["--"], "demangle">, HelpText<"Demangle symbol names">;
def : Flag<["-"], "C">, Alias<demangle>, HelpText<"Alias for --demangle">;

def disassemble : Flag<["--"], "disassemble">,
  HelpText<"Disassemble all executable sections found in the input files">;
def : Flag<["-"], "d">, Alias<disassemble>, HelpText<"Alias for --disassemble">;

def disassemble_all : Flag<["--"], "disassemble-all">,
  HelpText<"Disassemble all sections found in the input files">;
def : Flag<["-"], "D">, Alias<disassemble_all>,
  HelpText<"Alias for --disassemble-all">;

def symbol_description : Flag<["--"], "symbol-description">,
  HelpText<"Add symbol description for disassembly. This "
           "option is for XCOFF files only.">;

def disassemble_symbols_EQ : Joined<["--"], "disassemble-symbols=">,
  HelpText<"List of symbols to disassemble. "
           "Accept demangled names when --demangle is "
           "specified, otherwise accept mangled names">;

def disassemble_zeroes : Flag<["--"], "disassemble-zeroes">,
  HelpText<"Do not skip blocks of zeroes when disassembling">;
def : Flag<["-"], "z">, Alias<disassemble_zeroes>,
  HelpText<"Alias for --disassemble-zeroes">;

def disassembler_options_EQ : Joined<["--"], "disassembler-options=">,
  MetaVarName<"options">,
  HelpText<"Pass target specific disassembler options">;
def : JoinedOrSeparate<["-"], "M">, Alias<disassembler_options_EQ>,
  HelpText<"Alias for --disassembler-options=">;

def dynamic_reloc : Flag<["--"], "dynamic-reloc">,
  HelpText<"Display the dynamic relocation entries in the file">;
def : Flag<["-"], "R">, Alias<dynamic_reloc>,
  HelpText<"Alias for --dynamic-reloc">;

def dwarf_EQ : Joined<["--"], "dwarf=">,
  HelpText<"Dump the specified DWARF debug sections. The "
           "only supported value is 'frames'">,
  Values<"frames">;

def fault_map_section : Flag<["--"], "fault-map-section">,
  HelpText<"Display the content of the fault map section">;

def file_headers : Flag<["--"], "file-headers">,
  HelpText<"Display the contents of the overall file header">;
def : Flag<["-"], "f">, Alias<file_headers>,
  HelpText<"Alias for --file-headers">;

def full_contents : Flag<["--"], "full-contents">,
  HelpText<"Display the content of each section">;
def : Flag<["-"], "s">, Alias<full_contents>,
  HelpText<"Alias for --full-contents">;

def line_numbers : Flag<["--"], "line-numbers">,
  HelpText<"When disassembling, display source line numbers. "
           "Implies --disassemble">;
def : Flag<["-"], "l">,
  Alias<line_numbers>,
  HelpText<"Alias for --line-numbers">;

def macho : Flag<["--"], "macho">,
  HelpText<"Use MachO specific object file parser">;
def : Flag<["-"], "m">, Alias<macho>, HelpText<"Alias for --macho">;

def mcpu_EQ : Joined<["--"], "mcpu=">,
  MetaVarName<"cpu-name">,
  HelpText<"Target a specific cpu type (--mcpu=help for details)">;

def mattr_EQ : Joined<["--"], "mattr=">,
  MetaVarName<"a1,+a2,-a3,...">,
  HelpText<"Target specific attributes (--mattr=help for details)">;

def no_show_raw_insn : Flag<["--"], "no-show-raw-insn">,
  HelpText<"When disassembling instructions, "
           "do not print the instruction bytes.">;

def no_leading_addr : Flag<["--"], "no-leading-addr">,
  HelpText<"When disassembling, do not print leading addresses">;

def raw_clang_ast : Flag<["--"], "raw-clang-ast">,
  HelpText<"Dump the raw binary contents of the clang AST section">;

def reloc : Flag<["--"], "reloc">,
  HelpText<"Display the relocation entries in the file">;
def : Flag<["-"], "r">, Alias<reloc>, HelpText<"Alias for --reloc">;

def print_imm_hex : Flag<["--"], "print-imm-hex">,
  HelpText<"Use hex format for immediate values">;

def no_print_imm_hex : Flag<["--"], "no-print-imm-hex">,
  HelpText<"Do not use hex format for immediate values (default)">;
def : Flag<["--"], "print-imm-hex=false">, Alias<no_print_imm_hex>;

def private_headers : Flag<["--"], "private-headers">,
  HelpText<"Display format specific file headers">;
def : Flag<["-"], "p">, Alias<private_headers>,
  HelpText<"Alias for --private-headers">;

def section_EQ : Joined<["--"], "section=">,
  HelpText<"Operate on the specified sections only. "
           "With --macho dump segment,section">;
def : Separate<["--"], "section">, Alias<section_EQ>;
def : JoinedOrSeparate<["-"], "j">, Alias<section_EQ>,
  HelpText<"Alias for --section">;

def section_headers : Flag<["--"], "section-headers">,
  HelpText<"Display summaries of the headers for each section.">;
def : Flag<["--"], "headers">, Alias<section_headers>,
  HelpText<"Alias for --section-headers">;
def : Flag<["-"], "h">, Alias<section_headers>,
  HelpText<"Alias for --section-headers">;

def show_lma : Flag<["--"], "show-lma">,
  HelpText<"Display LMA column when dumping ELF section headers">;

def source : Flag<["--"], "source">,
  HelpText<"When disassembling, display source interleaved with the "
           "disassembly. Implies --disassemble">;
def : Flag<["-"], "S">, Alias<source>, HelpText<"Alias for --source">;

def start_address_EQ : Joined<["--"], "start-address=">,
  MetaVarName<"address">,
  HelpText<"Set the start address for disassembling, "
           "printing relocations and printing symbols">;
def stop_address_EQ : Joined<["--"], "stop-address=">,
  MetaVarName<"address">,
  HelpText<"Set the stop address for disassembling, "
           "printing relocations and printing symbols">;

def syms : Flag<["--"], "syms">,
  HelpText<"Display the symbol table">;
def : Flag<["-"], "t">, Alias<syms>, HelpText<"Alias for --syms">;

def symbolize_operands : Flag<["--"], "symbolize-operands">,
  HelpText<"Symbolize instruction operands when disassembling">;

def dynamic_syms : Flag<["--"], "dynamic-syms">,
  HelpText<"Display the contents of the dynamic symbol table">;
def : Flag<["-"], "T">, Alias<dynamic_syms>,
  HelpText<"Alias for --dynamic-syms">;

def triple_EQ : Joined<["--"], "triple=">,
  HelpText<"Target triple to disassemble for, "
            "see --version for available targets">;
def : Separate<["--"], "triple">,
  Alias<triple_EQ>;

def unwind_info : Flag<["--"], "unwind-info">,
  HelpText<"Display unwind information">;
def : Flag<["-"], "u">, Alias<unwind_info>,
  HelpText<"Alias for --unwind-info">;

def wide : Flag<["--"], "wide">,
  HelpText<"Ignored for compatibility with GNU objdump">;
def : Flag<["-"], "w">, Alias<wide>;

defm prefix : Eq<"prefix", "Add prefix to absolute paths">,
              MetaVarName<"prefix">;
defm prefix_strip
    : Eq<"prefix-strip", "Strip out initial directories from absolute "
                         "paths. No effect without --prefix">,
      MetaVarName<"prefix">;

def debug_vars_EQ : Joined<["--"], "debug-vars=">,
  HelpText<"Print the locations (in registers or memory) of "
           "source-level variables alongside disassembly. "
           "Supported formats: ascii, unicode (default)">,
  Values<"unicode,ascii">;
def : Flag<["--"], "debug-vars">, Alias<debug_vars_EQ>, AliasArgs<["unicode"]>;

def debug_vars_indent_EQ : Joined<["--"], "debug-vars-indent=">,
  HelpText<"Distance to indent the source-level variable display, "
           "relative to the start of the disassembly">;

def x86_asm_syntax_att : Flag<["--"], "x86-asm-syntax=att">,
  HelpText<"Emit AT&T-style disassembly">;

def x86_asm_syntax_intel : Flag<["--"], "x86-asm-syntax=intel">,
  HelpText<"Emit Intel-style disassembly">;


def grp_mach_o : OptionGroup<"kind">, HelpText<"llvm-objdump MachO Specific Options">;

def private_header : Flag<["--"], "private-header">,
  HelpText<"Display only the first format specific file header">,
  Group<grp_mach_o>;

def exports_trie : Flag<["--"], "exports-trie">,
  HelpText<"Display mach-o exported symbols">,
  Group<grp_mach_o>;

def rebase : Flag<["--"], "rebase">,
  HelpText<"Display mach-o rebasing info">,
  Group<grp_mach_o>;

def bind : Flag<["--"], "bind">,
  HelpText<"Display mach-o binding info">,
  Group<grp_mach_o>;

def lazy_bind : Flag<["--"], "lazy-bind">,
  HelpText<"Display mach-o lazy binding info">,
  Group<grp_mach_o>;

def weak_bind : Flag<["--"], "weak-bind">,
  HelpText<"Display mach-o weak binding info">,
  Group<grp_mach_o>;

def g : Flag<["-"], "g">,
  HelpText<"Print line information from debug info if available">,
  Group<grp_mach_o>;

def dsym_EQ : Joined<["--"], "dsym=">,
  HelpText<"Use .dSYM file for debug info">,
  Group<grp_mach_o>;
def : Separate<["--"], "dsym">,
  Alias<dsym_EQ>,
  Group<grp_mach_o>;

def full_leading_addr : Flag<["--"], "full-leading-addr">,
  HelpText<"Print full leading address">,
  Group<grp_mach_o>;

def no_leading_headers : Flag<["--"], "no-leading-headers">,
  HelpText<"Print no leading headers">,
  Group<grp_mach_o>;

def universal_headers : Flag<["--"], "universal-headers">,
  HelpText<"Print Mach-O universal headers (requires --macho)">,
  Group<grp_mach_o>;

def archive_member_offsets : Flag<["--"], "archive-member-offsets">,
  HelpText<"Print the offset to each archive member for Mach-O archives "
           "(requires --macho and --archive-headers)">,
  Group<grp_mach_o>;

def indirect_symbols : Flag<["--"], "indirect-symbols">,
  HelpText<"Print indirect symbol table for Mach-O objects (requires --macho)">,
  Group<grp_mach_o>;

def data_in_code : Flag<["--"], "data-in-code">,
  HelpText<"Print the data in code table for Mach-O objects (requires --macho)">,
  Group<grp_mach_o>;

def function_starts : Flag<["--"], "function-starts">,
  HelpText<"Print the function starts table for "
           "Mach-O objects (requires --macho)">,
  Group<grp_mach_o>;

def link_opt_hints : Flag<["--"], "link-opt-hints">,
  HelpText<"Print the linker optimization hints for "
           "Mach-O objects (requires --macho)">,
  Group<grp_mach_o>;

def info_plist : Flag<["--"], "info-plist">,
  HelpText<"Print the info plist section as strings for "
           "Mach-O objects (requires --macho)">,
  Group<grp_mach_o>;

def dylibs_used : Flag<["--"], "dylibs-used">,
  HelpText<"Print the shared libraries used for linked "
           "Mach-O files (requires --macho)">,
  Group<grp_mach_o>;

def dylib_id : Flag<["--"], "dylib-id">,
  HelpText<"Print the shared library's id for the "
           "dylib Mach-O file (requires --macho)">,
  Group<grp_mach_o>;

def rpaths : Flag<["--"], "rpaths">,
  HelpText<"Print the runtime search paths for the "
           "Mach-O file (requires --macho)">,
  Group<grp_mach_o>;

def non_verbose : Flag<["--"], "non-verbose">,
  HelpText<"Print the info for Mach-O objects in non-verbose or "
           "numeric form (requires --macho)">,
  Group<grp_mach_o>;

def objc_meta_data : Flag<["--"], "objc-meta-data">,
  HelpText<"Print the Objective-C runtime meta data "
           "for Mach-O files (requires --macho)">,
  Group<grp_mach_o>;

def dis_symname : Separate<["--"], "dis-symname">,
  HelpText<"disassemble just this symbol's instructions (requires --macho)">,
  Group<grp_mach_o>;

def no_symbolic_operands : Flag<["--"], "no-symbolic-operands">,
  HelpText<"do not symbolic operands when disassembling (requires --macho)">,
  Group<grp_mach_o>;

def arch_EQ : Joined<["--"], "arch=">,
  HelpText<"architecture(s) from a Mach-O file to dump">,
  Group<grp_mach_o>;
def : Separate<["--"], "arch">,
  Alias<arch_EQ>,
  Group<grp_mach_o>;