Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 89928

Summary: [Help Wanted] Valgrind integration
Product: [Tools] Linux Tools Reporter: Johan Walles <johan.walles>
Component: ValgrindAssignee: Elliott Baron <ebaron>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: cdtdoug, ebaron, hl-eclipse, r.p.miskin
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Johan Walles CLA 2005-04-01 03:57:35 EST
Valgrind (http://valgrind.org/) is a tool for detecting memory management bugs,
including leaks, reading from memory that hasn't been written to, writing
outside of arrays, etc.

Having Valgrind integration in the CDT would be very nice.
Comment 1 Alain Magloire CLA 2005-04-01 10:26:10 EST
(In reply to comment #0)
> Valgrind (http://valgrind.org/) is a tool for detecting memory management 
bugs,
> including leaks, reading from memory that hasn't been written to, writing
> outside of arrays, etc.
> Having Valgrind integration in the CDT would be very nice.

You know, I've been looking at this for a moment ...
but just lack time to commit to it(and summer(read vacation) is comming
fast here ... So if someone is willing to commit to this before I have
the chance, please contact me or keep me on the Cc: I may a few ideas and
cycles to spare for this.  Note:
- there is an o-profiler plugin
- the TPTP (aka hyades) project.
Comment 2 Chris Recoskie CLA 2007-05-16 10:34:44 EDT
No one is currently looking at this, but we'd welcome contributions from the community.

I'm reassigning this to Debug as Valgrind requires instrumenting and running your code.
Comment 3 Johan Walles CLA 2007-11-08 10:16:01 EST
(In reply to comment #2)
> I'm reassigning this to Debug as Valgrind requires instrumenting and running
> your code.

I don't know if it matters, but Valgrind does not require instrumenting your code.  It runs any binary.  If the binary has debug metadata in it, Valgrind will use that in its error reports.
Comment 4 Elliott Baron CLA 2008-09-11 12:02:23 EDT
I'll be undertaking this project for the next while. For now I'll be investigating Valgrind and deciding on the best way it can be delivered in the UI. Any input is welcome.
Comment 5 Johannes Holzer CLA 2008-12-04 11:28:45 EST
I use valgrind mainly for memory-leak-checking. 

So if someone implement the following, i'd be happy ;-)

- write an error parser for valgrind messages.

I'm ablte to run valgrind from my makefile (i use cmake, not the managed-make-mode, so i can define my targets flexible) to the the output in the build console. 

You can also make me happy if you: 

- give me an oppertunity to define a run configuration with valgrind
- make valgrind-lines clickable in the console
(this is the way it is implemented in kdevelop)
Comment 6 Richard Miskin CLA 2009-02-09 06:24:21 EST
Just in case anyone else comes across this enhancement request, it looks like the Linux Tools project is implementing Valgrind support.

See http://www.eclipse.org/linuxtools/projectPages/valgrind/

Comment 7 Andrew Gvozdev CLA 2010-05-21 09:48:47 EDT
This bug is one of most voted bugs in CDT BTW. Sounds like something Linux Tools project can take care of.
Comment 8 Doug Schaefer CLA 2010-05-21 10:23:51 EDT
(In reply to comment #7)
> This bug is one of most voted bugs in CDT BTW. Sounds like something Linux
> Tools project can take care of.

I think they already did :)
Comment 9 Andrew Gvozdev CLA 2010-05-21 10:38:04 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > This bug is one of most voted bugs in CDT BTW. Sounds like something Linux
> > Tools project can take care of.
> I think they already did :)
I mean this particular bug. Hell, I mean close it. I pass it to Linux Tools so they could read it in case there some invaluable suggestions in prior comments.
Comment 10 Elliott Baron CLA 2010-05-21 12:54:10 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > This bug is one of most voted bugs in CDT BTW. Sounds like something Linux
> > > Tools project can take care of.
> > I think they already did :)
> I mean this particular bug. Hell, I mean close it. I pass it to Linux Tools so
> they could read it in case there some invaluable suggestions in prior comments.

I'd say our Valgrind integration in the Linux Tools project is complete for most use cases. If you haven't already, please try it out: http://www.eclipse.org/linuxtools/downloads.php