ARM® DS-5™ Using the Debugger

Version 5.4


List of Topics

Conventions and feedback
Getting started with the debugger
About the debugger
Debugger concepts
Launching the debugger from Eclipse
Launching the debugger from the command-line console
DS-5 Debug perspective keyboard shortcuts
DS-5 Debugger command-line console keyboard shortcuts
Configuring and connecting to a target
Types of target connections
Configuring a connection to an RTSM model
Configuring a connection to a Linux target using gdbserver
Configuring a connection to a Linux Kernel
Configuring a connection to a bare-metal target
Disconnecting from a target
Controlling execution
About loading an image on to the target
About loading debug information into the debugger
Running an image
About breakpoints and watchpoints
Setting an execution breakpoint
Setting a data watchpoint
Setting a conditional breakpoint
Settinga breakpoint on a specific thread
Pending breakpoints and watchpoints
Stepping through an application
Handling Unix signals
Handling processor exceptions
Configuring the debugger path substitution rules
Examining the target
Examining the target execution environment
Examining the call stack
About trace support in DS-5
Debugging embedded systems
About debugging multi-threaded applications
About debugging shared libraries
About debugging Linux kernel modules
Debugging with command scripts
Creating a debugger script file
Running a debugger script file in Eclipse
Controlling runtime messages
About semihosting and top of memory
Working with semihosting
Enabling automatic semihosting support in the debugger
Controlling semihosting messages using the command-line console
Controlling the output of logging messages
About Log4j configuration files
Customizing the output of logging messages from the debugger
Reading and writing to flash memory
Registering a new flash algorithm
Writing an image to flash memory
Working with the Snapshot Viewer
Creating a Snapshot Viewer initialization file
About the Snapshot Viewer
Connecting to the Snapshot Viewer
Considerations when creating debugger scripts for the Snapshot Viewer
DS-5 Debug perspective and views
App Console view
ARM Asm Info view
ARM assembler editor
Breakpoints view
C/C++ editor
Commands view
Debug Control view
Disassembly view
Expressions view
History view
Memory view
Modules view
Registers view
Screen view
Scripts view
Target view
Trace view
Variables view
Export trace report dialog box
Breakpoint properties dialog box
Watchpoint properties dialog box
Manage Signals dialog box
Debug Configurations - Connection tab
Debug Configurations - Files tab
Debug Configurations - Debugger tab
Debug Configurations - Arguments tab
Debug Configurations - Environment tab
DS-5 Debugger menu and toolbar icons
Troubleshooting
ARM Linux problems and solutions
Enabling internal logging from the debugger
Target connection problems and solutions

List of Figures

1. Load File dialog box
2. Load additional debug information dialog box
3. Setting an execution breakpoint
4. Setting a data watchpoint
5. Breakpoint Properties dialog box
6. Setting a breakpoint on a specific thread
7. Debug Control view
8. Managing signal handler settings
9. Manage exception handler settings
10. Source Not Found warning
11. Path Substitution dialog box
12. Edit Substitute Path dialog box
13. Examine the target execution
14. Debug Control view
15. Threading call stacks in the Debug Control view
16. Adding individual shared library files
17. Modifying the shared library search paths
18. History view
19. Scripts view
20. Typical layout between top of memory, stack, and heap
21. Memory map showing flash regions
22. App Console view
23. ARM assembler editor
24. Breakpoints view
25. C/C++ editor
26. Show disassembly for selected source line
27. Commands view
28. Content Assist
29. Debug Control view
30. Disassembly view
31. Expressions view
32. History view
33. Memory view
34. Modules view showing shared libraries
35. Modules view showing an operating system module
36. Registers view
37. Screen view
38. Scripts view
39. Target view
40. Trace view
41. Variables view
42. Breakpoint properties dialog box
43. Watchpoint properties dialog box
44. Managing signal handler settings
45. Manage exception handler settings
46. Connection configuration for a model using VFS
47. File system configuration for an application on a model
48. Debugger configuration to set starting point and search paths
49. Application arguments configuration
50. Setting up target environment variables
51. Environment configuration for a model

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

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

The product described in this document is subject to continuous developments and improvements. All particulars of the product and its 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 of merchantability, or fitness for purpose, are excluded.

This document is intended only to assist the reader in the use of the product. ARM 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.

Where the term ARM is used it means "ARM or any of its subsidiaries as appropriate".

Confidentiality Status

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

Product Status

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

Revision History
Revision AJune 2010First release for DS-5
Revision BSeptember 2010Update for DS-5 version 5.2
Revision CNovember 2010Update for DS-5 version 5.3
Revision DJanuary 2011Update for DS-5 version 5.4
Copyright © 2010, 2011 ARM. All rights reserved.ARM DUI 0446D
Non-ConfidentialID011411