Question

I'm very interested in using Sun Studio to detect memory leaks in C++ applications with dbx debugger but I think this debugger only shows memory leaks produced by malloc/realloc and free; I'm not sure about this but I've tried with a C++ program and I've obtained no memory leaks. In this case, I'd try Valgrind. If I've done something wrong (high possibility) How do I debug C++ applications?

Thanks.

Was it helpful?

Solution

Well some points which you need to make sure,first,the application you traces do have any memory leak.if not then profiler won't show anything.If there is a leak and profiler is not capturing then need to check how you doing it. So valgrind is another best option you can try.So when you say "something wrong (high possibility) How do I debug C++ applications?" do you mean only relevant to debugging memory leak issue or in general debugging of C++ application?If its memory leak related then you can rely on valgrind,else you can also look at AIX malloc trace as well.Here is the URL for it:

http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.genprogc/doc/genprogc/malloc_trace_debug.htm

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top