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.

Debug Server: How to set breakpoint on return from function



Hi,

I would like to read and dump the final values of local variables in a function before returning from the function from a debug server script. Currently I am doing this by specifying the source file and line number in the script. This requires me to edit by dss script each time I edit my source file. Is there a better to way to halt the CCS debugger when returning from a function?

regards,

Venkat

  • Hi Venkat,

    I'd set your breakpoint on a symbol. That way even if the address changes, you don't need to update your script. Maybe insert a label at the end of the function.

    Thanks

    ki

  • Hi Ki,

    Defining a label worked. However I had to define a label using ASM statement instead of a C label statement.

    // In the C source
     asm("testcomplete:");
    return 0;

    // In the DS script
    debugSession.breakpoint.add("testcomplete");

    Thanks for your help.

    regards,
    Venkat