Thread: How to find all calls to a method of some class which has common name

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Oh, but that wouldn't help you understand the code flow, if by that you mean the flow of control through the program. That would be done by tracing function call graphs rather than by finding all callers of specific functions.

    Quote Originally Posted by MartinR
    Also its not possible for IDE to find all references IMHO, because methods may be called by a pointer or in a way of inheritance or in runtime even dynamically in the runtime...
    I think "references" just means the places where the name refers to the particular function (or object, class, etc) rather than something else with the same name. That said, static analysis can handle inheritance and certain function pointer usage.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #2
    Registered User MartinR's Avatar
    Join Date
    Dec 2013
    Posts
    200
    Quote Originally Posted by laserlight View Post
    Oh, but that wouldn't help you understand the code flow, if by that you mean the flow of control through the program. That would be done by tracing function call graphs rather than by finding all callers of specific functions.
    Yeah and these function call graphs can't be generated by any IDE right? Only the debugger (by means of a breakpoint) or somebody could generate it base on their experience?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Method Calls another Method
    By FourAngels in forum C++ Programming
    Replies: 2
    Last Post: 09-07-2015, 12:08 PM
  2. Replies: 4
    Last Post: 04-15-2014, 07:57 PM
  3. Logic To Find Least Common Number Combination
    By EdMarx in forum C Programming
    Replies: 5
    Last Post: 11-29-2013, 07:16 AM
  4. Replies: 1
    Last Post: 10-11-2011, 10:21 PM
  5. class method calls
    By Shingetsu Kurai in forum C++ Programming
    Replies: 1
    Last Post: 07-28-2011, 08:52 PM

Tags for this Thread