This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320F28335: The result of the call graph generated by call_graph.pl differs from the actual code execution order.

Part Number: TMS320F28335

Tool/software: TI C/C++ Compiler

Hello,

The order of the code I wrote is to call the CFI function after calling the RPC function.

However, the result of the call graph generated by call_graph.pl is called CFI first, and the RPC function is called.

Aren't you creating a call graph by using the executable code and symbols of the .out file?

What am I not sure about?, Can I get the correct answer by analyzing call_graph.pl?

And it turns out that puts -> fputs -> TI_doflush -> _write etc. are called in order. Is this function correct to call functions belonging to the library?

Thanks and Regards

Han

  • The graph produced by call_graph is a static call graph.  It is developed by processing the Dwarf debug information the compiler puts in the executable.  No attempt is made to produce a dynamic call graph, which is based on information collected while running the application.  

    For example, if a function is written ...

    void parent()
    {
        zzz();
        aaa();
        /* and so on */
    

    The call graph shows something similar to ...

    parent
    |   aaa
    |   zzz

    The list of functions is accurate, but may be in a different in which they are called when executed.

    Thanks and regards,

    -George

  • Thanks for the kind and easy explanation, George

    Best Regards,

    Han