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

  • Hi,

    You suggest that try disabling the optimizations.I check the options,there only for size,for speed,for debugging and default.

    Whether I need to select the default one?

    If so,I add CONFIG_DEBUG and CONFIG_DEBUG_THREAD_INFO to prj.config then rebuild and debug again.

    I still can not put my breakpoint in line 234.

Reply Children
Related