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.

DM648 demo question (function call)

I have a question of dm648 about the function call of a network helloworld demo.

like: the LOCAL_daemonIPdiscovery(?,?);   I only found it register as a callback function when network is firstly initiated and print something on screen.

I search the whole folder, only find 3 results, one is a declaration, second is the registration in the initiative function, third is the function body.

my question is how to track  this function and find the calling relations.

 

thx.

  • Set a breakpoint at the top of the function body. When you halt in CCS, open the Call Stack and look at the previous line to find out where it was called from.

    Most likely, the calling is done in a library function for which you might have the source code or you might not.

    Usually, when a callback gets registered during initialization, the function address gets saved into a function pointer variable or into a table of function pointers. Then the callback is performed by using that function pointer. So you would not expect to see the function name anywhere other than the three places where you did find it.