Sir, I guess I'm doing a small mistake somewhere, This is the output I get
Code:Functions called are as follows addr2line: '-f': No such file () addr2line: '-f': No such file () addr2line: '-f': No such file () addr2line: '-f': No such file () addr2line: '-f': No such file () addr2line: '-f': No such file () addr2line: '-f': No such file ()
My mistake. I originally had the program name fixed in the script. It is now an argument.
There is a bit of a clue on line 3 of the script.Code:./dotrace.sh fun
Code:image="$1"
Sir, that was wonderful. Thanks a lot, it works fine.
However, I have 1 more question in something that's not entirely related to the thread, but necessary for me to get my application working.
I have a lot of files in an application I'm working on. Is there a way to add this line
to all of those files from maybe the shell(as in, without editing individual makefiles, far too many to edit individually).Code:gcc -g -finstrument-functions -o fun fun.c pvtrace/instrument.c
The gcc part of my makefiles look like this,
orCode:%.o : %.cpp $(GXX) $< -o $@ $(CFLAGS)
Thanks a lot Sir for the help.Code:main.o: $(DIR)/main.c $(CC) -c $? $(CFLAGS)
Last edited by IAMTubby; October 31st, 2012 at 08:01 PM.
Sir, the learning resource you gave me was excellent. Thanks a lot . I found it very helpful.
Maybe, our very own ubuntuforums.org should follow the graph kind of an approach, by which, this reply would have come under your post, 2 posts back, instead of coming in serial order of date/time posted. Will make it easier for a person viewing this thread after 5 years. Just a random thought
Still figuring out a way to apply the change to all the files in my application..
Last edited by IAMTubby; October 31st, 2012 at 08:39 PM.
Sir, I would like to ask the above question on a different thread, not to mix with the original discussion.
Marking the thread as solved. But, further replies about the makefile option would be more than welcome.
Thanks a lot once again!
PS : The thread about a possible make option is on http://ubuntuforums.org/showthread.p...8#post12329538
Sir,This is 1 week old, but I have a question.
I got the trace working with the dotrace.sh script you provided.But I'm not able to get the graph trace. I tried running
.Code:dot -Tjpg graph.dot -o graph.jpg
This is what I get on running the above
I do have the necessary files. This is the output of lsCode:$ dot -Tjpg graph.dot -o graph.jpg -bash: dot: command not found
I tried to read the manual for dot utility mentioned in the Resources on the webpage you gave, but it says "Page not found"Code:dotrace.sh fun.c graph.dot pvtrace trace.txtfun gmon.out instrument.c pvtrace.zip
Please advise.
Thanks.
Last edited by IAMTubby; November 8th, 2012 at 10:58 AM.
Code:$ dot The program 'dot' is currently not installed. You can install it by typing: sudo apt-get install graphviz
Sir, Yes I got it working
But may I ask just 1 more question on this topic. I did a sudo apt-get remove after getting it to work, because I wanted to install from source. I found the source at http://www.graphviz.org/Download_source.php and successfully did a sudo make install in ~/Desktop/local.
These are the steps I followed
Now my ~/Desktop/graphviz-2.28.0 containsCode:wget http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.28.0.tar.gz unzip graphviz-2.28.0.tar.gz cd graphviz-2.28.0 mkdir -p $HOME/local ./configure --prefix=$HOME/local make clean make make install
and ~/Desktop/local containsCode:aclocal.m4 config.h.in doc iffe Makefile.old ast_common.h config.h.old dot.demo INSTALL NEWS ast_common.h.in config.iffe Doxyfile INSTALL.old plugin AUTHORS config.log Doxyfile.in lib plugin.demo autogen.sh Config.mk.old FEATURE libltdl README awk config.status features libtool rtest builddate.h configure graphs m4 share ChangeLog configure.ac graphviz.7 macosx stamp-h1 cmd configure.old graphviz.sln makearch tclpkg compat_getopt.h contrib graphviz.spec Makeargs windows compat.h COPYING graphviz.spec.in Makefile config cpl1.0.txt graphviz.vcproj Makefile.am config.h debian graphviz_version.h Makefile.in
How do I proceed ?Code:bin include lib share
When I try doing dot -Tjpg graph.dot -o graph.jpg, it still gives me the error
Thanks.Code:The program 'dot' is currently not installed. You can install it by typing: sudo apt-get install graphviz
Last edited by IAMTubby; November 15th, 2012 at 12:39 AM.
Bookmarks