This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Breakpoints numbering issue

Hi

When  I remove some breakpoints in my code, and  re enable it just after  I have a non constant breakpoint index

For example:

Execution stopped in Thread mode at 0x1FFE447A
0x1FFE447A   9,0   return result;
break -p "I:/try_env/src/tests/D_IP_ISI_SYN/imx8qm/pdma_bypass_dc0_iris_fetchlayer0_di0.c":547
Breakpoint 10 at 0x1FFF9A60
    on file pdma_bypass_dc0_iris_fetchlayer0_di0.c, line 547
delete 10
Breakpoint 10 deleted
break -p "I:/try_env/src/tests/D_IP_ISI_SYN/imx8qm/pdma_bypass_dc0_iris_fetchlayer0_di0.c":547
Breakpoint 11 at 0x1FFF9A60
    on file pdma_bypass_dc0_iris_fetchlayer0_di0.c, line 547
wait
continue

It sounds last breakpoint index is not removed from internal database of DS5.

It can be annoying when doing some scripting and using bkp index.

How to overcome this issue?

Issue is poping up with latest v 5.27.0 DS5 .

regards

claude

  • Hi Claude,

    The breakpoints are being removed. It's just that the next available id is used for each new breakpoint.

    You could use the 'clear' command instead, and then still reference the symbol that you used to set the breakpoint at.

    So, for example, if you want to set a breakpoint at, say, the start of a function called 'compare_sorts()' you can do :

    break -p compare_sorts

    or if you know the offset from the function you can do :

    break -p compare_sorts+0xC

    then to delete use the 'clear' command, thus :

    clear compare_sorts

    clear compare_sorts+0xC

    Does that help you ?

    Regards,

    Stuart

  • Thanks Stuart,

     I really missed that command since  I always used the delete command.

    So I use the following sequence

    break main
    Breakpoint 12 at 0x1FFF732C
        on file pdma_bypass_axi_mem_Ch0_irq.c, line 235
    clear main
    Breakpoint 2 deleted
    Breakpoint 3 deleted
    Breakpoint 4 deleted
    Breakpoint 5 deleted
    Breakpoint 6 deleted
    Breakpoint 7 deleted
    Breakpoint 8 deleted
    Breakpoint 9 deleted
    Breakpoint 10 deleted
    Breakpoint 12 deleted
    break -p main
    Breakpoint 13 at 0x1FFF732C
        on file pdma_bypass_axi_mem_Ch0_irq.c, line 235
    clear main
    Breakpoint 13 deleted

    I see that all bkp are deleted after a clear command and when reseting the bkp in the same location, index is 13, not 12.

    Did I miss something?

    claude

  • Hi Claude

    Related to the above, the internal "$" variable keeps track of the last "thing" (breakpoint, watchpoint...) created. You can check it with:

       print $

    (should return 13 above).

    You can use this, or an offset of it ($-3) to reference other breakpoints. Be careful though... doing something like

      print $-1

    will return 12 above, and set $=$-1, so then

     print $

    will return 12.

    Ronan