I am not certain if I understand this. Look at this code:
Code: Select all
void My_Server (chanend c_in, chanend c_out, int my_value) { // (1) No source available for "_start() " if Debugger | Stop on startup at: My_Server
// I did have code in here when the above message was issued
}
void My_PingPong (chanend c_in_out) {
}
void My_Client (chanend c_out, chanend c_in, chanend c_out_in) {
}
int my_function (int param) { // (2) No source available for "_start() " if Debugger | Stop on startup at: My_Server
return (param * param); // Unresolved breakpoint
}
int main(void) { // No source available for "main() " if Debugger | Stop on startup at: main
// However double-click on the line and make breakpoint WORKS!
chan c_over;
chan c_back;
chan c_pingpong;
int my_value = my_function(2);
par {
My_Server (c_over, c_back, my_value);
My_PingPong (c_pingpong);
My_Client (c_over, c_back, c_pingpong);
}
return 0;
}
When I try (1) with code in the body or (2) the debugger in both situations complains there is no source. This could be because the task / function are anonymously built or done in-line. But both my_function and especially My_Server are not undefined for
me,
I have defined them. This is not like a compiler having optimised away a line and then it's not defined, like in my_function. The debugger could have resolved them(?)
In both my_function and My_Process I also get this dialogue box from the debugger, it says "_start() " in both cases, after this next line:
No source available for "_start() "
Dialogue box:
Error stopping at My_Server
Reason: Target request failed: Function "My_Server" not defined
Continue?
HOWEVER, if I double-click on "main" the breakpoint shows and the debugger stops like I in my head have believed it should have in the first case! The Debugger | Stop on startup at: and this double-click are not symmetrical(!?) Also double-clicking in "main" is the only means to get the debug functions available. Else it just runs.
Unless somebody comes up with an explanation that I will remember the next time I come across this then I think that the xTIMEcomposer should perhaps be tidied a little here. Having worked with xTIMEcomposer for some years now I from time to time still think this strange. So I thought to bring it up here. But please put me straight if I am far out here, that this is all logical.
Related matter: The Debugger | Stop on startup at: dialogue comes up with default unticked and "main" greyed out. Perhaps it should come up with nothing in that field as default.