Solved

How to use mtrace

Posted on 2006-11-19
5
2,490 Views
Last Modified: 2008-01-09
Hi Experts,

It is in reference to one of my earlier posting about detecting memory leaks.  I tried to download mtrace from the location pointed in the web.  It had three files ( mtrace, mtrace.8, mtrace.Readme)
But, I included the header mycheck.h in my code and called mtrace( ) before a memory allocation.  Then I compiled and run the program.  There is a file with the following contents.
= Start
@ ./a.out:[0x80483ef] + 0x9afa378 0x4


But, I couldn't run the mtrace.


I changed the permission on the downloaded mtrace file and tried to execute it.

[ambuli@vader map]$ mtrace a.out test.txt
-bash: mtrace: command not found
[ambuli@vader map]$ ./mtrace a.out test.txt
mtrace: must be root


Could you please help me.

Old question:
http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_22063970.html
0
Comment
Question by:ambuli
  • 4
5 Comments
 
LVL 25

Accepted Solution

by:
clockwatcher earned 500 total points
ID: 17977445
The program you downloaded isn't the mtrace that you're after.  You downloaded this:

  http://www.avici.com/documentation/HTMLDocs/03252-07_revAA/MultiCommds15.html

What you're after is the mtrace in glibc-utils.


 

0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 17977448
0
 

Author Comment

by:ambuli
ID: 17979844
Thank you clockwatcher,

But, Can I install this on Centos linux?
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 17981010
If it has glibc then I would assume so.  A quick google check comes up with:

  http://rpm2html.osmirror.nl/CentOS-3.html

which leads to:

  http://rpm2html.osmirror.nl/centos/3.7/os/ia64/RedHat/RPMS/glibc-utils-2.3.2-95.39.ia64.html

So it appears that way.
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 17981392
Looked a little bit more at what CentOS is and:

 yum install glibc-utils

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now