Why the location of breakpoint moved and whether it will effect the debug process?

I'm debugging the project that nrf_dm to learn how it work.

The build configuration as the picture:

I add my breakpoint as follow:

However,when I start to debug,the location of breakpoint moved.

So,if I need to accept it? And it will work in which line?

Parents
  • Hi,

    This can happen sometimes when you enable optimizations, because then when you compile your code, the compiler rearranges instructions etc. in order to optimize ad improve performance. Please try disabling the optimizations and then try his again.

    Mostly the compiler will place he breakpoint at a position logically similar to your request, so if you need to enable the optimizations, then you could verify whether this is correct too.

    Regards,

    Priyanka

Reply
  • Hi,

    This can happen sometimes when you enable optimizations, because then when you compile your code, the compiler rearranges instructions etc. in order to optimize ad improve performance. Please try disabling the optimizations and then try his again.

    Mostly the compiler will place he breakpoint at a position logically similar to your request, so if you need to enable the optimizations, then you could verify whether this is correct too.

    Regards,

    Priyanka

Children
Related