3.4.1. Simple breakpoints

A breakpoint is a point in the code where your program is halted by the ARM Debugger. When you set a breakpoint it is marked in red in the left pane of the breakpoints window.

There are two types of breakpoint:

You can set a breakpoint at a point in the source, or in the disassembled code if it is currently being displayed. To display the disassembled code, either:

You can also set breakpoints on individual statements on a line, if that line contains more than one statement.

You can set, edit, or delete breakpoints in the following windows:

Setting a simple breakpoint

There are two methods you can use to set a simple breakpoint:

Method 1

  1. Double click on the line where you want to set the breakpoint.

  2. Click the OK button in the dialog box that appears.

Method 2

  1. Position the cursor in the line where you want to set the breakpoint.

  2. Set the breakpoint in any of the following ways:

    • select Toggle Breakpoint from the Execute menu

    • click the Toggle breakpoint button

    • press the F9 key.

A new breakpoint is displayed as a red marker in the left pane of the Execution window, the Disassembly window, or the Source File window.

In a line with several statements you can set a breakpoint on an individual statement, as demonstrated in the following example:

int main()
{
    hello(); world();
    .
    .
    .
    return 0;
}

If you position the cursor on the word world and click the Toggle breakpoint button, hello() is executed, and execution halts before world() is executed.

To see all the breakpoints set in your executable image select Breakpoints from the View menu.

To set a simple breakpoint on a function:

  1. Display a list of function names in the Function Names window by selecting Function Names from the View menu.

  2. Select Toggle Breakpoint from the Function Names window menu or click the Toggle breakpoint button.

The breakpoint is set at the first statement of the function. This method also works for the Low Level Symbols window, but the breakpoint is set to the first machine instruction of the function, that is, at the beginning of its entry sequence.

Removing a simple breakpoint

There are several methods of removing a simple breakpoint:

Method 1

  1. Double click on a line containing a breakpoint (highlighted in red) in the Execution window.

  2. Click the Delete button in the dialog box that appears.

Method 2

  1. Single click on a line containing a breakpoint (highlighted in red) in the Execution window.

  2. Right click on the line.

  3. Select Toggle breakpoint from the pop-up menu that is displayed.

Method 3

  1. Single click on a line containing a breakpoint (highlighted in red) in the Execution window.

  2. Click the Toggle breakpoint button in the toolbar, or press the F9 key.

Method 4

  1. Select Breakpoints from the View menu to display a list of breakpoints in the Breakpoint window.

  2. Select the breakpoint you want to remove.

  3. Click the Toggle breakpoint button or press the Delete key.

Method 5

  1. Select Delete All Breakpoints from the Execute menu to delete all breakpoints that are set in the currently selected image. Delete All Breakpoints is also available in relevant window menus.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential