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.

CCS: debug scripting -- identify breakpoint where program halted

Tool/software: Code Composer Studio

hi all,

i am trying to perform some automated testing with dss by setting breakpoints and running the program with the javascript api. now when i reach a breakpoint (or the program is paused by other means), is there a possibility to identify the current position in the program, not in terms of the current program counter value, but in terms of file and line, or the breakpoint i set respectively?

cheers,
henry.

  • Hello Henry,

    user6309841 said:
    not in terms of the current program counter value, but in terms of file and line, or the breakpoint i set respectively?

    You can configure and set breakpoints via Breakpoint Properties and then when the target is halted, the script can get the value of the program counter and then query properties of all the breakpoints set to see which one corresponds that address. It is admittedly a clunky workaround but I don't think there is a better option.

    ki

  • hi Ki,

    thanks for your response. That sounds like a working way for me, unfortunately i was unable to figure out how to query properties of all the breakpoints set. do you have a hint for me?

    Thanks,
    Henry.

  • hen said:
    unfortunately i was unable to figure out how to query properties of all the breakpoints set.

    There isn't a convenient way to query properties of all breakpoints set. You'd have to read the vaule of the PC and then go through the properties of each breakpoint set and see which one has an address matches the PC value. Once the match is found, you can then get the other properties of the breakpoint (source line, etc).

    As mentioned, it is a clucky workaround. but I can't think of a better solution at the moment.

    ki