Spinroot

A forum for Spin users

You are not logged in.

#1 2011-11-06 19:22:38

awesan
Member
Registered: 2011-04-30
Posts: 45

showing call-stack of lnline functions in error trails - be nice

When inline functions are used, the error trail information refers to the line number inside the function but it does not report the line number of the call-site (calling function or proctype body). When macros are used, it reports the line number of the call-site. I prefer to use inline functions to macros in the models (like I do very much in C/C++). I hate to implement everything in proctype body without inline functions as it lacks clarity in reading the model (especially, when the model gets bigger). So, now, for quickly interpreting and debugging my model, I implement all the abstracted functions using both inline and macros and use a conditional directive (like "#define USE_INLINE 1") and turn it on and off to interpret the error trail information in both cases to debug my model. While this is not extremely tedious, it is quite a bit of work. It would be nice, if SPIN error-trail information shows the call-stack of functions (from proctype body to function A to function B). A depth of 3 or 4 might be more than sufficient, I think. Actually as inline functions are expanded directly and don't have their own scope, even showing call-stack with a depth of 2 might be sufficient for most use-cases, IMHO.

Offline

#2 2011-11-06 19:46:59

spinroot
forum
Registered: 2010-11-18
Posts: 702
Website

Re: showing call-stack of lnline functions in error trails - be nice

A good suggestion. Will see if this can be done easily.

Offline

Board footer

Powered by FluxBB