Solved

How to use mtrace

Posted on 2006-11-19
5
2,541 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

832 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