RealView ® DeveloperSuite AXD and armsd Debuggers Guide

Version 2.2


Table of Contents

Preface
About this book
Intended audience
Using this book
Typographical conventions
Further reading
Feedback
Feedback on the RealView Developer Suite
Feedback on this book
1. AXD
1. About AXD
1.1. Debugger concepts
1.1.1. Debugger
1.1.2. Debug target
1.1.3. Debug agent
1.1.4. Remote debug interface
1.1.5. Single-processor hardware
1.1.6. Multi-processor hardware
1.1.7. Contexts
1.1.8. Scope
1.2. Interfacing with targets
1.2.1. Debugging an ARM application
1.3. Debugging systems
1.3.1. RealView ARMulator ISS
1.3.2. Multi-ICE ®
1.3.3. Angel debug monitor
1.3.4. ARM Agilent Debug Interface
1.4. Online help
1.4.1. Displaying online help
2. Getting Started in AXD
2.1. License-managed software
2.2. Starting and closing AXD
2.2.1. Starting AXD
2.2.2. AXD arguments
2.2.3. Closing AXD
2.3. Debugger target
2.3.1. RealView ARMulator ISS
2.3.2. Multi-ICE unit and target board
2.3.3. Angel or EmbeddedICE
2.4. AXD displays
2.4.1. Views
2.4.2. Viewing structured data
2.4.3. Multiple Document Interface
2.4.4. Docked and floating windows
2.4.5. Tabbed pages
2.4.6. Dialogs
2.5. AXD menus
2.5.1. Menu bar menus
2.5.2. Pop-up menus
2.6. Tool icons, status bar, keys, andcommands
2.6.1. Toolbars
2.6.2. Tooltips
2.6.3. Status bar
2.6.4. Keyboard shortcuts
2.6.5. In-place editing
2.6.6. Command-line interface
3. Working with AXD
3.1. Running a demonstration program
3.2. Setting a breakpoint
3.3. Setting a watchpoint
3.4. Examining the contents of variables
3.4.1. Contents of variables
3.4.2. Addresses and contents of variables
3.5. Examining the contents of registers
3.6. Examining the contents of memory
3.7. Locating and changing memory valuesand verifying changes
4. AXD Facilities
4.1. Stopping and stepping
4.1.1. Breakpoints
4.1.2. Watchpoints
4.1.3. Stepping through a program
4.2. Expressions
4.2.1. Using expressions
4.2.2. Expression rules
4.2.3. Expression examples
4.3. Viewing and editing
4.3.1. Control
4.3.2. Source files
4.3.3. Disassembled code
4.3.4. Registers
4.3.5. Watch
4.3.6. Variables
4.3.7. Memory
4.3.8. Remote debug information
4.3.9. High-level and low-level symbols
4.3.10. Debugger internals
4.3.11. Backtrace
4.3.12. Debug Communications Channel
4.3.13. Semihosting
4.4. Entering addresses
4.5. Persistence
4.6. RealMonitor support
4.7. Data formatting
4.7.1. Hex
4.7.2. Decimal
4.7.3. Octal
4.7.4. Binary
4.7.5. ASCII
4.7.6. Printf...
4.7.7. Floating point
4.7.8. Registers
4.7.9. Q-format
4.7.10. Other
4.8. Profiling
5. AXD Desktop
5.1. Menus, toolbars, and status bar
5.1.1. Menus
5.1.2. Toolbars
5.1.3. Status bar contents
5.2. File menu
5.2.1. Load Image...
5.2.2. Load Debug Symbols...
5.2.3. Reload Current Image
5.2.4. Open File...
5.2.5. Load Memory From File...
5.2.6. Save Memory To File...
5.2.7. Flash Download...
5.2.8. Load Session...
5.2.9. Save Session...
5.2.10. Recent Files
5.2.11. Recent Images
5.2.12. Recent Symbols
5.2.13. Recent Sessions
5.2.14. Unload Current Image
5.2.15. Import Formats...
5.2.16. Exit
5.3. Search menu
5.3.1. Source...
5.3.2. Memory...
5.4. Processor Views menu
5.4.1. Registers processor view
5.4.2. Watch processor view
5.4.3. Variables processor view
5.4.4. Backtrace processorview
5.4.5. Memory processor view
5.4.6. Low Level Symbols processor view
5.4.7. Comms Channel processor view
5.4.8. Console processor view
5.4.9. Disassembly processor view
5.4.10. Source... processorview
5.4.11. Trace processor view
5.5. System Views menu
5.5.1. Control system view
5.5.2. Registers system view
5.5.3. Watch system view
5.5.4. Breakpoints system view
5.5.5. Watchpoints system view
5.5.6. Output system view
5.5.7. Command Line Interface system view
5.5.8. Debugger Internals system view
5.6. Execute menu
5.6.1. Go
5.6.2. Stop
5.6.3. Step In
5.6.4. Step
5.6.5. Step Out
5.6.6. Run To Cursor
5.6.7. Show Execution Context
5.6.8. Toggle Breakpoint
5.6.9. Toggle Watchpoint
5.6.10. Set Watchpoint
5.6.11. Delete All Breakpoints
5.7. Options menu
5.7.1. Disassembly Mode
5.7.2. Configure Interface...
5.7.3. Configure Target...
5.7.4. Configure Processor...
5.7.5. Source Path...
5.7.6. Status Bar display control
5.7.7. Profiling
5.8. Window menu
5.8.1. Cascade
5.8.2. Tile Horizontally
5.8.3. Tile Vertically
5.8.4. Arrange Icons
5.8.5. Refresh All
5.8.6. Timed Refresh
5.8.7. List of relevant windows
5.9. Help menu
5.9.1. Contents
5.9.2. Using Help
5.9.3. Online Books
5.9.4. About AXD
5.9.5. Toolbar icons
6. AXD Command-line Interface
6.1. Command Line Window
6.1.1. As an alternative to the GUI
6.1.2. To automate repetitive tasks
6.1.3. CLI pop-up menu
6.1.4. Command history
6.2. Parameters and prefixes
6.2.1. # parameters
6.2.2. | parameters
6.2.3. @ parameters
6.2.4. + parameters
6.2.5. Other parameters
6.3. Commands with list support
6.4. Predefined command parameters
6.4.1. format
6.4.2. asm
6.4.3. instr
6.4.4. step
6.4.5. memory
6.4.6. scope
6.4.7. toggle
6.5. Definitions
6.6. Commands
6.6.1. addsourcedir
6.6.2. backtrace
6.6.3. break
6.6.4. cclasses
6.6.5. cfunctions
6.6.6. classes
6.6.7. clear
6.6.8. clearbreak
6.6.9. clearstat
6.6.10. clearwatch
6.6.11. comment
6.6.12. context
6.6.13. convariables
6.6.14. cvariables
6.6.15. dbginternals
6.6.16. disassemble
6.6.17. echo
6.6.18. examine
6.6.19. files
6.6.20. fillmem
6.6.21. findstring
6.6.22. findvalue
6.6.23. format
6.6.24. functions
6.6.25. getfile
6.6.26. go
6.6.27. help
6.6.28. images
6.6.29. imgproperties
6.6.30. importformat
6.6.31. let
6.6.32. list
6.6.33. listformat
6.6.34. load
6.6.35. loadbinary
6.6.36. loadsession
6.6.37. loadsymbols
6.6.38. log
6.6.39. lowlevel
6.6.40. memory
6.6.41. obey
6.6.42. parse
6.6.43. print
6.6.44. processors
6.6.45. procproperties
6.6.46. putfile
6.6.47. quitdebugger
6.6.48. readsyms
6.6.49. record
6.6.50. regbanks
6.6.51. registers
6.6.52. reload
6.6.53. run
6.6.54. runmode
6.6.55. runtopos
6.6.56. savebinary
6.6.57. savesession
6.6.58. setaci
6.6.59. setbreakprops
6.6.60. setimgprop
6.6.61. setmem
6.6.62. setpc
6.6.63. setproc
6.6.64. setprocprop
6.6.65. setreg
6.6.66. setsourcedir
6.6.67. setwatch
6.6.68. setwatchprops
6.6.69. source
6.6.70. sourcedir
6.6.71. stackentries
6.6.72. stackin
6.6.73. stackout
6.6.74. statistics
6.6.75. step
6.6.76. stepsize
6.6.77. stop
6.6.78. trace
6.6.79. traceload
6.6.80. type
6.6.81. unbreak
6.6.82. update
6.6.83. unwatch
6.6.84. variables
6.6.85. watch
6.6.86. watchpt
6.6.87. where
PartDivB. armsd
7. About armsd
7.1. About armsd
7.1.1. Selecting a debugger
7.1.2. Automatic command execution on startup
7.2. Command syntax
7.2.1. Command-line options
8. Getting Started in armsd
8.1. Specifying source-level objects
8.1.1. Command syntax conventions
8.1.2. Variable names and context
8.1.3. Program locations
8.1.4. Expressions
8.1.5. Constants
8.2. armsd variables
8.2.1. Summary of armsd variables
8.2.2. Accessing variables
8.2.3. Formatting printed results
8.2.4. Specifying the base for input of integerconstants
8.3. Low-level debugging
8.3.1. Low-level symbols
8.3.2. Predefined symbols
9. Working with armsd
9.1. Groups of armsd commands
9.1.1. Symbols
9.1.2. Controlling execution
9.1.3. Reading and writing memory
9.1.4. Program context
9.1.5. Low-level debugging
9.1.6. Coprocessor support
9.1.7. Profiling commands
9.1.8. Miscellaneous commands
9.1.9. Commands to access the debug communicationschannel
9.1.10. Commands for EmbeddedICE
9.2. Alphabetical list of armsd commands
9.2.1. Names used in syntax descriptions
9.2.2. ! command
9.2.3. | command
9.2.4. alias
9.2.5. arguments
9.2.6. backtrace
9.2.7. break
9.2.8. call
9.2.9. coproc
9.2.10. context
9.2.11. cregisters
9.2.12. cregdef
9.2.13. cwrite
9.2.14. examine
9.2.15. find
9.2.16. fpregisters
9.2.17. go
9.2.18. getfile
9.2.19. help
9.2.20. in
9.2.21. istep
9.2.22. language
9.2.23. let
9.2.24. list
9.2.25. load
9.2.26. localvar
9.2.27. log
9.2.28. lsym
9.2.29. obey
9.2.30. out
9.2.31. pause
9.2.32. print
9.2.33. profclear
9.2.34. profoff
9.2.35. profon
9.2.36. profwrite
9.2.37. putfile
9.2.38. quit
9.2.39. readsyms
9.2.40. registers
9.2.41. reload
9.2.42. step
9.2.43. symbols
9.2.44. type
9.2.45. unbreak
9.2.46. unwatch
9.2.47. variable
9.2.48. watch
9.2.49. where
9.2.50. while
9.3. Accessing the debug communicationschannel
9.3.1. ccin
9.3.2. ccout
9.4. armsd commands for EmbeddedICE
9.4.1. listconfig
9.4.2. loadagent
9.4.3. loadconfig
9.4.4. selectconfig
A. AXD and armsd Commands
A.1. Comparison of commands
A.2. Useful internal variables
B. Coprocessor Registers
B.1. ARM710T processor
B.2. ARM720T processor
B.3. ARM740T processor
B.4. ARM920T Rev 0 processor
B.5. ARM920T Rev 1 processor
B.6. ARM940T Rev 0 processor
B.7. ARM940T Rev 1 processor
B.8. ARM946E-S processor
B.9. ARM966E-S processor
B.10. ARM10200E processor
B.11. ARM1020E processor
B.12. ARM10E processor
B.13. XScale processor
C. Supplementary Display Module Formats
C.1. Predefined formats
C.2. User-defined formats
C.2.1. SDM format guide
C.2.2. SDM format reference
D. Using the Flash Downloader
D.1. About the Flash downloader
D.1.1. Integrator board version
D.1.2. PID board version
D.2. Using the Flash downloader from AXD
D.3. Using the Flash downloader from armsd
D.4. Setting the IP address of a PID board
E. Using the ARM Profiler
E.1. About the ARM profiler
E.2. Profiler command-line options
E.2.1. Example
E.3. Sample output
Glossary

List of Figures

1.1. Debugger-target interface
1.2. A typical debugging set-up
1.3. Help menu
2.1. Selecting a target
3.1. AXD with Disassembly processor view
3.2. Breakpoint set inside loop
3.3. Setting breakpoint details
3.4. Setting a watchpoint
3.5. Examining the contents of variables
3.6. Specifying variables to watch
3.7. Examining contents of registers
3.8. Examining contents of memory
3.9. Searching for a string in memory
3.10. Changing contents of memory
4.1. Example format submenus
4.2. String dialog
5.1. AXD opening screen
5.2. File toolbar
5.3. Search toolbar
5.4. Processor Views toolbar
5.5. System Views toolbar
5.6. Execute toolbar
5.7. Help toolbar
5.8. Status bar
5.9. File menu
5.10. Selecting an image file to load
5.11. Load Debug Symbols dialog
5.12. Selecting a source file to open
5.13. Loading memory from file
5.14. Saving memory contents in a file
5.15. Flash Download dialog
5.16. Load Session dialog
5.17. Save Session dialog
5.18. Search menu
5.19. Searching for a string in a sourcefile
5.20. Searching for a value in memory
5.21. Processor Views menu
5.22. Registers processor view
5.23. Program Status Register dialog
5.24. Enhanced Program Status Registerdialog
5.25. Jazelle Program Status Register dialog
5.26. Registers processor view pop-up menu
5.27. Formats available for displayingregisters
5.28. Default Display Options dialog
5.29. Watch processor view
5.30. Watch processor view pop-up menu
5.31. Add Watch dialog
5.32. Variables processor view
5.33. Variables processor view pop-up menu
5.34. Backtrace processor view
5.35. Backtrace processor view in Jazellestate
5.36. Backtrace processor view pop-up menu
5.37. Backtrace Properties dialog
5.38. Memory processor view
5.39. Memory processor view in Jazellestate
5.40. Memory processor view pop-up menu
5.41. Memory processor view formats
5.42. Memory Properties dialog
5.43. Low Level Symbols processor view
5.44. Low Level Symbols processor viewpop-up menu
5.45. Comms Channel Viewer processor view
5.46. Comms Channel Viewer pop-up menu
5.47. Comms Channel Viewer formats
5.48. Comms Channel Properties dialog
5.49. Console processor view
5.50. Console processor view pop-up menu
5.51. Disassembly processor view
5.52. Disassembly processor view in Jazellestate
5.53. Disassembly processor view pop-upmenu
5.54. Disassembly Mode formats submenu
5.55. Disassembly View Properties dialog
5.56. Source file selection
5.57. Source... processor view
5.58. Source... processor view pop-up menu
5.59. Source View Properties dialog
5.60. System Views menu
5.61. Control system view
5.62. Pop-up menu when a processor is selected
5.63. Processor Properties dialog
5.64. Pop-up menu when an image is selected
5.65. Image Properties dialog
5.66. Pop-up menu when a file is selected
5.67. Pop-up menu when a function is selected
5.68. Function Properties dialog
5.69. Pop-up menu when a variable is selected
5.70. Variable Properties dialog
5.71. Registers system view
5.72. Registers system view pop-up menu
5.73. Watch system view
5.74. Watch system view pop-up menu
5.75. Add Watch dialog
5.76. Default Display Options dialog
5.77. Breakpoints system view
5.78. Breakpoints system view pop-up menu
5.79. Breakpoint Properties dialog
5.80. Watchpoints system view
5.81. Watchpoints system view pop-up menu
5.82. Watchpoint Properties dialog
5.83. Output system view
5.84. Output system view pop-up menu
5.85. Command Line Interface system view
5.86. CLI system view pop-up menu
5.87. Command Line Interface Propertiesdialog, General tab
5.88. Command Line Interface Propertiesdialog, Format tab
5.89. Command Line Interface Propertiesdialog, Files tab
5.90. Debugger Internals, Internal Variables
5.91. Internal Variables pop-up menu
5.92. Debugger Internals, von Neumann corestatistics
5.93. Debugger Internals, Harvard corestatistics
5.94. Statistics pop-up menu
5.95. Execute menu
5.96. Find Source dialog
5.97. Options menu
5.98. Configure Interface, General tab
5.99. Configure Interface, Views tab
5.100. Configure Interface, Formatting tab
5.101. Configure Interface, Session Filetab
5.102. Configure Interface, Toolbars tab
5.103. Configure Interface, Timed Refreshtab
5.104. Choose Target dialog
5.105. RealView ARMulator ISS Configurationdialog
5.106. Configuration of Remote_A connection
5.107. Serial connection configuration
5.108. Serial/parallel connection configuration
5.109. Ethernet connection configuration
5.110. Processor Properties dialog
5.111. Set Source Path dialog
5.112. Profiling submenu
5.113. Window menu
5.114. Help menu
D.1. Flash DownLoad dialog

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarksowned by ARM Limited. Other brands and names mentioned herein maybe the trademarks of their respective owners.

Neither the whole nor any part of the information containedin, or the product described in, this document may be adapted orreproduced in any material form except with the prior written permissionof the copyright holder.

The product described in this document is subject to continuousdevelopments and improvements. All particulars of the product andits use contained in this document are given by ARM in good faith.However, all warranties implied or expressed, including but notlimited to implied warranties of merchantability, or fitness forpurpose, are excluded.

This document is intended only to assist the reader in theuse of the product. ARM Limited shall not be liable for any lossor damage arising from the use of any information in this document,or any error or omission in such information, or any incorrect useof the product.

ConfidentialityStatus

This document is Non-Confidential. The right to use, copyand disclose this document may be subject to license restrictionsin accordance with the terms of the agreement entered into by ARMand the party that ARM delivered this document to.

Product Status

The information in this document is final, that is for a developedproduct.

Revision History
Revision ARMDUI 0066A October 1999 ADS 1.0Release
Revision ARM DUI 0066B March2000 ADS 1.0.1 Release
Revision ARMDUI 0066C November 2000 ADS 1.1Release
Revision ARM DUI 0066D November2001 ADS 1.2 Release
Revision ARMDUI 0066E January 2004 RVDS 2.1Release
Revision ARM DUI 0066F December2004 RVDS 2.2 Release
Copyright © 1999-2004 ARM Limited. All rights reserved. ARM DUI 0066F
Non-Confidential