cc nn
cc nn

Reputation: 123

How to use valgrind?

I am new to valgrind, using a windows system. But this pop up when I try to use it. What can I do?

valgrind fail

Upvotes: 1

Views: 15284

Answers (1)

Warpstar22
Warpstar22

Reputation: 613

Valgrind is not available for Windows. On their home page, it says:

It runs on the following platforms: X86/Linux, AMD64/Linux, ARM/Linux, ARM64/Linux, PPC32/Linux, PPC64/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, X86/Solaris, AMD64/Solaris, ARM/Android (2.3.x and later), ARM64/Android, X86/Android (4.0 and later), MIPS32/Android, X86/Darwin and AMD64/Darwin (Mac OS X 10.12).

For alternatives, you can refer to this stackoverflow question. Many people have listed other options.

EDIT:
Since you are using WSL, that does change things. (Next time, it would be good to add that sort of information to your question. Even if Valgrind worked on Windows, using WSL does change the answer.) You should know that valgrind will only work for Linux binaries then. You won't be able to use Visual Studio code.

Otherwise, it should technically be possible, but I've worked with WSL and since it's still in its early stages, things don't always work as you expect. It might just be in your case though, that you need to do the first possible fix by sudo apt install libc6-dbg.

If that doesn't work, here is an answer about how to install it. No guarantees that this works though for you.

Upvotes: 2

Related Questions