Solved

How to use mtrace

Posted on 2006-11-19
5
2,607 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

733 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