TOC PREV NEXT INDEX DOC LIST MASTER INDEX



Debugging

This section contains the following topics:

Cross target debugging is very similar to host debugging. Most commands are supported for the cross-target debuggers. However, there are some additional considerations for executing the cross debuggers.


Commands

Several commands are specific to the embedded debugger. These commands are used to download programs, attach to existing programs on the target, and pass commands to the target's controlling agent.

Loading a program

When the cross debugger is invoked, the Auto Load Program button in the File > Debug dialog is selected by default. The user application is automatically downloaded to the target system.

You can also download a program within the debugger using either the File > Download command or the Download button. Until the executable is downloaded or the debugger is attached to the target via the File > Sync command, the rest of the debugger commands cannot be used.

The File > Download command is described in the Online Reference. The equivalent batch mode command is apex_download. It must be entered from within an Apex shell.

The load command is the equivalent debugger line mode command and is described in Using the Apex Debugger. It can be entered in the debugger window's command pane.

Note: The runtime kernel for cross compilers is a seperate executable and it must be present on the target board before you can execute or debug your program. Click on File > Download in the debugger window to open the dialog box which, by default, has the name of the kernel in it. Click OK or Apply to download the kernel.

Attaching to a Pre-loaded Target

You can debug a program already present on the target board without reloading. The File > Sync command in the debugger is used to synchronize the debugger with the current state of the target processor and the controlling agent. This command causes the debugger to establish its current state based on information from the target. The debugger assimilates the current target state in the same way as it does when a program hits a breakpoint. It reads up the value of the program counter and other registers, for example, to determine the current execution position.

If the state of the target changes while the program is being debugged, File > Sync can be used to force the debugger to flush its cached information about the target and re-establish the debugging context by re-reading the relevant information from the target controlling agent.

Because Auto Load Program is the default within the File > Debug dialog, the button will need to be deselected before starting the debugger.

The File > Sync command is described in the Online Reference. The sync command is the equivalent line mode command that can be entered through the debugger window's command pane. It is described in Using the Apex Debugger.


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2002, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS