Intel® System Debugger User Guide

ID 648476
Date 06/13/2024
Confidential
Document Table of Contents

Setting a Breakpoint on a Line or Function

To set a breakpoint, halt the target and click the required line or function in the source code. Alternatively, follow these steps:

  1. Halt the target by pressing the suspend Suspend button.

  2. In the Breakpoints view, click view_menu View Menu and select Add Line breakpoint or Add Function Breakpoint.

  3. Choose the breakpoint type:

    • Regular - to let the tool automatically choose the type.

    • Hardware

    • Temporary or Hardware Temporary - to remove the breakpoint after the hit.

  4. For a line breakpoint, specify the path to the source file and its line number.

    For a function breakpoint, specify the function name.

  5. Set additional parameters:

    • Enabled box (checked by default) - uncheck if you want to keep the breakpoint disabled now

    • Condition - a custom condition for hitting the breakpoint.

      Example: condition var == 3 determines that the target will be suspended only if the variable var equals 3 when the breakpoint is met. See Setting Breakpoint Conditions for a complete description of the allowable syntax.

    • Ignore count - the number of times a breakpoint hit must be ignored.

      Example: if the parameter equals 5, the target will be suspended only when the watchpoint is hit the 6th time.

  6. Click Apply and Close.

See an example of a function breakpoint below:

function_bp_example

Now you can resume the target and see how your breakpoints work. When (or if) the breakpoint is hit, the target gets halted.