It's a script for running valgrind inside a docker image, mainly for macOS because of the lack of support for the macOS Mojave.
For this you need to download docker and create an image. You can use the instructions listed here. I advise you to use the dockerfile I created, because it has some additional stuff for this script to work properly.
The script runs in two modes - with or without using the makefile. Use the makefile when you need to compile more than one file.
You also need the default Makefile present inside the folder with this script.
Also its best to create an alias for this script. In the instructions I will be using the alias valgrind
You can get list of commands by running the script with -h or --help
To setup the script, run it
valgrind --setup "NAME_OF_DOCKER_IMAGE"`
You can use it as normal valgrind program, but you dont list the binary file, just the source (at the moment works with only one file)
valgrind FILE SWITCHESTo change compilation switches. Note - At the moment the change reflects only when you run it with the source file. It doesnt affect the makefile, if you want to change the switches there, edit the default makefile.
valgrind --comp-switches LIST_OF_SWITCHESTo create makefile inside the current folder with you source files
valgrind -m
valgrind --makeTo change the list of source files inside the Makefile
valgrind -f LIST_OF_FILES
valgrind --files LIST_OF_FILESTo run valgrind via the make file
valgrind -r LIST_OF_VALGRIND_SWITCHES
valgrind run LIST_OF_VALGRIND_SWITCHES
valgrind -run LIST_OF_VALGRIND_SWITCHESDocker container creates a different type of binary, than macOS. If you want to just compile inside docker
valgrind --compile