Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to use mtrace

Posted on 2006-11-19
5
Medium Priority
?
2,808 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 2000 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
 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 learn how to clear a vector as well as how to detect empty vectors in C++.

604 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