mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-07 23:51:14 +02:00
44968: cleanup and update objdump and readelf completions
This commit is contained in:
parent
055113d775
commit
6a3e418fb6
3 changed files with 129 additions and 99 deletions
|
@ -1,5 +1,9 @@
|
||||||
2019-12-01 Oliver Kiddle <okiddle@yahoo.co.uk>
|
2019-12-01 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||||
|
|
||||||
|
* 44968: Completion/Unix/Command/_objdump,
|
||||||
|
Completion/Unix/Command/_readelf: cleanup and update objdump
|
||||||
|
and readelf completions
|
||||||
|
|
||||||
* Sebastian: 44967: Completion/Linux/Command/_alsa-utils:
|
* Sebastian: 44967: Completion/Linux/Command/_alsa-utils:
|
||||||
Completion for aplay from alsa-utils
|
Completion for aplay from alsa-utils
|
||||||
|
|
||||||
|
|
|
@ -1,126 +1,133 @@
|
||||||
#compdef objdump eu-objdump llvm-objdump
|
#compdef objdump eu-objdump llvm-objdump
|
||||||
|
|
||||||
local opts args files variant curcontext=$context state state_descr line ret=1
|
local curcontext="$curcontext" files variant ign ret=1
|
||||||
|
local -a opts args state state_descr line
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
|
||||||
files='*:object file:_object_files'
|
files='*:object file:_object_files'
|
||||||
|
(( $#words > 2 )) && ign='!'
|
||||||
_pick_variant -r variant binutils=GNU elfutils=elfutils llvm=LLVM unix --version
|
_pick_variant -r variant binutils=GNU elfutils=elfutils llvm=LLVM unix --version
|
||||||
|
|
||||||
opts=( -s -S ) # options for _arguments
|
opts=( -s -S ) # options to _arguments itself
|
||||||
args=(
|
args=(
|
||||||
"(-d --disassemble)"{-d,--disassemble}"[Display assembler code of executable sections]"
|
'(-d --disassemble)'{-d,--disassemble}'[display assembler code of executable sections]'
|
||||||
"(-r --reloc)"{-r,--reloc}"[Display relocation information]"
|
'(-r --reloc)'{-r,--reloc}'[display relocation information]'
|
||||||
"(-s --full-contents)"{-s,--full-contents}"[Display the full contents of all sections requested]"
|
'(-s --full-contents)'{-s,--full-contents}'[display the full contents of all sections requested]'
|
||||||
"*"{-j+,--section=}"[Only display information for section]:section:(.bss .data .dynamic .dynsym .got .interp .shstrtab .symtab .text)"
|
\*{-j+,--section=}'[only display information for section]:section:(.bss .data .dynamic .dynsym .got .interp .shstrtab .symtab .text)'
|
||||||
)
|
)
|
||||||
|
|
||||||
case $variant in
|
case $variant in
|
||||||
binutils)
|
binutils)
|
||||||
|
compset -P '@' && files='*:options file:_files'
|
||||||
args+=(
|
args+=(
|
||||||
"(-a --archive-headers)"{-a,--archive-headers}"[Display archive header information]"
|
|
||||||
"(-f --file-headers)"{-f,--file-headers}"[Display the contents of the overall file header]"
|
|
||||||
"(-p --private-headers)"{-p,--private-headers}"[Display object format specific file header contents]"
|
|
||||||
"*"{-P,--private=}"[Display object format specific contents]:option"
|
|
||||||
"(-h --section-headers --headers)"{-h,--section-headers,--headers}"[Display the contents of the section headers]"
|
|
||||||
"(-x --all-headers)"{-x,--all-headers}"[Display the contents of all headers]"
|
|
||||||
'--disassemble=[display assembler contents for specified symbol]:symbol'
|
|
||||||
"(-D --disassemble-all)"{-D,--disassemble-all}"[Display assembler contents of all sections]"
|
|
||||||
"(-S --source)"{-S,--source}"[Intermix source code with disassembly]"
|
|
||||||
"(-g --debugging)"{-g,--debugging}"[Display debug information in object file]"
|
|
||||||
"(-e --debugging-tags)"{-e,--debugging-tags}"[Display debug information using ctags style]"
|
|
||||||
"(-G --stabs)"{-G,--stabs}"[Display (in raw form) any STABS info in the file]"
|
|
||||||
|
|
||||||
"*-W-[Display DWARF info in the file]::dwarf section:->short_dwarf_names"
|
|
||||||
"*--dwarf=-[Display DWARF info in the file]::dwarf section:->dwarf_names"
|
|
||||||
|
|
||||||
"(-t --syms)"{-t,--syms}"[Display the contents of the symbol table(s)]"
|
|
||||||
"(-T --dynamic-syms)"{-T,--dynamic-syms}"[Display the contents of the dynamic symbol table]"
|
|
||||||
"(-R --dynamic-reloc)"{-R,--dynamic-reloc}"[Display the dynamic relocation entries in the file]"
|
|
||||||
#@<file> Read options from <file>
|
|
||||||
|
|
||||||
"(- *)"{-v,--version}"[Display this program's version number]"
|
|
||||||
"(- *)"{-i,--info}"[List object formats and architectures supported]"
|
|
||||||
"(- *)"{-H,--help}"[Display this information]"
|
|
||||||
|
|
||||||
"(-b --target)"{-b+,--target=}"[Specify the target object format]:bfdname:->bfdname"
|
|
||||||
"(-m --architecture)"{-m+,--architecture=}"[Specify the target architecture]:machine:->machine"
|
|
||||||
"*"{-M+,--disassembler-options=}"[Pass text OPT on to the disassembler]:opt:->disassembler_options"
|
|
||||||
|
|
||||||
"(-E --endian)-E+[Assume endianess when disassembling]:endianess:((B\:\"Assume big endian format when disassembling\" L\:\"Assume little endian format when disassembling\"))"
|
|
||||||
"(-E --endian)--endian=[Assume endianess when disassembling]:endianess:((big\:\"Assume big endian format when disassembling\" little\:\"Assume little endian format when disassembling\"))"
|
|
||||||
|
|
||||||
"--file-start-context[Include context from start of file (with -S)]"
|
|
||||||
"*"{-I+,--include=}"[Add directory to search list for source files]:directory:_files -/"
|
|
||||||
"(-l --line-numbers)"{-l,--line-numbers}"[Include line numbers and filenames in output]"
|
|
||||||
"(-F --file-offsets)"{-F,--file-offsets}"[Include file offsets when displaying information]"
|
|
||||||
"(-C --demangle)-C[Decode mangled/processed symbol names]"
|
|
||||||
"(-C --demangle)--demangle=-[decode mangled/processed symbol names]::style:(auto gnu lucid arm hp edg gnu-v3 java gnat rust dlang)"
|
|
||||||
'!(--no-recurse-limit)--recurse-limit'
|
'!(--no-recurse-limit)--recurse-limit'
|
||||||
'--no-recurse-limit[disable demangling recursion limit]'
|
'--no-recurse-limit[disable demangling recursion limit]'
|
||||||
"(-w --wide)"{-w,--wide}"[Format output for more than 80 columns]"
|
'(-a --archive-headers)'{-a,--archive-headers}'[display archive header information]'
|
||||||
"(-z --disassemble-zeroes)"{-z,--disassemble-zeroes}"[Do not skip blocks of zeroes when disassembling]"
|
'(-f --file-headers)'{-f,--file-headers}'[display contents of the overall file header]'
|
||||||
|
'(-p --private-headers)'{-p,--private-headers}'[display object format specific file header contents]'
|
||||||
|
\*{-P+,--private=}'[display information specific to the object format]:option'
|
||||||
|
'(-h --section-headers --headers)'{-h,--section-headers,--headers}'[display contents of the section headers]'
|
||||||
|
'(-x --all-headers)'{-x,--all-headers}'[display the contents of all headers]'
|
||||||
|
'--disassemble=[display assembler contents for specified symbol]:symbol'
|
||||||
|
'(-D --disassemble-all)'{-D,--disassemble-all}'[display assembler contents of all sections]'
|
||||||
|
'(-S --source)'{-S,--source}'[intermix source code with disassembly]'
|
||||||
|
'--source-comment=-[prefix lines of source code with specified text]::text prefix [# ]'
|
||||||
|
'(-g --debugging)'{-g,--debugging}'[display debug information in object file]'
|
||||||
|
'(-e --debugging-tags)'{-e,--debugging-tags}'[display debug information using ctags style]'
|
||||||
|
'(-G --stabs)'{-G,--stabs}'[display (in raw form) any STABS info in the file]'
|
||||||
|
|
||||||
"--start-address=[Only process data whose address is >= ADDR]:addr"
|
'*-W-[display DWARF info in the file]::dwarf section:->short-dwarf-names'
|
||||||
"--stop-address=[Only process data whose address is <= ADDR]:addr"
|
'*--dwarf=-[display DWARF info in the file]::dwarf section:->dwarf-names'
|
||||||
"--prefix-addresses[Print complete address alongside disassembly]"
|
|
||||||
"(--show-raw-insn --no-show-raw-insn)"--{,no-}show-raw-insn"[Display hex alongside symbolic disassembly]"
|
'--ctf=[display compact C type format info for section]:section'
|
||||||
"--insn-width=[Display WIDTH bytes on a single line for -d]:width"
|
'(-t --syms)'{-t,--syms}'[display the contents of the symbol table(s)]'
|
||||||
"--adjust-vma=[Add offset to all displayed section addresses]:offset"
|
'(-T --dynamic-syms)'{-T,--dynamic-syms}'[display the contents of the dynamic symbol table]'
|
||||||
"--special-syms[Include special symbols in symbol dumps]"
|
'(-R --dynamic-reloc)'{-R,--dynamic-reloc}'[display the dynamic relocation entries in the file]'
|
||||||
"--prefix=[Add prefix to absolute paths for -S]:prefix"
|
|
||||||
"--prefix-strip=[Strip initial directory names for -S]:level"
|
"${ign}(- *)"{-v,--version}"[display version information]"
|
||||||
"--dwarf-depth=[Do not display DIEs at depth N or greater]:n"
|
"${ign}(- *)"{-i,--info}"[list supported object formats and architectures]"
|
||||||
"--dwarf-start=[Display DIEs starting with N, at the same depth or deeper]:n"
|
"${ign}(- *)"{-H,--help}"[display usage information]"
|
||||||
"--dwarf-check[Make additional dwarf internal consistency checks]"
|
|
||||||
|
'(-b --target)'{-b+,--target=}'[specify the target object format]:target:->bfdnames'
|
||||||
|
'(-m --architecture)'{-m+,--architecture=}'[specify the target architecture]:architecture:->architectures'
|
||||||
|
\*{-M+,--disassembler-options=}'[pass target specific information to the disassembler]:option:->disassembler_options'
|
||||||
|
|
||||||
|
"(-E --endian)-E+[assume endianess when disassembling]:endianess:((B\:\"assume big endian format when disassembling\" L\:\"assume little endian format when disassembling\"))"
|
||||||
|
"(-E --endian)--endian=[assume endianess when disassembling]:endianess:((big\:\"assume big endian format when disassembling\" little\:\"assume little endian format when disassembling\"))"
|
||||||
|
|
||||||
|
'--file-start-context[include context from start of file (with -S)]'
|
||||||
|
\*{-I+,--include=}'[add directory to search list for source files]:directory:_files -/'
|
||||||
|
'(-l --line-numbers)'{-l,--line-numbers}'[include line numbers and filenames in output]'
|
||||||
|
'(-F --file-offsets)'{-F,--file-offsets}'[include file offsets when displaying information]'
|
||||||
|
'(-C --demangle)-C[decode mangled/processed symbol names]'
|
||||||
|
'(-C --demangle)--demangle=-[decode mangled/processed symbol names]::style:(auto gnu lucid arm hp edg gnu-v3 java gnat rust dlang)'
|
||||||
|
'!(--no-recurse-limit)--recurse-limit'
|
||||||
|
'--no-recurse-limit[disable demangling recursion limit]'
|
||||||
|
'(-w --wide)'{-w,--wide}'[format output for more than 80 columns]'
|
||||||
|
'(-z --disassemble-zeroes)'{-z,--disassemble-zeroes}"[don't skip blocks of zeroes when disassembling]"
|
||||||
|
|
||||||
|
'--start-address=[only process data whose address is >= ADDR]:address'
|
||||||
|
'--stop-address=[only process data whose address is <= ADDR]:address'
|
||||||
|
'--prefix-addresses[print complete address alongside disassembly]'
|
||||||
|
'(--show-raw-insn --no-show-raw-insn)'--{,no-}show-raw-insn'[display hex alongside symbolic disassembly]'
|
||||||
|
'--insn-width=[display specified number of bytes on a single line with -d]:width (bytes)'
|
||||||
|
'--adjust-vma=[add offset to all displayed section addresses]:offset'
|
||||||
|
'--special-syms[include special symbols in symbol dumps]'
|
||||||
|
'--inlines[print all inlines for source line (with -l)]'
|
||||||
|
'--prefix=[add prefix to absolute paths for -S]:prefix'
|
||||||
|
'--prefix-strip=[strip initial directory names for -S]:level'
|
||||||
|
"--dwarf-depth=[don't display DIEs at specified or greater depth]:depth"
|
||||||
|
'--dwarf-start=[display DIEs at specified or deeper depth]:depth'
|
||||||
|
'--dwarf-check[perform additional dwarf internal consistency checks]'
|
||||||
|
'--ctf-parent=[use specified section as the CTF parent]:section'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
elfutils)
|
elfutils)
|
||||||
args+=(
|
args+=(
|
||||||
"--color=-[Colorize the output]::when:(always auto never)"
|
"--color=-[colorize the output]::when:(always auto never)"
|
||||||
"(- *)"{-\?,--help}"[Display help]"
|
"(- *)"{-\?,--help}"[display help]"
|
||||||
"(- *)--usage[Display usage]"
|
"(- *)--usage[display usage]"
|
||||||
"(- *)"{-V,--version}"[Display program version]"
|
"(- *)"{-V,--version}"[display program version]"
|
||||||
|
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
llvm)
|
llvm)
|
||||||
opts=( -S ) # no option stacking
|
opts=( -S ) # no option stacking
|
||||||
args=( # start over from an empty array
|
args=( # start over from an empty array
|
||||||
'-aarch64-neon-syntax=[chose style of NEON code (AArch64)]:style:(generic apple)'
|
'-aarch64-neon-syntax=[choose style of NEON code (AArch64)]:style:(generic apple)'
|
||||||
'-arch=[w -macho: select arch from a fat binary]:arch:(i386 x86_64)'
|
'-arch=[select arch from a fat binary (with -macho)]:architecture:(i386 x86_64)'
|
||||||
'-arch-name=[specify target arch to disassemble for]:arch:->llvm_targets'
|
'-arch-name=[specify target arch to disassemble for]:architecture:->llvm_targets'
|
||||||
'-archive-headers[w -macho: print archive headers]'
|
'-archive-headers[print archive headers (with -macho)]'
|
||||||
'-archive-member-offsets[w -macho -archive-headers: print offset to each archive member]'
|
'-archive-member-offsets[w -macho -archive-headers: print offset to each archive member]'
|
||||||
'-bind[display Mach-O binding info]'
|
'-bind[display Mach-O binding info]'
|
||||||
'-color[use colored syntax highlighting]'
|
'-color[use color syntax highlighting]'
|
||||||
'-data-in-code[w -macho: print data in code table]'
|
'-data-in-code[print data in code table (with -macho)]'
|
||||||
"-dis-symname=[w -macho: disassemble just the specified symbol's instructions]"
|
"-dis-symname=[disassemble just the specified symbol's instructions (with -macho)]"
|
||||||
'(-disassemble -d)'{-disassemble,-d}'[display assembler mnemonics for machine instructions]'
|
'(-disassemble -d)'{-disassemble,-d}'[display assembler mnemonics for machine instructions]'
|
||||||
'(-disassemble-all -D)'{-disassemble-all,-D}'[disassemble all instruction sections]'
|
'(-disassemble-all -D)'{-disassemble-all,-D}'[disassemble all instruction sections]'
|
||||||
'-dsym=[w -macho -g: use the specified .dSYM file for debug info]:dsym file:_files'
|
'-dsym=[use the specified .dSYM file for debug info (with -macho)]:dsym file:_files'
|
||||||
'-dwarf=[dump of dwarf debug section]:section:(frames)'
|
'-dwarf=[dump of dwarf debug section]:section:(frames)'
|
||||||
"-dyld-id[w -macho: print the shared library's id for dylib Mach-O file]"
|
"-dyld-id[print the shared library's id for dylib Mach-O file (with -macho)]"
|
||||||
'-dylibs-used[w -macho: print the shared libraries used for linked Mach-O files]'
|
'-dylibs-used[print the shared libraries used for linked Mach-O files (with -macho)]'
|
||||||
'-exports-trie[display Mach-O exported symbols]'
|
'-exports-trie[display Mach-O exported symbols]'
|
||||||
'-fault-map-section[display contents of faultmap section]'
|
'-fault-map-section[display contents of faultmap section]'
|
||||||
'-filter-print-funcs=[only print IR for the specified functions]:function names'
|
'-filter-print-funcs=[only print IR for the specified functions]:function names'
|
||||||
'-full-leading-addr[w -macho: print full leading address]'
|
'-full-leading-addr[print full leading address (with -macho)]'
|
||||||
'-g[w -macho: print line information from debug info if available]'
|
'-g[print line information from debug info if available (with -macho)]'
|
||||||
'-indirect-symbols[w -macho: print indirect symbol table]'
|
'-indirect-symbols[print indirect symbol table (with -macho)]'
|
||||||
'-info-plist[w -macho: print the info plist section]'
|
'-info-plist[print the info plist section (with -macho)]'
|
||||||
'-lazy-bind[display Mach-O lazy binding info]'
|
'-lazy-bind[display Mach-O lazy binding info]'
|
||||||
'(-line-numbers -l)'{-line-numbers,-l}'[display source line numbers with disassembly]'
|
'(-line-numbers -l)'{-line-numbers,-l}'[display source line numbers with disassembly]'
|
||||||
'-link-opt-hints[w -macho: print the linker optimization hints]'
|
'-link-opt-hints[print the linker optimization hints (with -macho)]'
|
||||||
'(-macho -m)'{-macho,-m}'[use Mach-O specific object file parser]'
|
'(-macho -m)'{-macho,-m}'[use Mach-O specific object file parser]'
|
||||||
'*-mattr=[target specific attributes]:attributes'
|
'*-mattr=[target specific attributes]:attributes'
|
||||||
'-mcpu=[specify target cpu type]:cpu type'
|
'-mcpu=[specify target cpu type]:cpu type'
|
||||||
'-no-leading-addr[w -macho: print no leading address]'
|
'-no-leading-addr[print no leading address (with -macho)]'
|
||||||
'-no-leading-headers[print no leading headers]'
|
'-no-leading-headers[print no leading headers]'
|
||||||
'-no-show-raw-insn[do not print instruction bytes when disassembling]'
|
"-no-show-raw-insn[don't print instruction bytes when disassembling]"
|
||||||
'-no-symbolic-operands[w -macho: do not print operands symbolically when disassembling]'
|
"-no-symbolic-operands[don't print operands symbolically when disassembling (with -macho)]"
|
||||||
'-non-verbose[w -macho: print info in non-verbose form]'
|
'-non-verbose[print info in non-verbose form (with -macho)]'
|
||||||
'-objc-meta-data[w -macho: print Objective-C runtime meta data]'
|
'-objc-meta-data[print Objective-C runtime meta data (with -macho)]'
|
||||||
'-print-after-all[print IR after each pass]'
|
'-print-after-all[print IR after each pass]'
|
||||||
'-print-before-all[print IR before each pass]'
|
'-print-before-all[print IR before each pass]'
|
||||||
'-print-imm-hex[use hex format for immediate values]'
|
'-print-imm-hex[use hex format for immediate values]'
|
||||||
|
@ -131,22 +138,22 @@ case $variant in
|
||||||
'-rebase[display Mach-O rebasing info]'
|
'-rebase[display Mach-O rebasing info]'
|
||||||
'-rng-seed=[seed for the random number generator]:seed'
|
'-rng-seed=[seed for the random number generator]:seed'
|
||||||
'-s[display contents of each section]'
|
'-s[display contents of each section]'
|
||||||
'*'{-section=,-j}'[operate on the specified section only]:section'
|
\*{-section=,-j}'[operate on the specified section only]:section'
|
||||||
'(-section-headers -h)'{-section-headers,-h}'[display summaries of the headers for each section]'
|
'(-section-headers -h)'{-section-headers,-h}'[display summaries of the headers for each section]'
|
||||||
'(-source -S)'{-source,-S}'[display source inlined with disassembly]'
|
'(-source -S)'{-source,-S}'[display source inlined with disassembly]'
|
||||||
'-start-address=[start disassembly at the specified address]:address'
|
'-start-address=[start disassembly at the specified address]:address'
|
||||||
'-stop-address=[stop disassembly at the specified address]:address'
|
'-stop-address=[stop disassembly at the specified address]:address'
|
||||||
'-t[display the symbol talbe]'
|
'-t[display the symbol table]'
|
||||||
'-time-passes[time each pass, print elapsed time on exit]'
|
'-time-passes[time each pass, print elapsed time on exit]'
|
||||||
'-triple=[target triple to disassemble for]:triple'
|
'-triple=[target triple to disassemble for]:triple'
|
||||||
'-universal-headers[w -macho: print Mach-O universal headers]'
|
'-universal-headers[print Mach-O universal headers (with -macho)]'
|
||||||
'-verify-dom-info[verify dominator info (time consuming)]'
|
'-verify-dom-info[verify dominator info (time consuming)]'
|
||||||
'-unwind-info[display unwind information]'
|
'-unwind-info[display unwind information]'
|
||||||
'-weak-bind[display Mach-O weak binding info]'
|
'-weak-bind[display Mach-O weak binding info]'
|
||||||
'-x86-asm-syntax=[chose style of assembler code (x86)]:style:(att intel)'
|
'-x86-asm-syntax=[choose style of assembler code (x86)]:style:(att intel)'
|
||||||
'(- *)-help[display available options]'
|
"${ign}(- *)-help[display available options]"
|
||||||
'(- *)-help-list[display list of available options]'
|
"${ign}(- *)-help-list[display list of available options]"
|
||||||
'(- *)-version[display version of objdump]'
|
"${ign}(- *)-version[display version of objdump]"
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -154,17 +161,27 @@ esac
|
||||||
_arguments $opts -C : "$args[@]" $files && ret=0
|
_arguments $opts -C : "$args[@]" $files && ret=0
|
||||||
|
|
||||||
case "$state" in
|
case "$state" in
|
||||||
short_dwarf_names)
|
short-dwarf-names)
|
||||||
_values -s "" "dwarf section" "l[rawline]" "L[decodedline]" "i[info]" "a[abbrev]" "p[pubnames]" "r[aranges]" "m[macro]" "f[frames]" "F[frames-interp]" "s[str]" "o[loc]" "R[Ranges]" "t[pubtypes]" "U[trace_info]" "u[trace_abbrev]" "g[gdb_index]" "T[trace_aranges]" "A[addr]" "c[cu_index]" "k[links]" "K[follow-links]" && ret=0
|
_values -s "" "dwarf section" \
|
||||||
|
"l[rawline]" "L[decodedline]" "i[info]" "a[abbrev]" "p[pubnames]" \
|
||||||
|
"r[aranges]" "m[macro]" "f[frames]" "F[frames-interp]" "s[str]" \
|
||||||
|
"o[loc]" "R[ranges]" "t[pubtypes]" "U[trace_info]" "u[trace_abbrev]" \
|
||||||
|
"T[trace_aranges]" "g[gdb_index]" "A[addr]" "c[cu_index]" "k[links]" \
|
||||||
|
"K[follow-links]" && ret=0
|
||||||
;;
|
;;
|
||||||
dwarf_names)
|
dwarf-names)
|
||||||
_values -s , "dwarf section" rawline decodedline info abbrev pubnames aranges macro frames frames-interp str loc Ranges pubtypes gdb_index trace_info trace_abbrev trace_aranges addr cu_index links follow-links && ret=0
|
_sequence _wanted dwarf-sections expl "dwarf section" compadd - \
|
||||||
|
rawline decodedline info abbrev pubnames aranges macro frames \
|
||||||
|
frames-interp str loc Ranges pubtypes gdb_index trace_info \
|
||||||
|
trace_abbrev trace_aranges addr cu_index links follow-links && ret=0
|
||||||
;;
|
;;
|
||||||
bfdname)
|
bfdnames)
|
||||||
_values "object format" "${(z)${(@M)${(f)$(_call_program targets objdump --help)}##* supported targets:*}##*: }" && ret=0
|
_wanted targets expl target compadd - \
|
||||||
|
${=${(M)${(f)"$(_call_program targets objdump --help)"}##* supported targets:*}##*: } && ret=0
|
||||||
;;
|
;;
|
||||||
machine)
|
architectures)
|
||||||
_values "machine architecture" "${(@)${(z)${(@M)${(f)$(_call_program targets objdump --help)}##* supported architectures:*}##*: }//:/\\:}" && ret=0
|
_wanted architectures expl architecture compadd - \
|
||||||
|
${=${(M)${(f)"$(_call_program targets objdump --help)"}##* supported architectures:*}##*: } && ret=0
|
||||||
;;
|
;;
|
||||||
disassembler_options)
|
disassembler_options)
|
||||||
_values -s , "disassembler options" "${(@)${(@)${(@M)${(f)${(ps.-M switch.)$(_call_program targets objdump --help)}[2]}:# [^ ]*}# }%% *}" && ret=0
|
_values -s , "disassembler options" "${(@)${(@)${(@M)${(f)${(ps.-M switch.)$(_call_program targets objdump --help)}[2]}:# [^ ]*}# }%% *}" && ret=0
|
||||||
|
|
|
@ -11,8 +11,6 @@ args=(
|
||||||
'(-h --file-header)'{-h,--file-header}'[show file header]'
|
'(-h --file-header)'{-h,--file-header}'[show file header]'
|
||||||
'(-l --program-headers --segments)'{-l,--program-headers,--segments}'[show program headers]'
|
'(-l --program-headers --segments)'{-l,--program-headers,--segments}'[show program headers]'
|
||||||
'(-S --section-headers --sections)'{-S,--section-headers,--sections}'[show sections header]'
|
'(-S --section-headers --sections)'{-S,--section-headers,--sections}'[show sections header]'
|
||||||
'(-s --syms --symbols)'{-s,--syms,--symbols}'[show symbol table]'
|
|
||||||
'(-n --notes)'{-n,--notes}'[show core notes (if present)]'
|
|
||||||
'(-r --relocs)'{-r,--relocs}'[show relocations (if present)]'
|
'(-r --relocs)'{-r,--relocs}'[show relocations (if present)]'
|
||||||
'(-d --dynamic)'{-d,--dynamic}'[show dynamic section (if present)]'
|
'(-d --dynamic)'{-d,--dynamic}'[show dynamic section (if present)]'
|
||||||
'(-V --version-info)'{-V,--version-info}'[show version sections (if present)]'
|
'(-V --version-info)'{-V,--version-info}'[show version sections (if present)]'
|
||||||
|
@ -35,16 +33,25 @@ case $variant in
|
||||||
'(-t --section-details)'{-t,--section-details}'[show section details]'
|
'(-t --section-details)'{-t,--section-details}'[show section details]'
|
||||||
'(-e --headers)'{-e,--headers}'[show file, program and sections headers]'
|
'(-e --headers)'{-e,--headers}'[show file, program and sections headers]'
|
||||||
'(-s --syms --symbols)'{-s,--syms,--symbols}'[show symbol table]'
|
'(-s --syms --symbols)'{-s,--syms,--symbols}'[show symbol table]'
|
||||||
|
'(-n --notes)'{-n,--notes}'[show core notes (if present)]'
|
||||||
'(-u --unwind)'{-u,--unwind}'[show unwind info (if present)]'
|
'(-u --unwind)'{-u,--unwind}'[show unwind info (if present)]'
|
||||||
'(-D --use-dynamic)'{-D,--use-dynamic}'[use dynamic section info when showing symbols]'
|
'(-D --use-dynamic)'{-D,--use-dynamic}'[use dynamic section info when showing symbols]'
|
||||||
)
|
)
|
||||||
;|
|
;|
|
||||||
binutils)
|
elfutils|binutils)
|
||||||
args+=(
|
args+=(
|
||||||
'--dyn-syms[show dynamic symbol table]'
|
'--dyn-syms[show dynamic symbol table]'
|
||||||
|
)
|
||||||
|
;|
|
||||||
|
binutils)
|
||||||
|
args+=(
|
||||||
\*{-R,--relocated-dump=}"[dump contents of specified section as relocated bytes]:section:($sections)"
|
\*{-R,--relocated-dump=}"[dump contents of specified section as relocated bytes]:section:($sections)"
|
||||||
"--dwarf-depth=[don't show DIEs at greater than specified depth]:depth"
|
"--dwarf-depth=[don't show DIEs at greater than specified depth]:depth"
|
||||||
'--dwarf-start=[show DIEs starting at specified depth or deeper]:depth'
|
'--dwarf-start=[show DIEs starting at specified depth or deeper]:depth'
|
||||||
|
'--ctf=[display compact C type format info from section]:section'
|
||||||
|
'--ctf-parent=[use specified section as the CTF parent]:section'
|
||||||
|
'--ctf-symbols=[use specified section as the CTF external symbol table]:section'
|
||||||
|
'--ctf-strings=[use specified section as the CTF external string table]:section'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
elfutils)
|
elfutils)
|
||||||
|
@ -56,6 +63,8 @@ case $variant in
|
||||||
'(-z --decompress)'{-z,--decompress}'[show compression information; decompress before dumping data]'
|
'(-z --decompress)'{-z,--decompress}'[show compression information; decompress before dumping data]'
|
||||||
'(--symbols)-s[show symbol table]'
|
'(--symbols)-s[show symbol table]'
|
||||||
'(-s)--symbols=-[show symbol table]::section:(.dynsym .symtab)'
|
'(-s)--symbols=-[show symbol table]::section:(.dynsym .symtab)'
|
||||||
|
'(--notes)-n[show core notes (if present)]'
|
||||||
|
'(-n)--notes=-[show core notes (if present)]::section'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue