Copyright: ARM Debugger for Windows or UNIX Version 2.51. Copyright © 1997, 1998, 2000 ARM Limited.
Citation: Copyright © 1997, 1998, 2000 ARM Limited. ARM, the ARM Powered logo, Thumb, Angel, ARMulator,  EmbeddedICE and Multi-ICE  are trademarks of Advanced RISC Machines Ltd. Windows 95 is a registered trademark of Microsoft Corporation. All other products or services mentioned herein may be trademarks of their respective owners.  Neither the whole nor any part of the information, programs or products contained in or described in this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder.  The products and programs described in this document are subject to continuous development and improvements. All particulars of the products and their use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties or merchantability, or fitness for purpose, are excluded. This document is intended only to assist the reader in the use of the product. ARM Ltd shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product or programs.


ADW/ADU shortcut keys
ADW and ADU shortcut keys

To Display...	Press
Backtrace	Ctrl+T
Breakpoints	Ctrl+B
Disassembly	Ctrl+D
Function Names	Ctrl+N
Low-Level Symbols	Ctrl+Z
Memory	Ctrl+M
Search Paths	Ctrl+P
Source Files	Ctrl+F
Variables:
Local	Ctrl+L
Global	Ctrl+G
Expression	Ctrl+E
Immediate Evaluation	Shift+F9
Watchpoints	Ctrl+W
Toggle Interleaving	Ctrl+I
To control execution...	Press
Breakpoints (toggle)	F9
Go (execute)	F5
Run to Cursor	F7
Step	F10
Step In	F8
Step Out	Shift+F7
Stop	Esc
Watchpoints (toggle)	F11
To edit, alter or find...	Press
Add Search Path	Ctrl+A
Copy	Ctrl+C
Delete	Delete
Find	Alt+F3
Find Repeat	F3
Goto	F4
Paste	Ctrl+V
C++ commands...	Press
Evaluate Expression	Ctrl+Shift+E
View Classes	Ctrl+Shift+C
Show Watches	Ctrl+Shift+W
Hide Watches	Ctrl+Shift+H
Recalculate Watches	Ctrl+Shift+R


ADW/ADU terminology
ADW and ADU terminology

The following terms have specific meaning within the context of the ARM Debugger for Windows and the ARM Debugger for UNIX:

ARM Code

ARM image or program

Backtrace Information

Breakpoints

Disassembled Code

EmbeddedICE

Profiling

Regular Expressions

Remote Debugging Interface

Search Paths

Thumb Code

Watchpoints


ADW/ADU toolbar
ADW and ADU toolbar

To display or hide the main toolbar or the mini toolbar, select one of the Toolbar items from the View menu.

Additional items are available if you have installed ARM C++.

Click on a button below for more information:

Load an image for debugging.

Set or remove a breakpoint, at the line that contains the cursor.

Delete all breakpoints.

Set or remove a watchpoint, at the item currently selected.

Display the value of the selected variable, the value is also written to the Command window.

Enable or disable collection of profiling information.

Select Context. Select the processor to be used in debugging.

Reload the current image for re-execution.

Execute the image.

Stop program execution.

Step to the next line of code, following all function calls.

Step to the next line of code.

Step out of the current function, stopping at the point immediately after the current function call.

Run execution from the current location to the line containing the cursor.

Related Topics

ARM mini toolbar

ARM C++ toolbar


ADW/ADU windows
ADW and ADU windows

The ARM Debugger uses a number of windows that provide different views of the image you are debugging. When you start the ARM Debugger, the Execution, Command and Console windows are loaded automatically.

To display additional windows, select an item from the View menu. The window-specific menu provides any options that are related specifically to that window.

Main windows	Command Console	Execution
Additional windows	Backtrace Breakpoints Class view Debugger internals Disassembly Expression Function names Local/globals Low-level symbols	Memory Registers RDI log Search paths Source files list Source file Watch Watchpoints
Related Topics

Window-specific menus


ARM C++ toolbar

The following additional functions are available from the main toolbar when you have ARM C++ installed.

Click on a button below for more information.

Display the Evaluate Expression dialog.

Display the Class View window.

Display the Watch window.

Hide the Watch window.

Re-initialize the values in the Watch window.

Related Topics

ADW/ADU toolbar

ARM mini toolbar


ARM Debugger for Windows or for UNIX
 ARM Debugger for Windows (ADW) and for UNIX (ADU)

Use either the ARM Debugger for Windows (ADW) or ARM Debugger for Unix (ADU) to debug your ARM application.

If you run your host computer under Windows, use ADW.

If you run your host computer under UNIX, use ADU.

ADW and ADU work in conjunction with either a hardware or a software target system. An ARM Development Board, such as an ARM6 PIE board, communicating through an Embedded ICE interface or Angel, is an example of a hardware.target system. ARMulator is an example of a software.target system.

You debug your application using a number of windows that give you various views on the application you are debugging.

You can also use the ARM Debugger to benchmark your application.

Refer to the documentation supplied with your target board for more information on PIE boards, EmbeddedICE etc.

See the Toolkit User Guide  for more information on ARM code.

Related Topics

Getting started

Closing ARM Debugger


ARM code
ARM code is the 32-bit ARM assembly language that can be compiled to run on an ARM microprocessor.

For more information, see What is ARM Code?


ARM image or program

An ARM image is an executable program built from ARM, Thumb and/or C code by the ARM compilers and linker. An image can be targeted at particular ARM hardware or at an ARM emulator. An image may or may not include debugging information.

See the Toolkit User Guide  for more information.


ARM mini toolbar

The following functions are available from the ARM mini toolbar.

Click on a button below for more information.

Display a list of registers for User mode in a Registers window.

Display a list of local variables in a Locals window.

Display a particular area of memory by address in a Memory window.

Display an area of memory as disassembled code in a Disassembly window.

Display backtrace information in a Backtrace window.

Related Topics

ADW/ADU toolbar

ARM C++ toolbar


ARMulator
The ARMulator is a collection of programs that emulate the instruction sets and architecture of various ARM processors.

For more information see What is the ARMulator?


ARMulator configuration dialog

Use this dialog to change configuration settings for the ARMulator.

Variant	Processor type required for emulation.
Clock speed	Clock speed to be used for emulation. If the Emulated radio button is selected then the clock speed used is the value that you enter into the Speed field. Values stored in environment variable $clock depend on this setting, and are unavailable if you select Real-time. If the Real-time radio button is selected then the real-time clock of the host computer is used and the Speed field is unavailable.
Floating-point emulation	Toggles floating point emulation on and off. If you are using the software floating-point C libraries, ensure that this option is off (blank). The option should be on (checked) only if you are using the hardware floating-point emulator (FPE).
Access this dialog by selecting: Options menu → Configure Debugger option → Target tab → ARMulate target environment → Configure button.

Related Topics

What is the ARMulator?

Debugger configuration

Changing the debugger font

Angel Remote configuration

EmbeddedICE configuration


Aborting program execution
 To abort program execution:

Note:	Not implemented.


About breakpoints

A breakpoint is a point in the code where your program is halted by the ARM Debugger. When you have set a breakpoint, it is displayed as a red marker in the left-hand pane of the breakpoints window.

There are two types of breakpoint:

a simple breakpoint that stops at a particular point in your code.

a complex breakpoint that:

stops when the program has passed the specified point a number of times.

AND/OR

stops at the specified point only when an expression is true.

You can choose to set a breakpoint at a point in the source or in the disassembled code (if it is currently being displayed). You can also set breakpoints on individual statements within a line, if that line contains more than one statement.

Note:	You can set, edit or delete breakpoints in the following windows:
Execution window
Disassembly window
Source File window
Backtrace window
Breakpoints window
Class View window
Function Names window
Low Level Symbols window

Related Topics

Displaying a list of all breakpoints

Setting a simple breakpoint on a line of code

Setting a simple breakpoint on a function

Setting a breakpoint on a statement in a line

Setting or editing a complex breakpoint on a line of code

Setting or editing a complex breakpoint on a function

Setting a breakpoint on a function in a C++ class

Removing a breakpoint


 About loading images

When you load an image, the program is displayed in the Execution window as disassembled code (the Command and Console windows are also displayed). A breakpoint is automatically set at the entry point of the image, usually the first line of source after the main() function. The current execution marker (green bar indicating the current line) is located at the entry point of the program.

Note:	When you have executed your program, you must reload it before you can execute it again. Click the Reload button or select Reload from the File menu.

Related Topics

Loading an image

Specifying the command-line arguments for your program

Loading an image's symbols

Reloading the current image

Executing an image

Flash Download dialog


 About running your program

You can run your program in the ARM Debugger in one of two ways. First, you can execute the entire program; the ARM Debugger halts execution at any breakpoints or watchpoints encountered. Second, you can step through the code a line at a time, stepping into or over procedures as needed.

While the program executes, the Console window is activated and the program code is displayed in the Execution window.

Execution continues until:

a breakpoint halts the program at a specified point.

OR

a watchpoint halts the program when a specified variable or register changes.

OR

you stop the program.

You can then continue execution from the point where the program stopped.

Notes:	1	When you execute the image, the program halts at any breakpoints applied and the program is displayed in the Execution window as source.

2	If you wish to execute your program again, you must reload it first.

Related Topics

Executing an image

Stepping In to a function call

Stepping to the next line of code

Stepping out of a function

About breakpoints

About watchpoints

Stopping program execution


About watchpoints

In its simplest form, a watchpoint halts a program when a specified register or variable is changed. The program halts at the next statement or machine instruction after the one that triggered the watchpoint.

There are two types of watchpoint:

a simple watchpoint that stops when a specified variable changes.

a complex watchpoint that:

stops when the variable has changed a specified number of times.

AND/OR

stops when the variable is set to a specified value.

Note:	If you set a watchpoint on a local variable, the watchpoint is lost as soon as you leave the function that uses the local variable.

Related Topics

Setting a simple watchpoint

Setting or editing a complex watchpoint

Removing a watchpoint

Displaying a list of all watchpoints

Displaying an expression in the watch window


Adding a source file search path
To add a source file search path:

1.	Select Add a Search Path from the Options menu.

The Browse for Folder dialog is displayed.

2.	Browse for the directory you wish to add and highlight it.

3.	Click the OK button.

Related Topics

What is a search path?


Angel is a debug monitor that allows rapid development and debugging of applications running on ARM-based hardware. Angel can debug applications running in either ARM state or Thumb state on target hardware following instructions given by a debugger (such as ADW or ADU) running on the host computer. The Angel Debug Monitor runs alongside the application being debugged on the target platform.


Angel Remote configuration dialog

Use this dialog to configure the settings for the Angel connection you are using to debug your application.

Remote Connection	Choose either Serial or Serial/Parallel depending on the connections. For Ethernet, enter either an IP address or the host name of the target board.
Heartbeat	Ensures reliable transmission by sending heartbeat messages. If not enabled, there is a danger that host and target can get into a deadlock situation with both waiting for a packet.
Ports	Allows you to choose the correct serial and parallel devices for the debug connection.
Serial Line Speed	Baud rate used to transmit data along the serial line.
Channel Viewers (ADW only - not available in ADU)	Switches on/off the selected channel viewer DLL. Add adds a channel viewer DLL. Remove removes the selected channel viewer DLL.
Access this dialog by selecting: Options menu → Configure Debugger option → Target tab → Remote_A target environment → Configure button.

Related Topics

What is Angel?

What is remote_a?

Debugger configuration

Changing the debugger font

ARMulator configuration

EmbeddedICE configuration

Selecting a channel viewer


Backtrace
Backtrace information shows all currently active procedures, starting with the most recent.

For more information see, What is Backtrace Information?


 Backtrace window

The Backtrace window displays current backtrace information about your program. From the Backtrace window you can:

show disassembled code for the current procedure.

show a list of local variables for the selected procedure/function.

set or remove breakpoints.

Right-click on an item to display the Backtrace window menu.

Related Topics

What is backtrace information?

Displaying backtrace information

Backtrace window menu

Setting simple breakpoint on a line of code

Setting or editing a complex breakpoint on a line of code


Backtrace window menu

This menu is displayed when you right-click on an item in the Backtrace window.

Item- or line-level commands require that you right-click on the item you want to manipulate when you invoke the menu.

Show Source / Disassembly	If a line contains a memory address, a Disassembly window showing the area of memory is displayed, otherwise a Source File window is displayed with the code surrounding the selected line.
Show Local Variables	Display the local variables within the selected function.
Toggle Breakpoint	Set simple breakpoint or remove a breakpoint.
Set or Edit Breakpoint	Set or edit a complex breakpoint or remove a breakpoint
Delete All Breakpoints	Remove all the breakpoints.
Related Topics

Backtrace window

Disassembly window

Source File window

Locals/Globals window


Breakpoint
A breakpoint is a marker on a line of code or a memory address where image execution halts. A breakpoint may be conditional. Breakpoints are indicated by a red bar.

For more information see About Breakpoints.


Breakpoints

About breakpoints

Displaying a list of all breakpoints

Setting a simple breakpoint on a line of code

Setting a simple breakpoint on a function

Setting or editing a complex breakpoint on a line of code

Setting or editing a complex breakpoint on a function

Removing a breakpoint

Setting a breakpoint on a function in a C++ class


Breakpoints window

The Breakpoints window displays a list of all breakpoints set in your image. The actual breakpoint is displayed in the right-hand pane. If the breakpoint is on a line of code the relevant source file is shown in the left-hand pane.

From this window you can:

show source/disassembled code.

set, edit or remove breakpoints.

Right-click in this window to display the Breakpoints window menu.

Related Topics

About breakpoints

Displaying an area of memory as disassembled code

Displaying a list of all breakpoints

Breakpoints window menu


Breakpoints window menu

This menu is displayed when you right-click in the Breakpoints window.

Item- or line-level commands require that you right-click on the item you want to manipulate when invoking the menu.

Show Source / Disassembly	If a line contains a memory address, a Disassembly window showing the area of memory is displayed, otherwise a Source File window is displayed with the code surrounding the selected line.
Delete Breakpoint	Deletes the breakpoint currently selected.
Edit Breakpoint	Displays the Set or Edit Breakpoints dialog.
Related Topics

About breakpoints

Disassembly window

Source File window

Breakpoints window


Bytes or words
Bytes, shorts or words

You can use the Command window to enter a command that reads data from, or writes data to memory. You must, however, be aware of the default length of data read or written, and how to change it if necessary.

By default, a read from or write to memory in armsd, ADW or ADU transfers a word value of 4 bytes. For example:

let 0x8000 = 0x01

transfers 4 bytes to memory starting at address 0x8000. In this example, the bytes at 0x8001, 0x8002 and 0x8003 are all zero-filled.

To write a single byte to memory, use an instruction of the form:

let *(char *) 0xaddress = value

and to read a single byte from memory, use an instruction of the form:

print /%x *(char *) 0xaddress

where /%x means ‘display in hexadecimal’.

You can also read and write half-word ‘shorts’ in a similar way, for example:

let *(short *) 0xaddress = value
print /%x *(short *) 0xaddress

You can also select View->Variables->Expression to obtain the View Expression window, and use that to specify bytes or shorts for displaying memory.

For example, for bytes, enter *(char *) 0xaddress in the View Expression box., and for shorts, enter *(short *) 0xaddress in the View Expression box.

To display in hex, right-mouse click on the Expression window, select Change Window Format and enter %x.

Related Topics

Expression window

Expression window menu

Expression evaluation guidelines


C++ menu

The C++ menu offers the following options:

Evaluate Expression	Display the Evaluate Expression Dialog.
View Classes	Display the Class View window
Show Watches	Display the Watch window
Hide Watches	Hide the Watch window
Recalculate Watches	Re-initialize the values in the Watch window
Note:	The C++ menu appears only when you have installed the optional C++ add on.


Capturing profiling information
To capture profiling information:

1.	Load your image file.

2.	Select Toggle Profiling from the Profiling sub-menu on the Options menu.

3.	Execute the program.

4.	When the image terminates, select Write to File from the Profiling sub-menu on the Options menu. A Save dialog is displayed.

5.	Enter a file name and a directory as necessary.

6.	Click the Save button.

Tip:	When you have started program execution, you cannot turn profile collection on. However, if you want to collect information on only a certain part of the execution, you can initiate collection before executing the program, clear the information collected up to a certain point (for example at a breakpoint), then execute the remainder of your program.

Related Topics

What is profiling?

Executing an image

Loading an image


Changing display format
To change display format:

1.	Open the Display Format dialog:

In the Watch window:

a.	Select an item in the Watch window or select the Watch window.

b.	Select Format Value or Format window from the Watch window menu.

In all other windows:

a.	Select a window or an item in a window.

b.	Select Change Display Format from the Options menu.

The Display Format dialog is displayed.

2.	Enter the required display format.

3.	Click the OK button.

The format of the data shown in the selected window is changed to the new format.

Note:	If you leave the Display Format dialog empty and click OK, the default display format is restored.

You can change the default display format for a variable type using Change Default Display Formats from the Options menu.

Tip:	You can change the format of a single variable by selecting Change Line Format from the Locals/Globals window menu.

Related Topics

Display Format dialog

Display Format dialog - watch window

Display formats


Changing the debugger font
To change the debugger font:

1.	Select Change Text Font from the Options menu. The Font dialog is displayed.

2.	Select a font, font style and/or character size.

3.	Click the OK button.

Related Topics

Font window

Debugger configuration

Angel Remote configuration

ARMulator configuration

EmbeddedICE configuration


Changing the format of a variable
To change the format of a variable:

1.	Right-click on the variable and select the Change line format from the Locals or Globals window menu. The Display Format dialog is displayed.

2.	Enter the display format.

3.	Click the OK button.

Tip:	If you leave the Display Format dialog empty and click OK, the default display format is restored.

Note:	This can be done in the Locals or the Globals window, Expressions window or the Debugger Internals window. If you change the value in one of the format type variables in the Debugger Internals window, it has the effect of changing the format of all variables of that type.

Related Topics

Display Format dialog

Display formats


 Class view window

The Class View displays the structure of the classes in your C++ program. The following symbols are used:

	A class that contains global functions.
	A class within the hierarchy.
	A function within a class, the lowest level in the class hierarchy. Double-click on a function to view the source in a Source File window.
	The red symbol next to a function indicates that a breakpoint has been set on the function.
	Click this symbol to expand the hierarchy.
	Click this symbol to contract the hierarchy.
From the Class View window you can:

set or remove a breakpoint on a function.

view the source of the function.

Notes:	To set a breakpoint within your code, click the Toggle Breakpoint button or select Toggle Breakpoint from the Execute menu.

Parameters that are references are shown as *Param, not &Param in the function.

Related Topics

Class view window menu

About breakpoints

Source File window

Setting a breakpoint on a function in a C++ class


Class view window menu

This menu is displayed when you right-click on an item in the Class View window.

Item- or line-level commands require that you right-click on the item you want to manipulate when you invoke the menu.

Toggle Breakpoint	Toggles a breakpoint on the selected function.
View Source	Displays a Source window that contains the selected function.
Related Topics

Class View window


Closing Debugger for UNIX
To close ARM Debugger

Select Exit from the File menu.


Command line arguments dialog

This dialog enables you to specify the command-line arguments for your program. The arguments take effect the next time you execute your program.

Accessed by selecting Set Command Line Args from the Options menu.

Related Topics

Specifying command-line arguments for your program


Command window

The Command window displays a Debug: command line. You can enter debug commands (except for Pause or Quit) at this prompt, the syntax used is the same as that used for armsd. Type help at the Debug prompt for information on the available commands.

See the Toolkit Reference Guide  for more information on the Command Line Debugger.


Console window

The Console window allows interaction between you and the executing program. Anything printed by the program is displayed in this window and any input required by the program must be entered here. The information remains until you select Clear from the Console window Menu. You can also save the contents of the Console window to disk, by selecting Save from the Console window menu.

Initially the Console window displays the start-up messages of your target processor, for example the ARMulator or a PIE card.

Right-click on this window to display the Console window menu.

Note:	When input is required from the debugger keyboard by your executable image, most ADW/ADU functions are disabled until the required information has been entered.

Related Topics

Interacting directly with your program

Console window menu

What is the ARMulator?


Console window menu

This menu is displayed when you right-click on the Console window.

Clear	Clears the text displayed in the Console window.
Save	Saves the contents of the Console window to a file. A standard save as dialog is displayed.
Related Topics

Console window


Copying a file on disk to memory
To copy a file on disk to memory:

1.	Select Get File from the File menu. The Get file dialog displayed.

2.	Select the file you want to load into memory.

3.	Enter the destination memory location or low-level symbol in the Address field.

4.	Click the Open button.

Related Topics

What are low-level and high-level symbols?

Saving an area of memory to disk

Get File Address dialog


Debug agent
A debug agent is the entity that performs the actions requested by the debugger, such as setting breakpoints, reading from memory, or writing to memory. It is not the program being debugged, or ADW/ADU itself.

Examples of debug agents include the EmbeddedICE interface and the Angel Debug Monitor.


Debug using a command line

If you are familiar with the ARM symbolic debugger (armsd) you may prefer to use the same set of commands from the Command Window.

Select Command from the View menu to open this window.

The Command window displays a Debug: command line. You can enter ARM command line debugger commands at this prompt. The syntax used is the same as that used for armsd. Type help for information on the available commands.

Refer to Chapter 4 of the ARM Software Development Toolkit User Guide and the ARM Software Development Toolkit Reference Guide for more information.

Related Topics

Command window


Debugger configuration

You may examine, and change if you wish, a number of debugger configuration parameters.

The parameters are displayed on the following tabbed screens within the Debugger Configuration dialog box:

Debugger configuration - Target

Debugger configuration - Debugger

Debugger configuration - Memory Maps.

Related Topics

ARMulator

ARMulator configuration

Angel Remote configuration

EmbeddedICE configuration

Changing the debugger font


Debugger configuration - Debugger option

Use this dialog to change the debugger parameters in the configuration used by the Debugger.

Profile Interval	Time between pc-sampling in microseconds. Applicable to ARMulator and Angel only. Lower values have a higher performance overhead, and slow down execution. Higher values are not as accurate as lower values.
Source Tab Length	When a source file is displayed this specifies the length (number of space characters) of any tabs used. This setting also applies to output in the Console and Command windows.
Endian	Determines byte sex of the target. Applicable to ARMulator and EmbeddedICE interface only.
Disable Splash Screen	When check-marked, stops display of the splash screen (the ADW/ADU startup box) when the debugger is first loaded.
Remote Startup Warning	Turns on or off the warning that debugging is starting with Remote_A (Angel) enabled. If the warning is turned off and debugging is started without the necessary hardware attached, there is a possibility that ADW/ADU may hang. If the warning is enabled, you have the opportunity to start in ARMulate.
When your changes are complete:

click the OK button to save and exit.

click the Apply button to save.

click the Cancel button to ignore all changes not Applied and exit.

Access this dialog by selecting: Options menu → Configure Debugger option → Debugger tab.

Note:	When you make changes to the Debugger configuration, the current execution is ended and your program is reloaded.

Related Topics

Debugger configuration

Debugger configuration - Target option

Debugger configuration - Memory Maps option

ARMulator

ARMulator configuration dialog

Angel Remote configuration dialog

What is Angel

Remote_D


Debugger configuration - Memory Maps option

Use this dialog to specify the memory map file that contains details of the simulated memory map that the ARMulator will use.

The file includes details of the databus widths and access times for each memory region in the simulated system. For further information, see Chapter 8 of the ARM Software Development Toolkit User Guide (ARM DUI 0040).

You can select one of three Memory Map options:

No Map File

Global Map File

Local Map File

When you have specified the file:

click the OK button to save and exit.

click the Apply button to save.

click the Cancel button to ignore all changes not Applied and exit.

Access this dialog by selecting: Options menu ® Configure Debugger option ® Memory Maps tab.

Note:	When you make changes to the Debugger configuration, the current execution is ended and your program is reloaded.

Related Topics

Debugger configuration - Debugger option

Debugger configuration - Target option

ARMulator

ARMulator configuration dialog


Debugger configuration - Target option

Use this dialog to change the configurations of the target environments that are used during debugging.

Target Environment	The target environment for the image being debugged.
Add	Display an Open dialog to add a new environment to the debugger configuration.
Remove	Remove a target environment.
Configure	Display a configuration dialog for the selected environment.
	Display a more detailed description of the selected environment.
When your changes are complete:

Click the OK button to save and exit. ADW/ADU attempts to make your selected RDI connection. If the attempt is not successful the ARMulate setting is restored.

Click the Cancel button to ignore all changes and exit.

Access this dialog by selecting: Options menu → Configure Debugger option → Target tab.

Note:	When you make changes to the Debugger configuration, the current execution is ended and your program is reloaded.

Related Topics

Debugger configuration

Debugger configuration - Debugger option

Debugger configuration - Memory Maps option

ARMulator

ARMulator configuration dialog

Angel Remote configuration dialog

What is Angel

Remote_D


Debugger configuration and preferences

Configuring target parameters

Configuring debugger parameters

Configuring memory maps

Changing the debugger font

Configuring EmbeddedICE

Configuring Angel

Configuring ARMulator


Debugger internals window

This window displays some of the Debugger's internal variables. Use this window to change some of the values while in the Debugger.

$clock	Number of microseconds since the application program began execution (operates correctly provided clock speed is "Emulated" and not "Real-time"). This variable is read-only.
$cmdline	Argument string for the image being debugged.
$echo	Non zero if commands from obeyed files should be echoed (initially set to 0).
$examine_lines	Default number of lines for examine command (initially set to 8).
$int_format	Default format for printing integer values
$uint_format	Default format for printing unsigned integer values
$float_format	Default format for printing floating point values
$sbyte_format	Default format for printing signed byte values
$ubyte_format	Default format for printing unsigned byte values
$string_format	Default format for printing string values
$complex_format	Default format for printing complex values
$fpresult	Floating-point value returned by last called function (junk if none, or if a floating-point value was not returned). This variable is read-only.
$inputbase	Base for input of integer constants (initially set to 10).
$list_lines	Default number of lines for list command (initially set to 16).
$pr_linelength	Default number of characters displayed on a single line (initially set to 72).
$rdi_log	Bit 0: set to 1 to turn RDI on, 0 to turn RDI off (initially 0). Bit 1: set to 1 to turn device driver logging on, 0 to turn device driver logging off (initially 0).
$result	Integer result returned by last called function (junk if none, or if an integer result was not returned). This variable is read-only.
$sourcedir	Directory containing source code for the program being debugged. Initially set to NULL.
$statistics	This variable contains any statistics the ARMulator has been keeping. This variable is read-only.
$statistics_inc	Can only be displayed in the Command window.
$statistics_inc_w	Similar to $statistics, but outputs the difference between the current statistics and the point that you asked for the $statistics_inc_w window. This variable is read-only and is not available in the Command window.
$top_of_memory	If you are using an EmbeddedICE interface, set this variable to the total amount of memory normally on the board. If you add more memory to the board, change this variable to reflect the new amount of memory.
$type_lines	Default number of lines for the type command (initially set to 10).
$vector_catch	Applying to EmbeddedICE only, this determines which conditions are detected, with control passing back to the debugger. The default value is %RUsPDAifE. A capital letter indicates a condition that is intercepted. R reset U undefined instruction S SWI P prefetch abort D data abort A address exception I IRQ F FIQ E Error
Related Topics

Modify a variable's value

Debugger internals window menu


Debugger internals window menu

This menu is available when you right-click in the Debugger Internals window.

Item-level or line-level commands require that you right-click on the item you wish to manipulate when you invoke the menu.

Indirect Through Item	Display the section of memory pointed to by the contents of the selected variable in a Memory window, or if the variable is a structure, expand and display in a Locals/Globals window.
Edit Item Contents	Display the Modify Item dialog so that you can change the value of the selected variable.
Change Line Format	Change the display format of the item you have right-clicked on.
Change Window Format	Change the display format of all the items in the Debugger Internals window, except any items changed with the Change Line Format command.
Properties	Display the selected item's name, type and value in a message box. As you select additional items the information changes.
Related Topics

Display formats

Debugger Internals window

Memory window

Locals/Globals window


Dialog boxes

ARMulator configuration Command line arguments Debugger configuration - debugger Debugger configuration - memory maps Debugger configuration - target Display format Display format - watch window Evaluate expression Flash download Font Getfile address Goto address	Goto source line Open file PutFile start address RDI log level Regular expression search Angel Remote configuration Remote_D configuration Set or edit breakpoint Set or edit watchpoint View expression


Disassembly code
Disassembled code is the machine code generated by the ARM C compiler.

For more information, see What is disassembled code?


Disassembly window

The Disassembly window displays disassembled code interpreted from a specified area of memory. The memory addresses are listed in the left-hand pane and the disassembled code is displayed in the right-hand pane. ARM code, Thumb code or both can be displayed.

From this window you can:

go to another area of memory.

change the disassembled code to ARM, Thumb or Mixed.

set, edit or remove breakpoints.

Tip:	More than one Disassembly window can be active at a time.

Right-click in this window to display the Disassembly window menu.

Related Topics

What is disassembled code?

Displaying an area of memory as disassembled code

Selecting a disassembly mode

Setting or editing a complex breakpoint on a line of code

Removing a breakpoint

Disassembly window menu


Disassembly window menu

This menu is available from the Disassembly window when you right-click in the window.

Item-level or line-level commands require that you right-click on the item you want to manipulate when you invoke the menu.

Goto Address	Display a particular area of memory as disassembled code.
Disassembly Mode	Specify a disassembly mode.
Toggle Breakpoint	Set a simple breakpoint or remove a breakpoint on the line that contains the cursor.
Set or Edit Breakpoint	Set or edit a complex breakpoint on the line that contains the cursor.
Related Topics

Disassembly window

Displaying an area of memory as disassembled code


Display format dialog

The Display Format dialog enables you to change how variables are displayed.

Accessed by selecting:

Change Line Format or Change Window Format from the Locals/Globals window menu (right-click in the Locals/Globals window).

OR

Change Display Format from the Options menu (changes the format of the current window).

Related Topics

Changing display format

Display formats


Display format dialog - watch window

The Display Format dialog enables you to change how variables are displayed.

Accessed by selecting Format Value or Format window from the Watch window menu (right-click in the Watch window).

Related Topics

Changing display format

Display formats


Display formats

The format of values displayed for variables can be modified using the same syntax as a printf format string in C.

Format descriptors include:

Type	Format	Description
int	Use this only if the expression being printed yields an integer:
	%d	signed decimal integer (default for integers)
	%u	unsigned integer
	%x	hexadecimal (lowercase letters)
char	Use this only if the expression being printed yields an integer:
	%c	character
char*	%s	pointer to character. Use this only for expressions that yield a pointer to a zero-terminated string.
void*	%p	pointer (same as %.8x), for example, 00018abc. This is safe with any kind of pointer.
float	Use this only for floating-point results:
	%e	exponent notation, for example, 9.999999e+00
	%f	fixed-point notation, for example, 9.999999
	%g	general floating-point notation, for example, 1.1, 1.2e+06
Tip:	Leaving the Display Format dialog empty and clicking the OK button restores the default display format.

Related Topics

Changing display format


Displaying a function
To display a function:

1.	Select Function Names from the View menu. The Function Name window is displayed.

2.	Double-click on a function name.

A Source File window is displayed, positioned at the start of the function.

Related Topics

Function Names window

View menu

Source File window


Displaying a list of all breakpoints
To display a list of all breakpoints:

Select Breakpoints from the View menu.

The breakpoints are displayed in the Breakpoints window.

Related Topics

About breakpoints

Breakpoints window

Class View window


Displaying a list of all watchpoints
To display a list of all watchpoints:

Select Watchpoints from the View menu.

The watchpoints are displayed in the Watchpoints window.

Related Topics

About watchpoints

Watchpoints window


Displaying a list of functions
To display a list of functions:

Select Function Names from the View menu.

The list is displayed in the Function Names window.

Related Topics

Function Names window


Displaying a list of low-level symbols
To display a list of low-level symbols:

Select Low Level Symbols from the View menu.

The list is displayed in the Low-Level Symbols window.

Related Topics

What are low-level and high-level symbols?

Low-level symbols window


Displaying a list of registers
To display a list of registers:

Select a mode from the Registers sub-menu off the View menu.

The registers are displayed in the appropriate Registers window.

	To display a list of registers for the current mode, click the Current Registers button on the toolbar.
Related Topics

Registers sub menu

Registers window


Displaying a list of the current program's source files
To display a list of the current program's source files:

Select Source Files from the View menu.

The Source Files List window is displayed.

Related Topics

Source Files List window


Displaying a list of variables
 To display a list of variables:

Select Local from the Variables sub-menu on the View menu or click the Locals button.

OR

Select Global from the Variables sub-menu on the View menu.

A Locals or Globals window is displayed listing the currently active variables.

Related Topics

Locals/Globals window


Displaying a particular area of memory
 To display a particular area of memory:

1.	Select Memory from the View menu or click the Memory button. The Memory Address dialog is displayed.

2.	Enter the address or low-level symbol.

3.	Click the OK button.

The Memory window is opened to display the relevant part of the 4Kbyte area of memory that contains the specified address.

When you have opened the Memory window you can display other areas of memory by:

using the scrollbar (for other parts of the current 4Kbyte area of memory)

entering another address (for more remote areas of memory):

1.	Select Goto from the Search menu or select Goto Address from the Memory window menu.

2.	Enter the address in the Goto Address dialog displayed.

3.	Click the OK button.

Related Topics

What are low-level and high-level symbols?

Memory window

Memory window menu


Displaying a source file
To display a source file:

1.	Select Source Files from the View menu. The Source Files List window is displayed.

2.	Select the file by:

right-clicking on a filename and selecting Open file from the Source Files List window menu.

OR

double-clicking on the file name.

The file is opened in its own Source File window.

Related Topics

Source File window

Source Files menu


Displaying an area of memory as disassembled code
 To display an area of memory as disassembled code:

1.	Open the Disassembly Address dialog by:

selecting Disassembly from the View menu

OR

clicking the Display Disassembly button.

2.	Enter an address.

3.	Click the OK button.

The Disassembly window is opened to interpret the memory as disassembled code.

Once you have opened the Disassembly window you can display another address as disassembled code by using the scroll bars to search for an address by value or:

1.	Open the Goto Address dialog by:

selecting Goto from the Search menu.

OR

right-clicking and select Goto address from the Disassembly window menu.

2.	Enter an address.

3.	Click the OK button.

Related Topics

What is disassembled code?

Disassembly window

Disassembly window menu


Displaying an expression in the watch window
 To display an expression in the watch window:

1.	Display the Watch window:

Select Show Watches from the C++ menu.

OR

Click the Show Watches button.

2.	Add a variable to the Watch window:

a.	Press the Insert key or select Add Item from the Watch window menu.

b.	Enter the name of the expression to be displayed (if the variable is not in scope, the message "Error - Variable Not Found" will be displayed).

	Alternatively, you can add an expression to the Watch window using the Evaluate Expression dialog:
1.	Click the Evaluate Expression button. The Evaluate Expression dialog is displayed.

2.	Enter the expression to evaluate.

3.	Click the Calculate button to view the current value.

4.	Click the Add Watch button. The variable is added to the Watch window.

Related Topics

Hiding the watch window

Watch window

Recalculating watches

Evaluate expression dialog

Expression evaluation guidelines


Displaying backtrace information
 To display backtrace information:

Select Backtrace from the View menu.

OR

Click the Backtrace button.

The Backtrace window is displayed.

Related Topics

What is backtrace information?

Backtrace window


Displaying information

Changing display format

Specifying a disassembly mode

Changing the format of a variable

Changing the debugger font

Displaying a list of all breakpoints

Displaying a list of all watchpoints

Displaying a list of functions

Displaying a list of low-level symbols

Displaying a list of registers

Displaying a list of the source files of the current program

Displaying a list of variables

Displaying a particular area of memory

Displaying a source file

Displaying an area of memory as disassembled code

Displaying backtrace information

Displaying or hiding disassembled code

Displaying remote debug information

Displaying source file search paths

Displaying the contents of a register

Displaying the value of a variable

Displaying an expression in the watch window

Hiding the watch window


Displaying or hiding disassembly code
 To display or hide disassembled code:

Select Toggle Interleaving from the Options menu.

OR

Right-click and select Toggle Interleaving from the Execution window menu.

OR

Click the ARM Disassembly button.

The disassembled code is displayed in gray, the C code in black.

Related Topics

Specifying a disassembly mode

What is disassembled code?


Displaying remote debug information
To display remote debug information (RDI):

Select RDI Protocol Log from the View menu.

The RDI Log window is displayed.

Note:	RDI is not usually enabled, but must be explicitly turned on when the RDI is compiled.

Related Topics

RDI Log window


Displaying source file search paths
To display source file search paths:

Select Search Paths from the View menu.

The current search paths are displayed in the Search Paths window.

Related Topics

What is a search path?

Search Paths window


Displaying the contents of a register
 To display the value of a single register:

1.	Select Expression from the Variables sub-menu on the View menu.

2.	Enter the name of the register in the View Expression dialog.

3.	Click the OK button.

Alternatively:

1.	Highlight the register in the Execution window.

2.	Click the Evaluate Expression button.

In both cases, the contents of the register is displayed in an Expression Value information box and is recorded in the Command window.

Related Topics

Displaying a list of registers


Displaying the value of a variable
 To display the value of a single variable:

1.	Select Expression from the Variables sub-menu off the View menu.

2.	Enter the name of the variable in the View Expression dialog.

3.	Click the OK button.

Alternatively:

1.	Highlight the name of the variable.

2.	Select Immediate Evaluation from Variables sub-menu on the View menu or click the Evaluate Expression button.

In both cases, the value of the variable is displayed in an Expression Value information box and is recorded in the Command window.

Note:	If you select a local variable that is not in the current context, an error message is displayed.

Related Topics

Displaying a list of variables

Command window


Document references
ARM Software Development Toolkit User Guide  (ARM DUI 0040)

ARM Software Development Toolkit Reference Guide  (ARM DUI 0041)


Edit menu

The Edit menu offers the following options:

Copy	Copies selected text to the clipboard.
Paste	Pastes data from the clipboard into the Command window or the Console window.
Delete	Deletes watchpoints or breakpoints from their respective windows.
Clear console	Clears the Console window.
Clear RDI Log	Clears the RDI Log window.
Tip:	Copy and Paste can be used in the Command or Console windows to manipulate keyboard input.

Related Topics

Command window

Console window

RDI Log window


EmbeddedICE
EmbeddedICE is an extension to the architecture of the ARM family of RISC processors, and provides the ability to debug cores that have been deeply embedded into systems.

For more information, see What is EmbeddedICE?


EmbeddedICE configuration dialog

Use this dialog to select the settings for EmbeddedICE.

Name	Name given to the EmbeddedICE configuration. Currently restricted to ARM7DI and ARM7TDI.
Version	Version given to the EmbeddedICE configuration. Specify the version to use or enter any if you do not require a specific implementation.
Load Agent	Specify a file (new EmbeddedICE ROM image) and run it; used for major updates to the ROM.
Load Config	Prompts for an EmbeddedICE configuration file to be loaded. Click the OK button to run. (Generally used for minor updates.)
Accessed by selecting Configure EmbeddedICE from the Options menu; available only if the appropriate hardware is connected to your system.

Related Topics

What is EmbeddedICE?

Debugger configuration

Changing the debugger font

Angel Remote configuration

ARMulator configuration


 Evaluate Expression dialog

Evaluate the value of a C++ expression in this dialog:

Expression:	Enter the name of the expression to evaluate.
Variable/Value	When you click the Calculate button, the variable name and value are displayed.
Calculate button	Displays the current value of the expression: If the expression is a variable, the value is displayed. If the expression is a logical expression: 1 is displayed if the expression is true. 0 is displayed if the expression is false. If the expression is a C function, the value of the function is displayed. Member functions of C++ classes cannot be evaluated. If the variable is out of scope, the message "Error - Variable Not Found" is displayed.
Add Watch button	Adds the expression to the Watch window.
Accessed by selecting Evaluate Expression from the C++ menu, or by clicking the Evaluate Expression button.

Related Topics

Watch window

Displaying an expression in the watch window

Expression evaluation guidelines

Reading and writing bytes or words


Execute menu

The Execute menu offers the following options:

Go*	Execute the image from the current line to the next breakpoint or watchpoint, or until the end of the program.
Stop*	Stop image execution.
Step*	Step to the next line of code.
Step In*	Step to the next line of code, following all function calls.
Step Out*	Step out of the current function, to the line following the line the function was called from.
Run to Cursor*	Execute the image from the current position to the line containing the cursor.
Show Execution Context*	Center the code displayed in the Execution window on the current execution line.
Toggle Breakpoint	In an Execution or Source window, set or remove a simple breakpoint, acting on the line containing the cursor.
Toggle Watchpoint	In a Register or Locals/Globals window, set or remove a watchpoint, acting on the currently selected item.
Set or Edit Breakpoint	In an Execution or Source window, set, edit or remove a breakpoint, acting on the line containing the cursor.
Set or Edit Watchpoint	In an Execution or Source window, set, edit or remove a watchpoint, acting on the line containing the cursor.
Note:	Commands indicated by an asterisk (*) are reflected only in the Execution window. For example, if you are viewing a Source File window and using Step, only the Execution window reflects the change in execution context.

Related Topics

Execution window

Source File window

Registers window

Locals/Globals window


Executing an image
 To execute an image:

Select Go from the Execute menu.

OR

Click the Go button.

The program starts executing.

While the program executes, the Console window is activated and the program code is displayed in the Execution window. The program halts at any breakpoints or watchpoints applied.

	You can also stop execution by clicking the Stop button.
	If you want to execute your program again, you must first reload it by clicking the Reload button.
Related Topics

About running your program

Stopping program execution

Reloading the current image

About breakpoints

About watchpoints


Execution window

The Execution window displays the source code of the program that is currently executing. This window is always open when the ARM Debugger is running.

In the Execution window you can:

execute the entire program or step through the program line by line.

change the display mode to show disassembled code interleaved with source.

display another area of the code by address.

set, edit or remove breakpoints.

Right-click in the Execution window to display the Execution window menu.

Related Topics

Displaying or hiding disassembled code

About breakpoints

About watchpoints

About running your program

Execution window menu


Execution window menu

This menu is available from the Execution window when you right-click in the window.

Item or line level commands require that you right-click on the item you wish to manipulate when invoking the menu.

Go	Execute the image from the current line to the next breakpoint or watchpoint, or until the end of the program.
Stop	Stop program execution.
Step	Step to the next line of code.
Step In	Step to the next line of code, following all function calls
Step Out	Step out of the current function, to the line after the line the function was called from.
Run to Cursor	Execute the image from the current position to the line containing the cursor.
Toggle Interleaving	Toggles between displaying C source only and C source interleaved with disassembled code.
Disassembly Mode	Specify a Disassembly Mode.
Goto	Shift display to an area of code selected by a memory address.
Show Execution Context	Center the code displayed in the Execution window on the current execution line.
Reload Current Image	Reload the image to execute again. (After execution, the image must be reloaded if you want to execute it again.)
Toggle Breakpoint	Set or remove a simple breakpoint, acting on the line containing the cursor.
Set or Edit Breakpoint	Set, edit or remove a breakpoint, acting on the line containing the cursor.
Related Topics

Execution window


Expression evaluation guidelines

The following guidelines apply to all areas of ADW or ADU where an expression can be used, including setting watchpoints and breakpoints, and evaluating expressions in the Watch window:

Member functions of C++ classes cannot be used in expressions.

Overloaded functions cannot be used in expressions.

Only C operators can be used in constructing expressions. For a full list of valid C operators, refer to the Reference Guide. Any operators defined in a C++ class (such as []) will not work correctly because the C operator is used. Specific C++ operators, such as the scope operator (::), are not recognized.

Variables that are members of a class cannot be accessed from the expression evaluation window in a C++ manner, as if they were local variables. To use a member variable in an expression you must use one of:

-	this->member

-	this[0].member

-	*this.member

If the member variable is defined in a base class then this->member will return the correct results.

In the expression evaluation window (and only there) you can access variables of a class by name. This means that:

member

gives the same result as:

this->member

However, if you have more complex expressions such as:

this->member1 *this->member2

you cannot use:

member1 *member2

Base classes cannot be accessed in standard C++ notation. For example:

class Base
{
char *name;
char *A;
};
class Derived : public class Base
{
char *name;
char *B;
void do_sth();
};

If you are in method do_sth() you can access the member variables A, name, and B through this. The form this->name returns the name defined in class Derived.

To access name in class Base, the standard C++ notation is:

void Derived::do_sth()
{
Base::name="value";
// sets name in the base class to "value"
}

However, the Evaluate Expression dialog does not accept:

this->Base::name

because the debugger does not understand the scope operator. You can access this value with:

this->::Base.name

The following gives undefined results, although it is possible to call member functions in this form:

Class::Member(...)

Private, public, and protected attributes are not recognized in expression evaluation. This means that private member variables can be accessed in the expression window.

Note:	Functions that take character or float parameters, or parameters that require narrow cast are not displayed correctly, therefore these functions are looked up incorrectly during expression evaluation.

Related Topics

Watch window

Evaluate expression dialog

Reading and writing bytes or words


Expression window

The Expression window is used to display the values of selected variables and/or registers.

In the Expression window you can:

change the format of selected items or all items.

display the section of memory pointed to by the contents of a variable.

Right-click in the Expression window to display the Expression window menu.

Related Topics

Displaying the value of a variable

Changing display format

Changing the format of a variable

Expression window menu

Expression evaluation guidelines

Reading and writing bytes or words


Expression window menu

This menu is available from the Expression window when you right-click in the window.

Item- or line-level commands require that you right-click on the item you wish to manipulate when invoking the menu.

Indirect Through Item	Display the section of memory pointed to by the contents of the variable in a Memory window or if the variable is a structure, expand and display in a Locals/Globals window.
Change Line Format	Change the format of a variable.
Change Window Format	Change display format.
Edit Expression	Change the selected expression.
Delete Expression	Delete the selected expression.
Related Topics

Expression window

Memory window

Locals/Globals window

Reading and writing bytes or words


Expressions, variables and registers

Displaying a list of variables

Displaying a list of registers

Displaying the value of a variable

Displaying the contents of a register

Modifying the value of a register

Modifying the value of a variable

Changing the format of a variable

Displaying an expression in the watch window

Recalculating watches

Expression evaluation guidelines


File menu

The File menu offers the following options:

Load Image	Load an image for debugging.
Load Symbols Only	When debugging remotely, load an image's symbols into the Debugger.
Reload Current Image	Reload the current image for execution.
Get File	Copy the contents of a file on disk to memory.
Put File	Save an area of memory to a file on disk.
Flash Download	Invoke the Flash Download dialog.
Save Console Contents	Save the contents of the Console window to a text file.
Save RDI Log	Save the contents of the RDI Log window to a text file.
Recent used file list	A list of the images most recently loaded.
Exit	Close the ARM Debugger.
Related Topics

Console window

RDI Log window


Flash Download dialog

Use this dialog for writing an image to the Flash memory chip on an ARM PID board or any suitably equipped hardware.

Set Ethernet Address	After writing an appropriate image to the Flash memory (Angel with ethernet support, for example), this option sets the ethernet address. This is not necessary if you have built your own Angel with a fixed Ethernet address. When you click the OK button, ADW/ADU prompts you for the IP address and netmask (for example 193.145.156.78).
Arguments/Image	Specifies the arguments or image to write to Flash.
	Use the Browse button to select the image.
Note:	You can build your own flash image using the example in the ARM Target Development System User Guide (ARM DUI 0061).

Accessed by selecting Flash Download from the File menu.

Related Topics

Loading an Image


Font dialog

The Font dialog enables you to change the Debugger font, font style and font size.

Accessed by selecting Change Text Font from the Options menu.

Related Topics

Changing the debugger font

Debugger configuration

Angel Remote configuration

ARMulator configuration

EmbeddedICE configuration


Function Names window

The Function Names window displays a list of the functions that are part of your program.

In the Function Names window you can:

display a selected function as source code.

set, edit or remove a breakpoint on a function.

Right-click on an item in this window to display the Function names window menu.

Related Topics

Displaying a function

Displaying a list of functions

Setting a simple breakpoint on a function

Setting or editing a complex breakpoint on a function

Removing a breakpoint

Function names window menu


Function Names window menu

This menu is displayed when you right-click in the Function Names window.

Item-level or line-level commands require that you right-click on the item you wish to manipulate when invoking the menu.

Show Source / Disassembly	If a line contains a memory address, a Disassembly window showing the area of memory is displayed, otherwise a Source File window is displayed with the code surrounding the selected line.
Toggle Breakpoint	Set a simple breakpoint on a function or remove a breakpoint.
Set or Edit Breakpoint	Set or edit a complex breakpoint on a function.
Related Topics

Function Names window

Source File window

Disassembly window


GetFile Address dialog

Specify the file to be copied and the destination memory location in the Address field of this dialog.

Accessed by selecting Get File from the File menu.

Related Topics

Copying a File on Disk to Memory

Saving an Area of Memory to Disk


Getting started

To debug a program, perform the following steps:

1.	Load and display an image.

2.	Execute a program.

3.	Display a source file.

and possibly one or more of the following:

Display the value of a single variable.

Set a simple breakpoint on a line of code.

Set a simple watchpoint.

Related Topics

Starting ARM Debugger

Closing ARM Debugger

ARM Debugger's windows

Debug using a command line


Going to a Line of Code
To go to a line of code:

1.	Display the Goto Line dialog by:

selecting Goto from the Search menu.

OR

selecting Goto from the Source File window menu.

2.	Type the line number in the Line field.

3.	Click the OK button.

Note:	Current execution is not changed from the current line to the newly displayed line.


Going to a Memory Address
To go to a memory address:

1.	Display the Goto Address dialog.

selecting Goto from the Search menu.

OR

selecting Goto from the Execution window menu or Memory window menu.

2.	Type the line number in the Address field.

3.	Click the OK button.

Note:	Current execution is not changed from the current line to the newly displayed line.

Related Topics

Execution window

Memory window

Displaying a Particular Area of Memory


Goto Address dialog

Enter the address in memory that you want to view and click the OK button.

Accessed by selecting Goto from the Execution window menu.


Goto Source Line dialog

Enter the line number of the code you want to view and click the OK button.

Accessed by selecting Goto Line from the Source File window menu.


Help menu

This is a standard help menu. It contains the following options:

Contents	Display the top level table of contents of the available online help
Search	Display a dialog allowing you to select a topic from an alphabetical list
Using help	How to navigate through the many pages of available online help
About ARM Debugger	Details of the version of ARM Debugger that you are using


Hiding the Watch Window
 To hide the Watch window:

Select Hide Watches from the C++ menu.

OR

Select Hide window from the Watch window menu.

OR

Click the Hide Watches button.

Related Topics

Watch window


Interacting directly with your program

As well as the typical debug functions that enable you to set breakpoints and watchpoints, step through code or view variables, you can also interact with your program in more direct ways:

The Console window is used to display messages from your code and to collect any user input required.

You can use the Command window to issue command-line debugger instructions.

You can provide command-line arguments, as you load your program (using the Load Image dialog) or during the debugging session (these take effect the next time you execute your program).

Related Topics

Console window

Command window

Specifying Command-Line Arguments


Introduction

ARM Debugger for Windows or for UNIX

Getting started

ADW/ADU terminology

Starting the debugger


Load Image dialog

Use this dialog to load and display an image.

File Name	Enter the name of the image file or use the Browse button to locate the file.
Arguments	Optional, enter any command-line arguments expected by the application.
OK	Click to load the image.
Cancel	Click to exit the dialog without loading the image.
Accessed by selecting Load Image from the File menu.

Related Topics

Loading an Image


Loading an Image
 To load an image:

1.	Display the Load Image dialog by:

choosing Load Image from the File menu.

OR

clicking the Load Image button.

2.	Select the File Name of the image you wish to debug, using the Browse option if necessary.

3.	Enter any command-line Arguments expected by your image.

4.	Click OK.

If you want to write your executable image to the Flash memory chip on an ARM PID, select Flash download from the File menu.

Alternatively, if you have recently loaded your required image, your file is displayed as a recently used file on the File menu.

Note:	If you load your image from the recently used file list, the ARM Debugger automatically loads the image using the command-line arguments you specified in the previous run.

Related Topics

Load Image Dialog

Flash Download Dialog


Loading an Image's Symbols
To load an image's symbols:

If you have already downloaded your image to a development board using a method independent of the ARM Debugger, such as ARMulator, you may want to load the image's symbols into the ARM Debugger.

1.	Select Load Symbols Only from the File menu. The Load Image dialog is displayed.

2.	Select the image using the Load Image dialog, using Browse if necessary.

Related Topics

Load Image Dialog


Loading your program

About loading images

Loading an image

Loading the symbols of an image

Reloading the current image


Locals/Globals window

The Locals window displays a list of variables currently in scope and the Globals window displays a list of global variables. The variable name is displayed in the left-hand pane, and its value is displayed in the right-hand pane.

In the Locals/Globals windows you can:

display the section of memory pointed to by the variable.

change the format of the values displayed by line or for the entire window. (When the format of a line has been changed, it isn't affected by changing the format of the window.)

set, edit or remove a watchpoint on a variable.

double-click on an item to expand a structure; the details are displayed in another variable window.

double-click on a value (right-hand pane) to modify a variable.

As you step through the program the values of the variables are updated.

Right-click in this window to display the Locals/Globals window menu.

Related Topics

Displaying a Particular Area of Memory

Displaying a List of Variables

Setting a Simple Watchpoint

Removing a Watchpoint

Modifying a Variable's Value

Locals/Globals window menu


Locals/Globals window menu

This menu is available when you right-click on a particular variable in the right-hand pane of a Locals or Globals window.

Item-level or line-level commands require that you right-click on the item you wish to manipulate when invoking the menu.

Indirect through item	Display the section of memory pointed to by the contents of the selected variable in a Memory window. If the variable is a structure, expand and display the contents in a second Locals/Globals window.
Edit Item Contents	Display the Modify Item Contents dialog so you can change the variable's value.
Change line format	Change the format of the selected variable.
Change window format	Change the window's display format.
Toggle Watchpoint	Set or remove a watchpoint on the selected variable.
Set or Edit Watchpoint	Set or edit a complex watchpoint on the selected variable.
Properties	Display a  dialog that shows the variable's type and value.
Related Topics

Locals/Globals window

Memory window

Display Formats


Low-level symbols window menu

This menu is displayed when you right-click in the Low-Level Symbols window.

Item- or line-level commands require that you right-click on the item you wish to manipulate when invoking the menu.

Show Memory	Display the memory corresponding to the selected low-level symbol in a Memory window.
Show Source / Disassembly	If a line contains a memory address, a Disassembly window showing the area of memory is displayed; otherwise a Source File window is displayed with the code surrounding the selected line.
Sort Symbols by Address/Name	Switches the display between address sequence and name sequence.
Toggle Breakpoint	Set a simple breakpoint on a function or remove a breakpoint that corresponds to the low-level symbol currently selected.
Set or Edit Breakpoint	Set or edit a complex breakpoint on the function that corresponds to the low-level symbol currently selected.
Delete All Breakpoints	Delete all the breakpoints.
Related Topics

Low-level Symbols window

Memory window

Source File window

Disassembly window


Low-level symbols window

The Low-level Symbols window displays a list of all the low-level symbols in your program.

In the Low-level Symbols window you can:

display the memory pointed to by the selected symbol.

display the source/disassembled code pointed to by the selected symbol.

set, edit or remove a breakpoint on the line of code pointed to by the selected symbol.

sort the display by symbol name or symbol address.

Right-click in the window to display the Low-level symbols window menu.

Related Topics

What are low-level and high-level symbols?

Low-level symbols window menu

Setting or editing a complex breakpoint on a function

Removing a breakpoint


Memory

Displaying a particular area of memory

Displaying an area of memory as disassembled code

Going to a memory address

Saving an area of memory to disk

Copying a file from disk to memory


Memory Map - global
Memory Map - Global Map File option

Select this option to use the specified memory map file for every image loaded during the current debug session.

Use the combo box to add new map files to the list or select a file from the list.

When you have selected a filename, or typed in a filename, the debugger checks that the file exists and is of a valid format. Any file that fails these checks is removed from the list. You remain in the dialog, however, so you can fix the map file format or select another map file if necessary.

Use the Remove button to remove the currently selected file from the list.

The browse button (‘...’) allows you to select a memory map file using a Microsoft Explorer style dialog.

Related Topics

Debugger Configuration - Memory Maps option

Debugger Configuration - Debugger option


Memory Map - local
Memory Map - Local Map File option

Select this option to use a memory map file that is local to a project.

If a local memory map file is required when the debugger is initialized, the current working directory is searched. If a re-initialization occurs after the debugger has started and an image loaded, the directory containing the image is searched.

Use the combo box to add new map files to the list or select a file from the list. Do not specify an absolute path name. If a memory map file is not in the directory that contains the current image, specify a path relative to the current image path.

When you have selected a filename, or typed in a filename, the debugger does not check for the existence of the file or the validity of its format. If, upon re-initialization, the format of the file is found to be invalid, the debugger displays an error message. In that case, or if the file does not exist, the debugger defaults to the No Map File option and uses the ARMulator default settings.

Use the Remove button to remove the currently selected file from the list.

Note:	Map files are used only at re-initialization, not when a program is loaded. When you select the Local Map File option, the map file in the working directory of the current image is used. If you load a new image, the same map file is still used. To use a map file that is associated with the new image, you must re-initialize the debugger by selecting the Configure Debugger option from the Options menu and clicking OK.

Related Topics

Debugger Configuration - Memory Maps option

Debugger Configuration - Debugger option


Memory Map - none
Memory Map - No Map File option

Select this Memory Map option to use the ARMulator default memory map settings, the ‘Flat Memory Model’.

This is a flat 4Gb bank of ideal 32-bit memory, that is, having no wait states.

Related Topics

Debugger configuration - Memory Maps option

Debugger Configuration - debugger


Memory window

This window displays the contents of memory around a specified address. Addresses are listed in the left-hand pane, and the memory content is displayed in the right-hand pane.

You can view any part of the current 4Kbyte area of memory by scrolling. View more remote areas by specifying another address.

In the Memory window you can:

display other areas of memory by scrolling or specifying an address.

set, edit or remove a watchpoint.

Right-click in this window to display the Memory window menu.

Related Topics

Displaying a Particular Area of Memory

Saving an Area of Memory to Disk

Copying a File on Disk to Memory

Searching for a Regular Expression

Setting or Editing a Complex Watchpoint

Removing a Watchpoint

Memory window Menu


Memory window menu

This menu is available from the Memory window when you right-click in the window.

Item-level or line-level commands require that you right-click on the item you wish to manipulate when invoking the menu.

Goto address	Display a particular area of memory.
Edit item contents	Change the contents of the selected item.
Long Hex Format	Display contents as words.
Short Hex Format	Display contents as half words
Byte Format	Display contents as bytes with ASCII characters
Toggle Watchpoint	Set or remove a watchpoint on the address that contains the cursor.
Set or Edit Watchpoint	Set or edit a complex watchpoint on the currently selected address.
Related Topics

Memory window


Menus

File menu

Edit menu

Search menu

View menu

C++ menu

Execute menu

Options menu

Window menu

Help menu


Modifying a Register's Value
To modify a register's value:

1.	Select a register mode from the Register sub-menu on the View menu. The registers for that mode are displayed in a Registers window.

2.	Double-click on the register to be modified.

3.	Type in the new value for the register.

4.	Click the OK button.

You can also modify the value of a register in the Watch window.

Related topics

Displaying a List of Registers

Registers window

Watch window


Modifying a Variable's Value
To modify a variable's value:

1.	Select Global or Local from the Variables sub-menu on the View menu. A Locals/Globals window is displayed with the currently active variables.

2.	Double-click on the value of the variable in the right-hand pane of the window.

3.	Type in the new value for the variable.

4.	Click the OK button.

You can also change the value of a variable from the Watch window.

Related Topics

Displaying a List of Variables

Locals/Globals window

Watch window


Open channel viewer DLL dialog

Note:	Channel viewers are not supported by ADU.

In ADW, use this dialog to select a channel viewer DLL to be added. Select a channel viewer DLL from the list of files and click the Open button.

Access this dialog by selecting: Options menu ® Configure Debugger option ® Target tab ® Remote_A target environment ® Enabled checkbox ® Add button.

Related Topics

Selecting a Channel Viewer


Options menu

The Options menu offers the following functions:

Set RDI Log Level	Display the RDI Log Level dialog.
Add Search Path	Add a source file search path.
Set Command Line Args	Specify command-line arguments for your image, to be used the next time you reload the image.
Change Default Display Formats	Change the default display format for a specified variable type.
Change Display Format	Change display format for the current window.
Disassembly Mode	Specify a Disassembly Mode.
Toggle Interleaving	Toggle between displaying C source only and C source interleaved with disassembled code.
Change Text Font	Change the ARM Debugger font (all windows are changed).
Profiling	Display the Profiling sub-menu to initiate collection of profiling information, or to write profiling to disk.
Configure Debugger	Display the Debugger Configuration dialog so that you can change the settings for the debugger and the target environment.
Configure EmbeddedICE	Display the EmbeddedICE Configuration dialog (enabled only when a board is attached).


PIE Card
Platform Independent Evaluation board based around an ARM processor. There are currently two types, ARM7 and ARM6.


Profiling sub-menu

Access this menu by selecting Profiling from the Options menu.

Toggle Profiling	Activates or deactivates the collection of flat profiling information to be used by armprof.
Call Graph Profiling	Profiling information collected includes the percentage of time accounted for by calls to all children of each function and the percentage time allocated to calls from different parents.
Clear Collected	Clears the profiling information collected.
Write to File	Writes the collected profiling information to a file.
For more information on the ARM Profiler, see the Toolkit User Guide.

Related Topics

What is Profiling?

Capturing Profiling Information


PutFile Start Address dialog

Use this dialog to save the contents of an area of memory to a file on disk. Specify the source file and the range of memory location in the From address and To fields, and click the OK button.

Accessed by selecting Put File from the File menu.

Related Topics

Saving an Area of Memory to Disk

Copying a File on Disk to Memory


RDI Log Level dialog

Use this dialog to select the information that is displayed in the RDI Log window:

Bit 0	RDI level logging on/off

Bit 1	Device driver logging on/off

The information is presented when needed.

Warning:	The RDI log level is used internally within ARM to assist with debugging. This level should be changed only if you have been requested to do so by ARM.

Accessed by selecting Set RDI Log Level from the Options menu.


RDI Log window

The RDI Log window displays remote debug information, that is, the low-level communication messages between the ARM Debugger and the target processor.

Note:	This facility is not normally enabled, but must be specifically turned on when the RDI is compiled.

Related Topics:

What is the Remote Debug Interface (RDI)?

Displaying Remote Debug Information

RDI Log window menu.


RDI Log window menu

This menu is displayed when you right-click on the RDI Log window.

Clear	Clear the text on display in the RDI Log window.
Save	Save the contents of the RDI Log window to file.
Related Topics

RDI Log window


Recalculating Watches
 To recalculate watches:

Press the Recalculate Watches button. The Watch window is re-initialized to its original state with all structures and classes expanded by one level,

The Recalculate Watches button can also be used if the value of any variable may have been changed by external hardware while the Debugger is not stepping through code.

Related Topics

Watch window


Registers sub-menu

Depending on the processor mode, up to fifteen general-purpose registers are displayed. Use this sub-menu to select the processor mode for register display.

Current Mode	This is the mode the ARM is currently in, that is, any of the modes listed below.
User Mode	Normal program execution mode.
FIQ Mode	Supports a high-speed data transfer or channel process.
IRQ	Used for general-purpose interrupt handling.
SVC	Supervisor mode, a protected mode for the operating system.
Abort	Used to implement virtual memory and/or memory protection.
Undef	Undefined, used to support software emulation of hardware coprocessors.
FP	Display floating-point specific registers.
Coprocessor	Display coprocessor registers.
Related Topics

Displaying a list of registers

Registers window

View menu


Registers window

This window displays the registers corresponding to the mode named at the top of the window, with the contents displayed in the right-hand pane. You can double-click on an item to modify the register's value.

In this window you can:

display the contents of the register memory

display the memory pointed to by the selected register

edit the contents of a register

set, edit or remove a watchpoint on a register.

You can open multiple Register windows at any one time. Right-click in this window to display the Registers window menu.

Related Topics

Displaying a List of Registers

Modifying a Register's Value

Setting or Editing a Complex Watchpoint

Removing a Watchpoint

Displaying a Particular Area of Memory

Registers window menu


Registers window menu

This menu is available from a Registers window when you right-click in the window.

Item- or line-level commands require that you right-click on the item you want to manipulate when you invoke the menu.

Indirect Through Item	Display the contents of the register memory location in a Memory window.
Edit Item Contents	Modify the contents of the selected register.
Toggle Watchpoint	Set a simple watchpoint or remove a watchpoint on the selected register.
Set or Edit Watchpoint	Set or edit a complex watchpoint on the selected register.
Related Topics

Registers window

Memory window


Regular Expression Search dialog

This dialog enables you to search for a regular expression in memory or code.

Accessed by selecting Find from the Search menu.

Related Topics

What is a Regular Expression?

Searching for a Regular Expression


Reloading the Current Image
 To reload the current image:

Select Reload current image from the File menu, or click the Reload Image button on the toolbar.

Note:	You must reload the image after it has been executed. This does not mean that you have to fully load the image again using Load Image from the File menu.


Removing a Breakpoint
 To remove a breakpoint:

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

2.	Select the Delete button from the dialog box that appears.

OR

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 popup menu.

OR

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

2.	Select the Toggle breakpoint button from the toolbar or press the F9 key.

OR

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

2.	Select the breakpoint you wish to remove.

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

OR

1.	To remove ALL breakpoints, click the Delete all breakpoints button from the toolbar.

Related Topics

Displaying a List of All Breakpoints

About Breakpoints

ADW and ADU toolbar


Removing a Source File's Search Path
To remove a source file's search path:

1.	Select Search paths from the View menu. Any existing search paths are displayed in the Search Paths window.

2.	Right-click on the directory you wish to remove from the search path.

3.	Select Remove Path from the Search Paths window menu or press the Delete key.

Related Topics

What is a Search Path?

Search Paths window

Search Paths window menu


Removing a Watchpoint
 To remove a watchpoint:

1.	Select Watchpoints from the View menu to display a list of watchpoints in the Watchpoint window.

2.	Select the watchpoint you wish to remove.

3.	Click the Toggle watchpoint button on the toolbar, or press the Delete key.

OR

1.	Position the cursor on a variable or register containing a watchpoint, and right-click.

2.	Select Toggle Watchpoint from the menu.

Related Topics

Displaying a List of All Watchpoints


Running Execution to the Cursor
 To run execution to the cursor:

1.	Position the cursor in the line where execution should stop.

2.	Select Run to Cursor from the Execute menu, or click the Run to Cursor button.

This executes the code between the current execution and the position of the cursor.


Running your program

About running your program

Executing an image

Running execution to the cursor

Stepping to the next line of code

Stepping out of a function

Stepping in to a function call

Stopping image execution

Reloading the current image


Saving an Area of Memory to Disk
To save an area of memory to a file on disk:

1.	Select Put File from the File menu. The Put file dialog is displayed.

2.	Enter the name of the file where you want to save the information.

3.	Type the source memory as an address location or low-level symbol in the From address and To fields.

4.	Click the Save button.

Note:	The output is saved as a binary data file.

Related Topics

What are Low-level and High-level Symbols?

Copying a File on Disk to Memory

PutFile Start Address Dialog


Search menu

The Search menu offers the following options:

Find	Search for a regular expression.
Find Repeat	Repeat the most recent search.
Goto	Shift display to a specified line of code.


Search Paths window

This window displays the search paths of the image currently being debugged. You can remove a search path from this window.

Right-click on this window to display the Search Paths window menu.

Related Topics

What is a Search Path?

Displaying Source File Search Paths

Adding a Source File Search Path

Search Paths window menu


Search Paths window menu

This menu is displayed when you right-click on a path in the Search Paths window.

Item-level or line-level commands require that you right-click on the item you want to manipulate when you invoke the menu.

Remove Path	Deletes the currently selected search path.
Related Topics

What is a Search Path?

Search Paths window


Searching for a Regular Expression
To search for a regular expression:

1.	Select the window you wish to search through, by clicking anywhere in the window.

2.	Select Find from the Search menu. The Regular Expression Search dialog opens.

3	Type the expression you wish to search for in the Expression field.

4.	Click the OK button.

To repeat the search, select Find Repeat from the Search menu.

Related Topics

What is a Regular Expression?

Execution window

Memory window

Regular Expression Search Dialog


Selecting a channel viewer
To select a channel viewer:

Note:	Channel viewers are not supported by ADU.

In ADW, to select a channel viewer:

1.	Select Configure Debugger from the Options menu.

2.	On the Target tab, select Remote_A.

3.	Click the Configure button. The Angel Remote Configuration dialog is displayed.

4.	Select the Channel Viewer Enabled option. The Add and Delete buttons are activated.

5.	Click the Add button. A list of .DLLs is displayed.

6.	Select the appropriate .DLL and click the Open button.

7.	Click the OK button on both the Angle Remote Configuration dialog and the Debugger Configuration dialog. ADW restarts with an active channel viewer.

Related Topics

Angel Remote Configuration Dialog

Open Channel Viewer DLL Dialog


Set or Edit Breakpoint dialog

Specify the properties of a breakpoint in this dialog:

File	The source file that contains the breakpoint. This field is read-only.
Location	The position of the breakpoint within the source file. This field is read-only.
Expression	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
Count	The program halts when all the breakpoint conditions apply for the nth time.
Breakpoint Size	Set breakpoints to be 32-bit (ARM) or 16-bit (Thumb) size, or allow the debugger to make the appropriate setting. Alternatively, you can choose the default setting.
Accessed by selecting Edit Breakpoint from the Breakpoint window menu or by selecting Set or Edit Breakpoint from the Execute menu.

Related Topics

About Breakpoints

Setting or Editing a Complex Breakpoint on a Line of Code

Setting or Editing a Complex Breakpoint on a Function

Setting a Simple Breakpoint on a Line of Code

Setting a Simple Breakpoint on a Function

Removing a Breakpoint


Set or Edit Watchpoint dialog

Specify the properties of a watchpoint in this dialog:

Item	The variable or register to be watched.
Target Value	The value of the variable or register that causes the program to halt. If this value is not specified, any change in the item's value causes the program to halt, depending on the other watchpoint conditions.
Expression	Any expression that must be true for the program to halt, in addition to any other watchpoint conditions. Use a C-like operator such as: i < 10 i != j i != j + k
Count	The program halts when all the watchpoint conditions apply for the nth time.
Accessed by selecting Edit Watchpoint from the Watchpoint window menu or by selecting Set or Edit Watchpoint from the Execute menu.

Related Topics

About Watchpoints

Setting or Editing a Complex Watchpoint

Setting a Simple Watchpoint

Removing a Watchpoint


Setting a Breakpoint on a Function in a C++ Class
 To set a breakpoint on a function in a C++ class:

1.	Select View Classes from the C++ menu or click the View Classes button. The Class View window is displayed.

2.	Expand the class to display the function by clicking on the [image] symbol.

3.	Right-click over the function where the breakpoint is to be set. A pop-up menu is displayed.

4.	Select Toggle Breakpoint from the Class View window menu. A red dot is displayed next to the function when the breakpoint is set.

Related Topics

Class View window


Setting a Breakpoint on a Statement in a Line
 To set a breakpoint on a statement in a line:

1.	Position the cursor on the statement before the point where execution is to halt.

2.	Click the Toggle breakpoint button.

Related Topics

About Breakpoints

Displaying a List of All Breakpoints

Removing a Breakpoint

Set or Edit Breakpoint Dialog


Setting a Simple Breakpoint on a Function
 To set a simple breakpoint on a function:

1.	Display the list of function names in the Function Names window.

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

Related Topics

Displaying a List of Functions

About Breakpoints

Setting a Breakpoint on a Function in a C++ Class


Setting a Simple Breakpoint on a Line of Code
 To set a simple breakpoint on a line of code:

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

2.	Press OK in the dialog box that appears.

OR

1.	Position the cursor in the line where the breakpoint is to be placed.

2	Select Toggle Breakpoint from the Execute menu, or click the Toggle breakpoint button, or press the F9 key.

A new breakpoint is displayed as a red marker in the left-hand pane of the Execution window, the Disassembly window or the Source File window. If the line where the breakpoint is set contains several functions, the breakpoint is set on the function that you clicked on in step 1.

Related Topics

About Breakpoints

Displaying a List of All Breakpoints

Removing a Breakpoint


Setting a Simple Watchpoint
 To set a simple watchpoint:

1.	Select the variable, area of memory or register you want to watch.

2.	Select Toggle Watchpoint from the Execute menu.

OR

Select the Toggle Watchpoint option from the window's menu.

OR

Click the Toggle watchpoint button.

Related Topics

About Watchpoints


Setting or Editing a Complex Breakpoint on a Function
To set or edit a complex breakpoint on a function:

1.	Display a list of function names in the Function Names window.

2.	Select Set or Edit Breakpoint from the Function Names window menu.

3.	The Set or Edit Breakpoint dialog is displayed. Enter or edit the details of the breakpoint.

4.	Click the OK button.

Related Topics

About Breakpoints

Displaying a List of Functions

Set or Edit Breakpoint Dialog

Setting a Breakpoint on a Function in a C++ Class


Setting or Editing a Complex Breakpoint on a Line of Code
To set or edit a complex breakpoint on a line of code:

1.	Position the cursor on the line that is to contain the breakpoint.

2.	Display the Set or Edit Breakpoint dialog by:

double-clicking on the line where you want to set a breakpoint or on the existing breakpoint position.

OR

selecting the Set or Edit Breakpoint option from the window's menu.

3.	Enter or edit the details of the breakpoint.

4.	Click the OK button.

The breakpoint is displayed as a red marker in the left-hand pane of the Execution, Source File or Disassembly window. If the line where the breakpoint is set contains several functions, the breakpoint is set on the function where the cursor was positioned, in step 1.

Related Topics

About Breakpoints

Displaying a List of All Breakpoints

Removing a Breakpoint

Set or Edit Breakpoint Dialog


Setting or Editing a Complex Watchpoint
To set or edit a complex watchpoint:

SETTING

1.	Select the variable or register you wish to watch.

2.	Select Set or Edit Watchpoint from the Execute menu.

3.	Specify the details of the watchpoint on the resulting Set or Edit Watchpoint dialog.

4.	Click the OK button.

EDITING

1.	Display current watchpoints by selecting Watchpoints from the View menu.

2.	Double-click the watchpoint you wish to edit.

3.	Modify the details of the watchpoint as required.

4.	Click the OK button.

Related Topics

About Watchpoints

Displaying a List of All Watchpoints

Set or Edit Watchpoint Dialog


Source File window

Displays the contents of the source file named at the top of the window. The line number is displayed in the left-hand pane, the code is in the right-hand pane.

In the Source File window you can:

search for a line of code by line number

set, edit or remove breakpoints on a line of code

toggle the interleaving of source and disassembly.

Right-click in the Source File window to display the Source File window menu.

Related Topics

Displaying a List of the Current Program's Source Files

Setting or Editing a Complex Breakpoint on a Line of Code

Removing a Breakpoint

Displaying the Value of a Variable

Going To a Line of Code

Displaying a Source File

Source File window menu


Source File window menu

This menu is available from the Source File window when you right-click in the window.

Item-level or line-level commands require that you right-click on the item you want to manipulate when you invoke the menu.

Goto line	Jump to an area of code.
Toggle Breakpoint	Set a simple breakpoint or remove a breakpoint.
Set or Edit Breakpoint	Set or edit a complex breakpoint.
Related Topics

Source File window


Source Files List window

The Source Files List window displays a list of all source files that are part of the loaded image. From this window you can select a source file to be displayed in its own Source File window.

Right-click on an item in this window to display the Source Files List window menu.

Related Topics

Displaying a List of the Current Program's Source Files

Displaying a Source File

Source Files List window menu


Source Files List window menu

This menu is displayed when you right-click on the file you want to open in the Source Files List window.

Open File	Display the selected source file.
Related Topics

Source Files List window


Source files

Displaying a list of the source files of the current program

Displaying a source file

Displaying source file search paths

Adding a source file search path

Removing the search path of a source file


Specifying Command-Line Arguments for Your Program
To specify command-line arguments for your program:

1.	Select Set Command Line Args from the Options menu. The Command Line Arguments dialog is displayed.

2.	Enter the command-line arguments for your program.

3.	Click the OK button.

Note:	You can also specify command-line arguments when you load your program in the Load Image dialog.

Related Topics

Executing an Image

Load Image Dialog

Command Line Arguments Dialog


Specifying a Disassembly Mode

The ARM Debugger tries to interpret whether disassembled code is ARM code or Thumb code, but sometimes this is not possible, for example, if you have copied the contents of a file on disk to memory.

To specify the type of code (ARM, Thumb or both) you want to see when you display disassembled code in the Execution window:

Select Disassembly mode from the Options menu.

OR

Select Disassembly mode from the Execution window menu.

Related Topics

What is Disassembled Code?

Displaying or Hiding Disassembled Code

What is ARM Code?

What is Thumb Code?

Copying a File on Disk to Memory


Starting the Debugger
 To start the ARM Debugger:

Start the ARM Debugger for Windows in any of the following ways:

from ARM Project Manager (APM), click the ARM Debugger button

under Windows 95/NT4, select ARM Debugger for Windows from the ARM SDT V2.50 Program folder on the Start menu

under Windows NT3.51, double-click on the ARM Debugger icon in the ARM SDT V2.50 Program group

on a DOS command line, type the full path name of the debugger, for example, c:\opt\arm\adw, optionally with arguments

on a DOS command line, move to the directory containing the debugger and type its name, for example adw, optionally with arguments.

Start the ARM Debugger for UNIX in any of the following ways:

type the full path name of the debugger, for example, /opt/arm/adu, optionally with arguments

move to the directory containing the debugger and type its name, for example, ./adu, optionally with arguments.

When ADW or ADU starts, the Console, Command, and Execution windows are displayed.

Related Topics

Getting started

Closing ARM Debugger

Console window

Command window

Execution window

Debug using a command line


Status Bar

The Status Bar is displayed at the bottom of the main ARM Debugger window. It displays current status information or describes the user interface component (such as a menu option) currently selected.

To display or hide the Status Bar, select Status Bar from the View menu.


Stepping In To a Function Call
 To step into a function call:

Select Step In from the Execute menu.

OR

Select Step In from the Execution window menu.

OR

Click the Step In button.

The program moves to the next line of code. If the code is in a called function, the function source is displayed in the Execution window, and the current code line is highlighted.


Stepping Out of a Function
 To step out of a function:

Select Step Out from the Execution window menu.

OR

Select Step Out from the Execute menu.

OR

Click the Step Out button.

The program completes execution of the function and halts at the line immediately following the function call.


Stepping to the Next Line of Code
 To step to the next line of code:

Select Step from the Execute menu.

OR

Select Step from the Execution window menu.

OR

Click the Step button.

The program moves to the next line of highlighted code in the Execution window.

If only C code is displayed, Step moves to the next line of C. If disassembled code is shown (possibly interleaved with C source), Step moves to the next line of disassembled code.


Stopping Image Execution
 To stop image execution:

Select Stop from the Execute menu.

OR

Select Stop from the Execution window menu.

OR

Click the Stop Program button.

A program also stops if:

a breakpoint halts the program.

a watchpoint halts the program.

Related Topics

About Breakpoints

About Watchpoints


THUMB code
Thumb code is the 16-bit Thumb assembly language that can be compiled to run on an ARM microprocessor.

For more information, see What is Thumb Code?


Table of Contents

Introduction

What is ...

Loading your program

Running your program

Breakpoints

Watchpoints

Expressions, variables and registers

Memory

Source files

Displaying information

User interface

ADW/ADU configuration and preferences


To change default type format

Select Change Default Display Formats from the Options menu.

When the variable types are displayed, double-click on the variable type you want to change and type in a new format string.

Alternatively, you can edit the variable format from the Debugger Internals Window.


User interface

Debugger toolbar

Debugger shortcut keys

Debugger status bar

Debugger windows

Debugger menus

Window-specific menus

Dialog boxes


Variable Properties dialog

The Properties Dialog displays basic information for a selected variable.

Accessed by selecting Properties from the Globals or Locals window menu.

Related Topics

Locals/Globals window menu


Variables sub-menu

Access this menu by selecting Variables from the View menu.

Local	Display a list of local variables in the Locals window.
Global	Display a list of global variables in the Globals window.
Expression	Display the value of a single variable in the Expression window.
Immediate Evaluation	Display the value of a variable selected from the Execution or Source File window. The value is displayed in an information box and written to the Command window.
Indirect Through Item	Display the section of memory pointed to by the contents of the variable in a Memory window.
Related Topics

Locals/Globals window

Expression window

Execution window

Source File window

Command window

Memory window

View menu


View Expression dialog

Use this dialog to select a variable or register. The value of the selected item is displayed in an Expression window.

Accessed by selecting Expression from the Variables sub-menu, on the View menu.

Related Topics

Displaying the Value of a Variable

Displaying the Contents of a Register

Expression window

Watch window


View menu

Registers	Display the Registers sub-menu, from which you can select a set of registers to be displayed.
Variables	Display the Variables sub-menu, from which you can select to display local or global variables, or variable values.
Search Paths	Display the Search Paths window, from which you can remove source file search paths.
Source Files	Display the Source Files List window, from which you can select a source file to be displayed.
Function Names	Display a list of function names in the Functions Names window.
Backtrace	Display the backtrace information in the Backtrace window.
Memory	Display a particular area of memory in a Memory window.
Disassembly	Display an area of memory as disassembled code in a Disassembly window.
Low-Level Symbols	Display the image's low-level symbols in the Low-Level Symbols window.
Breakpoints	Display the Breakpoints window, from which you can remove or edit breakpoints.
Watchpoints	Display the Watchpoints window, from which you can remove or edit watchpoints.
Console	Display the Console window, where you can interact with your image.
Command	Display the Command window where you can issue command-line debugger commands.
RDI Protocol Log	Display the RDI Log window.
Debugger Internals	Display the Debugger Internals window.
Status Bar	Toggle display of the Status bar.
Toolbar	Toggle display of the Toolbar.
Mini Toolbar	Toggle display of the Mini Toolbar.


Watch Control dialog

This dialog is used to enter a variable to be displayed in the Watch window.

Accessed by right-clicking in the Watch window and selecting Add Item from the Watch window menu.

Related Topics

Watch window


 Watch window

Use the Watch window to examine the value of expressions you have added to the window. The Watch window provides the same functionality as the existing Locals/Globals, Registers and Expression windows, and provides a C++ interpretation of the data being displayed.

From the Watch window you can:

add/remove variables or registers to the list of expressions to be watched.

change the format of a single variable or of all variables in the window.

change the value of a variable or register.

Notes:	The Watch window is not used to set watchpoints. Select Set or Edit Watchpoint from the Execute menu to set watchpoints.

Evaluation of function pointers and member functions is not available.

Related Topics

Locals/Globals windows

Registers window

Expression window

Displaying an Expression in the Watch window

Watch window menu

Expression Evaluation Guidelines

Set or Edit Watchpoint


Watch window menu

This menu is displayed when you right-click on an item in the Watch window.

Item- or line-level commands require that you right-click on the item you want to manipulate when you invoke the menu.

Delete Item	Remove the variable from the Watch window - displayed when the variable name is selected.
Format Value	Change the format of the variable element - displayed when an element of the variable is selected.
Edit Value	Change the value of the variable element - displayed when an element of the variable is selected.
Add Item	Add an item to the Watch window. The Watch Control dialog is displayed.
Hide Window	Hide the Watch window.
Format Window	Change the format for all variables displayed.
Related Topics

Watch Window

Watch Control Dialog


Watchpoints

About watchpoints

Displaying a list of all watchpoints

Setting a simple watchpoint

Setting or editing a complex watchpoint

Removing a watchpoint


Watchpoints window

The Watchpoints window displays a list of all watchpoints.

From this window you can:

delete a watchpoint

edit a watchpoint.

Right-click in this window to display the Watchpoints window menu.

Related Topics

About Watchpoints

Displaying a List of All Watchpoints

Setting a simple Watchpoint

Removing a Watchpoint

Setting or Editing a Complex Watchpoint

Watchpoints window menu


Watchpoints window menu

This menu is displayed when you right-click on an item in the Watchpoints window.

Delete Watchpoint	Delete the watchpoint currently highlighted.
Edit Watchpoint	Edit the selected watchpoint using the Set or Edit Watchpoint dialog.
Related Topics

About Watchpoints

Set or Edit Watchpoint Dialog

Watchpoints window


Ways of displaying information

Source Files

Displaying a List of the Current Program's Source Files

Displaying a Source File

Displaying Source File Search Paths

Variables and Registers

Displaying a List of Variables

Displaying the Value of a Variable

Displaying a List of Registers

Displaying a List of Low-level Symbols

Breakpoints and Watchpoints

Displaying a List of All Breakpoints

Displaying a List of All Watchpoints

Memory

Saving an Area of Memory to Disk

Copying a File on Disk to Memory

Going to a Memory Address

Program Information

Displaying Backtrace Information

Going to a Line of Code

Displaying a List of Functions

Disassembled Code

Displaying or Hiding Disassembled Code

Displaying an Area of Memory as Disassembled Code

Related Topics

View menu


What is ...

a low-level or high-level symbol?

a regular expression?

ARM code?

backtrace information?

disassembled code?

EmbeddedICE?

profiling?

Angel?

the ARMulator?

the remote debug interface (RDI)?

Thumb code?


What is ARM code?

The ARM assembly language is 32-bit assembly code that can be compiled to run on an ARM microprocessor.

See the Toolkit User Guide  for more information.

Related Topics

What is Thumb Code?

Click here to return.


What is Angel?

Angel is a debug monitor that allows rapid development and debugging of applications running on ARM-based hardware. Angel can debug applications running in either ARM state or Thumb state on target hardware following instructions given by a debugger (such as ADW or ADU) running on the host computer. The Angel Debug Monitor runs alongside the application being debugged on the target platform. See the ARM Software Development Toolkit  documentation for more information.

Related Topics

Angel Remote Configuration dialog

What is remote_a

Click here to return.


What is backtrace information?

When your program has halted (that is, at a breakpoint or watchpoint), backtrace information is displayed in the Backtrace window to give you information about the procedures that are currently active.

The following example shows the backtrace information for a program compiled with debug information and linked with the C library:

#DHRY_2:Proc_6 line 42

#DHRY_1:Proc_1 line 315

#DHRY_1:main line 170

PC = 0x0000eb38 (_main + 0x5e0)

PC = 0x0000ae60 (__entry + 0x34)

Lines 1 to 3:

The first line indicates the function you are currently in. The second line indicates the source code line this function was called from, and similarly the third line indicates the call to the second function.

Lines 4 to 5:

The final line indicates the entry point made by the C library's call into your program, line 4 shows the position of the call into your program's main procedure.

Note:	A simple assembler program compiled without debug information and not linked to a C library would show only the PC values.

Related Topics

Backtrace window

Click here to return.


What is disassembled code?

Disassembled code is the assembler code generated by the disassembly process.

You can display disassembled code in the Execution Window or in the Disassembly Window (select Disassembly from the View menu).

You can also choose the type of disassembled code to display by accessing the Disassembly mode submenu, from the Options menu. ARM code, Thumb code or both can be displayed, depending on the image type of your program.

Related Topics

Disassembly window

Displaying or Hiding Disassembled Code

Specifying a Disassembly Mode

Execution window

Click here to return.


What is EmbeddedICE?

EmbeddedICE is an extension to the architecture of the ARM family of RISC processors, and provides the ability to debug cores that have been deeply embedded into systems. It consists of three parts:

A set of debug extensions to the ARM core.

The EmbeddedICE macrocell, to provide access to the extensions from the outside world.

The EmbeddedICE interface, to provide communication between the EmbeddedICE macrocell and the host computer.

Related Topics

EmbeddedICE Configuration Dialog

Click here to return.


What is profiling?

Profiling enables you to see where most of the processor time is spent within a program, by sampling the PC at time intervals set by the user. This information is then used to build up a picture of the percentage time spent in each procedure. Using armprof on the data generated by armsd, ADW or ADU, you can see where effort can be most effectively spent to make the program more efficient.

Notes:	Currently there is no display of profiling information from within ADW or ADU. You must capture the data using the Profiling functions on the Options menu, then use armprof.

Profiling is supported for ARMulator and Angel.

See the Toolkit User Guide for more information on profiling.

Related Topic

Capturing Profiling Information

Click here to return.


What is Thumb code?

The Thumb assembly language is 16-bit assembly code that can be compiled to run on an ARM microprocessor.

See the Toolkit User Guide  for more information.

Related Topics

What is ARM Code?

Click here to return.


What is a low-level or high-level symbol?

A high-level symbol for a procedure refers to the address of the first instruction that has been generated within the procedure, and is denoted by the function name shown in the Function Names window.

A low-level symbol for a procedure refers to the address that is the target for a branch instruction when execution of the procedure is required.

The low-level and high-level symbols may refer to the same address. Any code between the addresses referred to by the low-level and high-level symbols generally concerns the stack backtrace structure in procedures compiled with APCS variants, or argument lists in other procedures. You can display a list of the low-level symbols in your program in the Low-level Symbols window.

In a regular expression, indicate high-level and low-level symbols as follows:

precede the symbol with @ to indicate a low-level symbol

precede the symbol with ^ to indicate a high-level symbol.

Related Topics

Displaying a List of Low-level Symbols

Saving an Area of Memory to Disk

Copying a File on Disk to Memory

Displaying a Particular Area of Memory

Low-level symbol

High-level symbol

Function Names window

What is a Regular Expression?

Click here to return.


What is a regular expression?

Regular expressions are the notation for specifying and matching strings, similar to arithmetic expressions. A regular expression is either:

a single extended ASCII character (other than the special characters described below).

a regular expression modified by one of the special characters.

You can include low-level symbols or high-level symbols in a regular expression.

The following special characters modify the meaning of the previous regular expression, and do not work if no such regular expression is given.

*	Any number of the preceding regular expressions (including no occurrences): A*B would match B, AB and AAB.
?	Either one copy of the preceding regular expression, or nothing at all: AC?B matches AB and ACB but not ACCB.
+	At least one copy of the regular expression: AC+B matches ACB and ACCB, but not AB.
The following special characters are regular expressions in themselves:
\	Precedes any special character you want to include literally in an expression to form a single regular expression: \* matches a single asterisk (*) and \\ matches a single backslash (\).
()	Allows grouping of characters: (202)* matches 202202202 (as well as nothing at all).
.	Exactly one character. This is different from ? in that the period (.) is a regular expression in itself, so .* matches all, while ?* is invalid. Note that . does not match the end-of-line character.
[ ]	A set of characters, any one of which can appear in the search match: the expression r[23] would match strings r2 and r3.
Note:	Pattern matching is done following the UNIX regexp(%) format, but without the special symbols, ^ and $.

Related Topics

Searching for a Regular Expression

What is a Low-level or High-level Symbol?

Click here to return.


What is a search path?

To view the source for your program image during the debugging session, you must specify the location of the files. A search path points to a directory or set of directories that are used to locate files whose location is not referenced absolutely.

If you use the ARM command-line tools to build your project,  you may need to edit the search paths for your image manually. This depends on the options you chose when you built it.

If the files have been moved since the image was built, the new search paths for these files must be set up in the ARM Debugger, using the Search Paths window.

Related Topics

Displaying Source File Search Paths

Adding a Source File Search Path

Removing a source file's search path

Search Paths window

Click here to return.


What is remote_a
What is remote_a?

Remote_a is a software component that resides on the host system. It converts instructions given by the debugger to ADP messages for communicating with a target debug system.

Related topics

What is Angel

Angel Remote configuration dialog


What is the ARMulator?

The ARMulator is a collection of programs that emulate the instruction sets and architecture of various ARM processors. It is instruction-accurate, meaning that it models the instruction set without regard to the precise timing characteristics of the processor. Therefore, it is well suited to software development and benchmarking. The ARMulator also supports a full ANSI C library to allow complete C programs to run on the emulated system.

The ARMulator:

provides an environment for the development of ARM-targeted software on the supported and PC workstation host systems.

allows benchmarking of ARM-targeted software (though its performance is somewhat slow compared to real hardware).

ARMulator is transparently connected to the armsd to provide a hardware-independent ARM software development environment. Communication takes place via the Remote Debug Interface (RDI).

See the Toolkit User Guide  for more information.

Related Topics

ARMulator Configuration Dialog

Click here to return.


What is the Remote Debug Interface (RDI)?

The Remote Debug Interface (RDI) is a procedural interface between a debugger and a debuggee via a debug monitor or controlling debug agent. RDI gives the ARM debugger core a uniform way to communicate with:

a controlling debug agent or debug monitor linked with the debugger.

a debug agent executing in a separate operating system process.

a debug monitor running on ARM-based hardware accessed via a communication link.

a debug agent controlling an ARM processor via hardware debug support.

See the Toolkit Reference Guide for more information.

Related Topics

RDI Log window

Click here to return.


Window menu

Cascade	Resizes all windows to a common size and arranges them in an overlapped fashion.
Tile	Arranges and resizes the windows to fill the main window without overlapping.
Arrange Icons	Arranges the icons of closed windows.
Select the current open window to display by selecting the window's name from the list at the bottom of the Window menu.


Window-specific menus

Most of the windows displayed by the ARM Debugger have menus that are available by clicking the right mouse button.

Where a line item is to be changed (for example, setting or editing a breakpoint or watchpoint, changing the format of a line, accessing a variable), the following general rule applies:

the mouse pointer must be in the line that is to be changed when you invoke the menu. This is true whether you have selected the item or not.

Related Topics

ARM Debugger's windows


high-level symbol
A high-level symbol for a procedure refers to the address of the code generated by the first statement in the procedure, and is denoted by the function name shown in the Function Names window.

For more information, see What is a Low-level or High-level Symbol?


low-level symbol
A low-level symbol for a procedure refers to its call address, often the first instruction of the stack frame initialization. You can display a list of the low-level symbols in your program in the Low-level Symbols window.

For more information, see:

Low-level symbols window

What is a low-level or high-level symbol?


profiling
Profiling allows the programmer to see where most of the processor time is spent within his code, using armprof.

For more information, see What is Profiling?


regular expressions
Regular expressions are the notation for specifying and matching strings, similar to arithmetic expressions.

For more information, see What is a Regular Expression?


remote debug interface (RDI)
The Remote Debug Interface (RDI) is a procedural interface between a debugger and a debuggee via a debug monitor or controlling debug agent.

For more information, see What is the Remote Debug Interface?


remote_d
The ARM Demon debug monitor (Remote_D) is no longer supported by ARM Debugger for Windows, and is not suppoted by ARM Debugger for UNIX.

Note:	Remote_D has been superseded by the Angel Debug Monitor (Remote_A).

Related Topics

What is Angel

Debugger Configuration - target

ADW/ADU Configuration and Preferences


search path
A search path points to a directory or set of directories that are used to locate files whose location are not referenced absolutely.

For more information, see:

What is a Search Path?

Removing a source file's search path


target environment
The target environment is the final environment that your application is destined for, for example, an ARM microprocessor.


watchpoint
A watchpoint halts a program when a specified register or variable is changed.

For more information, see About Watchpoints.