PREV UP NEXT StackThreads/MP: version 0.77 User's Guide

3.6.2: Show Stack Trace

        void st_stack_trace()
@        void st_show_context(c)
@                st_context_t c;
@        void st_show_exported_frames()
@        int st_n_live_exported_frames()

st_stack_trace() prints stack trace of the calling worker, from the current frame down to the stack bottom. It stops printing when it reaches the stack bottom of the calling worker, 50 frames have been printed, or when it encounters any procedure that is not postprocessed. It stops printing after printing 50 frames to safely print corrupted stacks. If you want to print more frames, find definition of MAX_STACK_TRACE_DEPTH in st.c, change it as you like and recompile the library).

st_show_context(c), where c is a pointer to a context filled by st_suspend_thread, displays frames represented by c.

st_show_exported_frames() displays suspended contexts that are allocated in the calling worker's stack. st_n_exported_frames() returns the number of such contexts.