I'm not sure what's up with your RHEL box, but the Mac has a surprising (and 
annoying) trick for getting debugging information.  For whatever reason, the 
usable debugging information for a Darwin binary isn't actually stored in the 
binary itself.  Instead you must run a program called "dsymutil" on the binary 
in order to create this goofy "foo.dSYM" directory when run on a binary named 
"foo".  If you omit this step it will appear that no debug information was ever 
emitted when you built the binary.

Valgrind has an option to make this a bit easier: "--dsymutil=yes".  Valgrind 
will run dsymutil for you automatically if this option is passed.  IIRC it's 
fine if you run normal programs, but if you are running an MPI program under 
valgrind with "mpiexec" or similar then it won't work reliably.

-Dave

On Nov 30, 2011, at 9:11 AM CST, Kyle Niemeyer wrote:

> I'm trying to use valgrind to debug my program, but I can't seem to get any 
> line numbers to display in the output... and this is the case both on my Mac 
> OS X system and RHEL CentOS 5.7 (with the same code).
> 
> I've tried compiling with "g++ -O0 -g" on both, and multiple gcc versions on 
> the RHEL machine (Apple's gcc 4.2.1 on the Mac), but the same results each 
> time.
> 
> Any suggestions?
> 
> Thanks,
> Kyle Niemeyer
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application performance, 
> security threats, fraudulent activity, and more. Splunk takes this 
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Valgrind-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/valgrind-users


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to