[SOLVED] Data breakpoints

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Data breakpoints

    I'm troubleshooting a hard fault issue.
    I can tell that a function pointer in a structure is getting corrupted and that's what's sending execution off "into the weeds".
    So I tried to set a data breakpoint on the function pointer in the structure, but it doesn't seem to be working.
    At least it doesn't trip in the initialization code when the function pointer is initialized.

    Should data breakpoints work in my setup?

    I have a Segger J-Link ULTRA+ debugger.
    I'm using Segger Embedded Studio
    I'm using a Nordic nRF52840 processor
    I'm using the SWD interface (SWDIO/SWCLK)
  • Hello Douglas,

    Thank you for your inquiry.

    How exactly are you setting the data breakpoint?
    Are you using the breakpoint window?
    What exactly are your settings for the breakpoint?
    What is its trigger type?

    Generally it should work.
    Keep in mind that for some target devices do not support all trigger types for all memory. Check the target device reference manual for more information.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • I set a data breakpoint by using Debug - Breakpoints - New Data Breakpoint.
    Expression: m_log_data.timestamp_func (or 0x20006034 which is the address of m_log_data.timestamp_func)
    Breakpoint trigger type: Write
    When breakpoint is hit: Stop
    Check the "Use hardware Breakpoint" box


    I actually setup both expressions (m_log_data.timestamp_func and 0x20006034) then restart my application.
    Execution does not break at the point in the init code where m_log_data.timestamp_func is set.
  • Hold on.
    After I set the Data Breakpoint if I go into the Breakpoints window, right click on one of the data breakpoints I set and select "Edit Breakpoint" it shows the Breakpoint Trigger Type as "Default".
    If I manually change it to "Write" again then it seems to start working.

    So maybe the real issue is that the Data Breakpoint is not being setup as configured on the first (initial) try.
    I have to manually go in and correct it afterwards...?

    Is this a bug in SES? In the J-link? On the processor?
  • Hi Douglas,

    I set a data breakpoint by using Debug - Breakpoints - New Data Breakpoint.

    Ok, that way i was able to reproduce the issue.
    This is definitely not how it should be and we will be fixing it as soon as possible.

    So maybe the real issue is that the Data Breakpoint is not being setup as configured on the first (initial) try.
    I have to manually go in and correct it afterwards...?


    Yes, that would be the current workaround.

    Sorry for any inconveniences caused.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.