| |||
| Home > ARM Debuggers for Windows and UNIX > Breakpoints, watchpoints, and stepping > Complex breakpoints | |||
When you set a complex breakpoint, you specify additional conditions in the form of expressions entered in the Set or Edit Breakpoint dialog (Figure 3.7).
This dialog contains the following fields:
The source file that contains the breakpoint. This field is read-only.
The position of the breakpoint within the source file. This position is a hexadecimal address for assembler code. For C or C++ code, it is shown as a function name, followed by a line number, and if the line contains multiple statements, a column position. This field is read-only.
An expression that must be true for the program to halt, in addition to any other breakpoint conditions. Use C-like operators such as:
i < 10 i != j i != j + k
The program halts when all the breakpoint conditions apply for the nth time.
You can set breakpoints to be 32-bit (ARM) or 16-bit (Thumb) size, or allow the debugger to make the appropriate setting. A checkbox allows to make your selection the default setting.
You can set complex breakpoints on:
a line of code
a function
a low level symbol.
Follow these steps to set or edit a complex breakpoint on a line of code:
Double click on the line where you want to set a breakpoint, or on an existing breakpoint position. The Set or Edit Breakpoint dialog is displayed.
Enter or alter the details of the breakpoint.
Click OK. The breakpoint is displayed as a red marker in the left-hand pane of the Execution, Source File, or Disassembly window. If the line in which the breakpoint is set contains several functions, the breakpoint is set on the function that you selected in step 1.
Follow these steps to set or edit a complex breakpoint on a function:
Display a list of function names in the Function Names window.
Select Set or Edit Breakpoint from the Function Names window menu.
The Set or Edit Breakpoint dialog is displayed. Complete or alter the details of the breakpoint.
Click OK.
Follow these steps to set or edit a breakpoint on a low-level symbol:
Display the Low Level Symbols window.
Select Set or Edit Breakpoint from the window menu.
Complete or alter the details of the breakpoint.
Click OK.