From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13155 invoked from network); 21 Jan 2005 09:28:00 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Jan 2005 09:28:00 -0000 Received: (qmail 80734 invoked from network); 21 Jan 2005 09:27:54 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Jan 2005 09:27:54 -0000 Received: (qmail 13791 invoked by alias); 21 Jan 2005 09:27:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20734 Received: (qmail 13775 invoked from network); 21 Jan 2005 09:27:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Jan 2005 09:27:47 -0000 Received: (qmail 80415 invoked from network); 21 Jan 2005 09:27:47 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 21 Jan 2005 09:27:44 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-7.tower-36.messagelabs.com!1106299665!13064736!1 X-StarScan-Version: 5.4.5; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 4439 invoked from network); 21 Jan 2005 09:27:45 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-7.tower-36.messagelabs.com with SMTP; 21 Jan 2005 09:27:45 -0000 Received: from trentino.logica.co.uk ([158.234.142.59]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id j0L9Rgn6023853 for ; Fri, 21 Jan 2005 09:27:42 GMT Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 718D7299B4 for ; Fri, 21 Jan 2005 10:27:22 +0100 (CET) X-VirusChecked: Checked X-StarScan-Version: 5.1.13; banners=.,-,- From: Oliver Kiddle To: Zsh workers Subject: valgrind completion MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <19992.1106299582.0@trentino.logica.co.uk> Date: Fri, 21 Jan 2005 10:27:22 +0100 Message-ID: <20027.1106299642@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19992.1106299582.1@trentino.logica.co.uk> Attached is a rewrite of the valgrind completion to bring it up-to-date with the latest version. Oliver ------- =_aaaaaaaaaa0 Content-Type: text/plain; name="_valgrind"; charset="us-ascii" Content-ID: <19992.1106299582.2@trentino.logica.co.uk> #compdef valgrind -value-,VALGRIND_OPTS,-default- local curcontext="$curcontext" state line common cmd local -a args args_{memcheck,addrcheck,cachegrind,helgrind,massif} cmd=( '1:command name:_command_names -e' '*::args :_normal' ) if [[ $service = *_OPTS* ]]; then compset -q words=( fake "$words[@]" ) (( CURRENT++ )) cmd=() fi common=( '--sloppy-malloc=-[round malloc sizes to multiple of 4]:enable:(yes no)' '--alignment=-[set minimum alignment of allocations]:number' ) args_addrcheck=( $common '--partial-loads-ok=-:enable:(yes no)' '--freelist-vol=-[volume of freed blocks queue]:blocks' '--leak-check=-[search for memory leaks at exit]:enable:(yes no)' '--leak-resolution=-[how much bt merging in leak check]:(low med high)' '--show-reachable=-[show reachable blocks in leak check]:enable:(yes no)' '--workaround-gcc296-bugs=-:enable:(yes no)' ) args_memcheck=( $args_addrcheck '--avoid-strlen-errors=-[suppress errs from inlined strlen]:enable:(yes no)' ) args_cachegrind=( '--I1=-[set I1 cache manually]:size,assoc,line_size' '--D1=-[set D1 cache manually]:size,assoc,line_size' '--L2=-[set L2 cache manually]:size,assoc,line_size' ) args_helgrind=( $common '--private-stacks=-[assume thread stacks are used privately]:enable:(yes no)' '--show-last-access=-[show location of last word access on error]:locations:(no some all)' ) args_massif=( $common '--heap=-[profile heap blocks]:enable:(yes no)' '--heap-admin=-[specify average admin bytes per heap block]:bytes' '--stacks=-[enable profile stacks]:enable:(yes no)' '--depth=-[depth of contexts]:depth' '--alloc-fn=-[specify alloc function]:function' '--format=-[specify format of textual output]:format:(text html)' ) args="args_${${words[(r)--(skin|tool)=*]#*=}:-memcheck}" _arguments -C ${(P)args} $cmd \ '(--tool --skin)'{--tool,--skin}'=-[specify valgrind tool]:valgrind tool:->tools' \ '(-h --help)'{-h,--help}'[show help information]' \ '--help-debug[show help info including debugging options]' \ '--version[show version]' \ '(-q --quiet)'{-q,--quiet}'[run silently; only print error msgs]' \ '(-v --verbose)'{-v,--verbose}'[be more verbose]' \ '--trace-children=-[valgrind-ise child processes]:enable:(yes no)' \ '--track-fds=-[track open file descriptors]:enable:(yes no)' \ '--time-stamp=-[add timestamps to log messages]:enable:(yes no)' \ '--run-libc-freeres=-[free up glibc memory at exit]:enable:(yes no)' \ '--weird-hacks=-[enable hack]:hack:(lax-ioctls)' \ '--signal-polltime=-[signal poll period (ms)]:period' \ '--lowlat-signals=-[improve thread signal wake-up latency]:enable:(yes no)' \ '--lowlat-syscalls=-[improve thread syscall wake-up latency]:enable:(yes no)' \ '--pointercheck=-[enforce client address space limits]:enable:(yes no)' \ '--log-fd=-[log messages to specified file descriptor]:file descriptor:_file_descriptors' \ '--log-file=-[log messages to specified file]:file:_files' \ '--log-socket=-[log messages to socket]:ipaddr\:port' \ '--demangle=-[automatically demangle C++ names]:enable:(yes no)' \ '--num-callers=-[specify no of callers to show in stack traces]:number' \ '--error-limit=-[stop showing new errors if too many]:enable:(yes no)' \ '--show-below-main=-[continue stack traces below main()]:enable:(yes no)' \ '--suppressions=-[suppress errors described in specified file]:file:_files' \ '--gen-suppressions=-[print suppressions for errors detected]:enable:(yes no)' \ '--db-attach=-[start debugger when errors detected]:enable:(yes no)' \ '--db-command=-[specify command to start debugger]:command:_command_names -e' \ '--input-fd=-[specify file descriptor for input]:file descriptor:_file_descriptors' && return if [[ -n "$state" ]]; then _wanted tools exl 'valgrind tool' compadd ${=${${(f)"$(_call_program \ tools valgrind --tool= 2>&1)"}[(r)Available*,-1]}[2,-1]} && return fi return 1 ------- =_aaaaaaaaaa0--