Instrumented stack stream corrupt

Sysprogs forums Forums VisualGDB Instrumented stack stream corrupt

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10090
    borbmizzet
    Participant

    I’m trying to use the embedded profiler with a solution that uses 2 static-library projects and one executable project,  and I keep getting a “Profiler: Instrumented stack stream corrupt” error in the GDB console when I start the program.  The main function is in one of the static libraries, if that matters. (weird, I know, but its just the way our framework here is built).

    #10111
    support
    Keymaster

    Hi,

    The “instrumented stack stream corrupt” error is shown when the stack frames reported by the instrumented program are inconsistent. This could happen if you are using an unsupported RTOS or are manually switching thread contexts.

    It is hard to say what exactly is causing this based on just the description, so we would recommend the following steps to pinpoint it:

    1. Identify roughly where the problem happens (e.g. after some action is started)
    2. Set a breakpoint just before that action.
    3. Clear the live profiling view
    4. Resume the program
    5. Once the problem happens, use the stacks displayed in Live Profiling to understand the last function call that was captured successfully. Then try to set a breakpoint there and step through it trying to reproduce the problem.
    #10134
    borbmizzet
    Participant

    So I found where it occurs, in one of the function calls inside the last function call in my bsp_initialize function near the beginning of main.  I also noticed that if I add a function call earlier than the one that prints the error, then it errors one function call sooner.  Could my systick_handler interrupt getting called a bunch of times cause this?  Because other than interrupts, there is no multithreading or RTOS in this program.

    Any help would be appreciated.

    On a side note, can you add “uncheck all” and “check all”  buttons to the  “Instrument functions to record their time” profiling session options?

    #10138
    support
    Keymaster

    Hi,

    SysTick handler should be handled normally. Perhaps some sort of memory corruption is taking place? Do you see the SysTick listed in the live profiling window? Does temporarily disabling interrupts get it over the place where it usually gets corrupt?

    Regarding “check all” and “uncheck all”, we have added those buttons in our development branch and will include them in the next maintenance build.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.