How to track down a function

A

Andreas Secret

I have a very large program with a lot of dependencies (objects,
functions that are linked togheter) and there is one particular function
that I want to strace troughout the program. (i.e find out every call it
makes(including its dependencies)), anyone have a good tips here?

It's too large to track by eye unfortunately
 
R

Robert Klemme

2008/1/28 said:
I have a very large program with a lot of dependencies (objects,
functions that are linked togheter) and there is one particular function
that I want to strace troughout the program. (i.e find out every call it
makes(including its dependencies)), anyone have a good tips here?

You can use set_trace_func to trace execution and build up a data
structure that reflects the call graph. However, you need to be aware
that this will only yield actual method calls and not provide
information about all places where this method can be invoked. This
is next to impossible in a dynamic language like Ruby.

Kind regards

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,017
Latest member
GreenAcreCBDGummiesReview

Latest Threads

Top