about summary refs log tree commit diff
path: root/Completion/Darwin/Command/_otool
blob: b6a30a730ab42b0fa64bde295f6414fd3ffbeb9f (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
#compdef otool llvm-otool
#
local opts args files variant curcontext=$context state state_descr line
typeset -A opt_args

_arguments \
  '-a[display the archive header]' \
  '-S[display the contents of the __.SYMDEF file]' \
  '-f[display the universal headers]' \
  '-h[display the Mach header]' \
  '-l[display the load commands]' \
  '-L[display names and versions of shared libs that the object file uses]' \
  '-D[display just the internal name of shared lib]' \
  '-s[display the contents of the specified section]:segment name: :section name: ' \
  '-t[display the contents of (__TEXT,__text) section]' \
  '-x[display the content of every __text section found in the file]' \
  '-d[display the contents of (__DATA,__data) section]' \
  '-o[display the contents of __OBJC segment]' \
  '-r[display the relocation entries]' \
  '-c[display the argument strings from a core file]' \
  '-I[display the indirect symbol table]' \
  '-T[display the table of contents for a dynamic shared library]' \
  '-R[display the reference table of a dynamic shared library]' \
  '-M[display the module table of dynamic shared library]' \
  '-H[display the two-level namespace hints table]' \
  '-G[display the data in code table]' \
  '-C[display the linker optimization hints]' \
  '-P[print the info_plist section as strings]' \
  '-dyld_info[print bind and rebase information used by dyld]' \
  '-dyld_opcodes[print raw dyld bind and rebase opcodes present in a final linked binary]' \
  '-chained_fixups[print raw chained fixup data present in a final linked binary]' \
  '-p[with -t and -v/V: start disassembly from the specified symbol]:symbol name: ' \
  '-v[display verbosely (symbolically) when possible]' \
  '-V[display disassembled operands symbolically]' \
  "-X[don't print leading addresses/headers with disassembly]" \
  '-q[use the llvm disassembler (default)]' \
  '-mcpu=[use the specified cpu for the llvm disassembler]:target:->targets' \
  '-function_offsets[with disassembly, print decimal offset from the last label]' \
  '-j[with disassembly, print opcode bytes]' \
  "-Q[use otool's disassembler]" \
  '-addr_slide=[add an arbitrary slide to each pointer value when it is displayed]:slide size' \
  '-arch[select the specified architecture from a universal file]:arch:(i386 x86_64 x86_64h arm64 arm64e all)' \
  '-m[object file names are not assumed to be in archive(member) syntax]' \
  '(- *)--version[print version of otool]' \
  '*:file:_object_files' && return 0

case $state in
  targets)
    _values "target architecture" "${(z)${(@)${(f)$(_call_program targets
      ${~words[1]} --version 2>/dev/null)##*Registered Targets:}/ -*}}"
  ;;
esac