11.5 C/C++ editor

Use the C/C++ editor to view and edit C and C++ source code. It provides syntax highlighting, code formatting, and content assist (Ctrl+Space) for auto-completion.

This editor also enables you to:

  • View interactive help when hovering over C library functions.

  • Set, remove, enable or disable a breakpoint.

  • Set or remove a trace start or stop point.

Figure 11-5 C/C++ editor
C/C++ editor


In the left-hand margin of each editor tab you can find a marker bar that displays view markers associated with specific lines in the source code.

To set a breakpoint, double-click in the marker bar at the position where you want to set the breakpoint. To delete a breakpoint, double-click on the breakpoint marker.

Note:

If you have sub-breakpoints to a parent breakpoint then double-clicking on the marker also deletes the related sub-breakpoints.

Action context menu options

Right-click in the marker bar, or the line number column if visible, to display the action context menu for the C/C++ editor. The options available include:

DS-5 Breakpoints menu

The following breakpoint options are available:

Toggle Breakpoint

Sets or removes a breakpoint at the selected address.

Toggle Hardware Breakpoint

Sets or removes a hardware breakpoint at the selected address.

Resolve Breakpoint

Resolves a pending breakpoint at the selected address.

Enable Breakpoint

Enables the breakpoint at the selected address.

Disable Breakpoint

Disables the breakpoint at the selected address.

Toggle Trace Start Point

Sets or removes a trace start point at the selected address.

Toggle Trace Stop Point

Sets or removes a trace stop point at the selected address.

Toggle Trace Trigger Point

Starts a trace trigger point at the selected address.

Breakpoint Properties...

Displays the Breakpoint Properties dialog box for the selected breakpoint. This enables you to control breakpoint activation.

Default Breakpoint Type

The default type causes the top-level context menu entry, Toggle Breakpoint and the double-click action in the marker bar to toggle either CDT Breakpoints or DS-5 Breakpoints. When using DS-5 Debugger you must select DS-5 C/C++ Breakpoint. DS-5 breakpoint markers are red to distinguish them from the blue CDT breakpoint markers.

Show Line Numbers

Shows or hides line numbers.

For more information on the other options not listed here, see the dynamic help.

Editor context menu

Right-click on any line of source to display the editor context menu for the C/C++ editor. The following options are enabled when you connect to a target:

Set PC to Selection

Sets the PC to the address of the selected source line.

Run to Selection

Runs to the selected source line.

Show in Disassembly

This option:

  1. Opens a new instance of the Disassembly view.

  2. Highlights the addresses and instructions associated with the selected source line. A vertical bar and shaded highlight shows the related disassembly.

    Figure 11-6 Show disassembly for selected source line
    Show disassembly for selected source line


For more information on the other options not listed here, see the dynamic help.

Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.