id = "valgrind" name = "Valgrind" homepage = "https://valgrind.org/" description = "Valgrind is an instrumentation framework for building dynamic analysis tools." executables = ["valgrind"] [dotfiles] # Valgrind's official manual lists ~/.valgrindrc as the first location from # which it reads default options: # https://valgrind.org/docs/manual/manual-core.html#manual-core.basicopts paths = ["~/.valgrindrc"] secret = [] side_effect = false [commands] format = 1 label = "Run a program under Valgrind" description = "Runs one program under a Valgrind tool with common leak, error and logging options. Arguments for the program itself are not part of this form; add them after the program at the prompt." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "manual" kind = "manual" url = "https://manpages.debian.org/unstable/valgrind/valgrind.1.en.html" revision = "debian unstable" evidence = """ valgrind [valgrind-options] [your-program] [your-program-options] --tool= [default: memcheck] memcheck, cachegrind, callgrind, helgrind, drd, massif, dhat, lackey, none, -q, --quiet -v, --verbose --log-file= --num-callers= [default: 12] --error-exitcode= [default: 0] --leak-check= [default: summary] --show-leak-kinds= [default: definite,possible] --track-origins= [default: no] --trace-children= [default: no] --suppressions= """ [[commands.field]] id = "program" label = "Program to run" type = "path" position = 0 min = 1 path = { kind = "file", role = "input" } sources = ["manual"] [[commands.field]] id = "tool" label = "Tool" type = "string" option = ["--tool"] suggestions = [{ value = "memcheck", label = "memcheck (memory errors, default)" }, { value = "cachegrind", label = "cachegrind" }, { value = "callgrind", label = "callgrind" }, { value = "helgrind", label = "helgrind (threads)" }, { value = "drd", label = "drd (threads)" }, { value = "massif", label = "massif (heap profile)" }, { value = "dhat", label = "dhat" }] sources = ["manual"] [[commands.field]] id = "leak_check" label = "Leak check" type = "enum" option = ["--leak-check"] choices = [{ value = "no", label = "No" }, { value = "summary", label = "Summary" }, { value = "yes", label = "Yes (full)" }, { value = "full", label = "Full" }] sources = ["manual"] [[commands.field]] id = "show_leak_kinds" label = "Leak kinds to show" description = "Comma-separated set, e.g. definite,possible or all." type = "string" option = ["--show-leak-kinds"] suggestions = [{ value = "definite,possible", label = "definite,possible" }, { value = "all", label = "all" }] sources = ["manual"] [[commands.field]] id = "track_origins" label = "Track origins of uninitialised values" type = "enum" option = ["--track-origins"] choices = [{ value = "yes", label = "Yes" }, { value = "no", label = "No" }] sources = ["manual"] [[commands.field]] id = "trace_children" label = "Trace child processes" type = "enum" option = ["--trace-children"] choices = [{ value = "yes", label = "Yes" }, { value = "no", label = "No" }] sources = ["manual"] [[commands.field]] id = "num_callers" label = "Stack trace depth" type = "integer" option = ["--num-callers"] sources = ["manual"] [[commands.field]] id = "error_exitcode" label = "Exit code on errors" type = "integer" option = ["--error-exitcode"] sources = ["manual"] [[commands.field]] id = "log_file" label = "Log file" type = "path" option = ["--log-file"] path = { kind = "file", role = "output" } effect = "overwrite" sources = ["manual"] [[commands.field]] id = "suppressions" label = "Suppressions file" type = "path" option = ["--suppressions"] path = { kind = "file", role = "input" } sources = ["manual"] [[commands.field]] id = "verbose" label = "Verbosity" type = "count" option = ["--verbose", "-v"] sources = ["manual"] [[commands.field]] id = "quiet" label = "Quiet" type = "boolean" option = ["--quiet", "-q"] sources = ["manual"] [[commands.task]] id = "leaks" label = "Full leak check" set = { leak_check = ["full"], show_leak_kinds = ["all"], track_origins = ["yes"] } fields = ["program", "leak_check", "show_leak_kinds", "track_origins", "log_file"] required = ["program"] [[commands.task]] id = "ci" label = "Fail on errors" set = { leak_check = ["full"], error_exitcode = [1] } fields = ["program", "leak_check", "error_exitcode", "suppressions"] required = ["program"] [[commands.group]] id = "basic" label = "Basic" fields = ["program", "tool", "leak_check", "show_leak_kinds", "track_origins", "log_file"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["trace_children", "num_callers", "error_exitcode", "suppressions", "verbose", "quiet"]