Skip to content

wheeeper/valgrind_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Valgrind script

What is it?

It's a script for running valgrind inside a docker image, mainly for macOS because of the lack of support for the macOS Mojave.

Requirements and instalation

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

How to use

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 SWITCHES

To 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_SWITCHES

To create makefile inside the current folder with you source files

valgrind -m 
valgrind --make

To change the list of source files inside the Makefile

valgrind -f LIST_OF_FILES
valgrind --files LIST_OF_FILES

To run valgrind via the make file

valgrind -r LIST_OF_VALGRIND_SWITCHES
valgrind run LIST_OF_VALGRIND_SWITCHES
valgrind -run LIST_OF_VALGRIND_SWITCHES

Docker container creates a different type of binary, than macOS. If you want to just compile inside docker

valgrind --compile

About

Script for running valgrind inside docker image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published