4 USING CROSSVIEW PRO

This chapter contains the following sections:

Introduction
Using the CrossView Pro Interface
Starting CrossView Pro
Startup Options
What You May Have Done Wrong
The CrossView Pro Desktop
Menus
Local Popup Menus
Window Operation
Dialog Boxes
Customizing CrossView Pro
CrossView Pro Messages
CrossView Pro Windows
Command Window
Source Window
Register Window
Memory Window
Data Window
Stack Window
Trace Window
Terminal Window
Data Analysis Window

Pop-Up Windows
Control Operations for CrossView Pro
Echoing Commandsg
Mouse/Menu/Command Equivalents
Using the On-Line Help System
Accessing On-line Help
Using MS-Windows Help

4.1 Introduction

This chapter and the following 8 chapters give you a comprehensive picture of CrossView Pro's features. In order to address the broadest range of expertise, the contents range from introductory examples to the more technical aspects and techniques of debugging with CrossView Pro. While it is not necessary for you to read the chapters straight through, you may find it especially helpful to do so. All of the examples are from the sample program demo.c which comes with CrossView Pro. For a complete description of the commands presented in this chapter, consult the Command Reference chapter.

Each CrossView Pro command introduced in the text has a matching box summarizing its syntax and semantics. The command description follows these general rules:

Items in bold font are the actual CrossView Pro commands: save, set. Items in italics are names for the things you should type: filename, commands. In addition, the | symbol means or. For instance, screen | filename means you can use the word "screen" or a filename in the syntax.

4.2 Using the CrossView Pro Interface

This manual uses the word "Windows" to generically refer to the host computer system's windowing system. On IBM-PCs and compatibles, this is equivalent to Microsoft Windows (95/98/Me, NT or 2000). On UNIX workstations, this refers to the X Window System. Generally, this manual makes no distinctions between the various windowing systems unless needed to clarify the discussion.

This manual assumes you possess a basic familiarity with Windows software. For this reason, discussion focuses on how CrossView Pro works, rather than how to use the Window interface. For more information on your Windows system, consult the Windows documentation provided with your host system.

You can execute most CrossView Pro commands using either mouse or textual commands. Mouse commands are executed by means of buttons and pull-down menus in each of the separate CrossView Pro windows. Text commands are typed at the prompt in the Command Window. In most cases, there is no difference in functionality between mouse and text equivalents.

This manual discusses both methods of performing CrossView Pro functions. For a quick-reference guide to all CrossView Pro commands, refer to the Command Reference chapter.

4.3 Starting CrossView Pro

Once an absolute file has been made it can be executed by CrossView Pro. There are several ways to invoke CrossView Pro.

From EDE

To start CrossView Pro from EDE (the Embedded Development Environment), click on the Debug application button. The following button is the Debug application button which is located in the toolbar.

From the desktop

With MS-Windows you can start CrossView Pro through the Start menu. Or in the Windows Explorer you can double-click on an absolute file if the .elf extension is associated with the CrossView Pro executable.

On the PC, CrossView Pro is a Microsoft Windows application. As such, you must invoke it from the Windows environment.

From the command line

To begin the debugging session, type the name of the CrossView Pro debugger and optionally the name of the target program (absolute file).

4.4 Startup Options

CrossView Pro allows you to specify several options when you invoke the program. Type these startup options (or switches as they are sometimes called) after the optional basename of the application. The basename can also contain a path specification. In this case, CrossView Pro sets its current directory to the specified path. A minus sign proceeds each option; the options can appear in any order.

Note that some versions of CrossView Pro have different startup options and procedures than the ones described here. Please consult the Addendum (at the end of this manual), for precise information about starting up CrossView Pro with your target hardware.

From EDE

You can select the execution environment, setup communication parameters, specify record and playback files and set some maximum values via the Project | CrossView Pro Options... menu item.

From CrossView Pro

You can set many of CrossView Pro's options by using the dialog boxes called by the Target | Settings... and File | Options... menu items from the menu. You can save the options in the xvw.ini file and they are automatically used upon startup.

In Windows 95/98/XP, Windows NT 4.0 or Windows 2000 (or higher), add startup options to the program's property sheet:

Use menus to set options. After setting the options in the menus and selecting the appropriate options in the Save Options dialog on exit, CrossView Pro saves the settings in the file xvw.ini for future debug sessions.

To start up CrossView Pro type:

When your execution environment itself has a human-oriented ASCII interface, you can use transparency mode with the -T option. In transparency mode you can configure the execution environment's memory. Check the Addendum, the hardware-specific section of this manual. In-circuit emulators generally require you to map the address space, allocating memory ranges to the execution environment and/or the target system. Fortunately, this generally does not mean you need to learn your emulator's command set, just a rote sequence of startup commands. When your CrossView Pro version does not support transparency mode, you do not need to configure the memory, and the -T option is not needed.

If your target system supports serial communication and if the target system is connected to a port other than the default port (see the Overview chapter to determine the default port for your host), you can use the -D option to specify the port name. The default baud rate is 9600. You may use the -D option to specify the baud rate if the execution environment is not the same as the default. For example:

instructs CrossView Pro to use the COM2 port at 19200 baud. See your execution environment in the Addendum of this manual for specific communication information.

When you specify a startup option in CrossView Pro, the option overrules the corresponding value in the current xvw.ini file.

There are many different options you can invoke when starting up CrossView Pro. The listing below gives an overview of all startup options.

There are several startup options having to do with the recording and playing back of CrossView Pro command files. See also chapter 9, Command Recording & Playback.

Startup Option Description
-a number Sets the maximum number of assertions (the default is 100).
-b number Sets the maximum number of code breakpoints (the default is 200).
-c number Sets the maximum number of instruction trace for the trace buffer (the default is 32).
-C cpu Forces CPU type selection. This option also determines which register file (regcpu.def) will be used. This option overrules the CPU type selection in xvw.ini.
-D device_type,opt1[,opt2] Selects a device and specifies device specific options, such as communication port and baud rate. The allowed combinations for your execution environment are described in the manual addendum for that specific execution environment. The following combinations are possible:
-D rs232,port,speed Select RS-232 communication. port For PC this is COM1, COM2, COM3 or COM4. A colon should not be added. For UNIX this is the full path of the RS-232 device driver (e.g., /dev/tty01). By default CrossView Pro uses the first RS-232 port. speed This is the baud rate used for the specified port. The default is 9600.
-D parallel,port Select parallel communication. port For PC this is LPT1 or LPT2. Do not add a colon. For UNIX this is the full path of the parallel device driver. By default CrossView Pro uses the first parallel port.
-D tcp,host,port Select TCP/IP communication. On UNIX the standard TCP/IP implementation is used. On MS-Windows the WINSOCK.DLL implementation is used. host The name of the host to be accessed via TCP/IP. port The port number on host to be accessed.
-D dev,device-file Use a UNIX device driver as communication channel. For RS-232 devices use the -D rs232 option, described above. device-file
The full path of the UNIX device file.
-D isa,io-port,address Select communication channel to an (E)ISA interface card in the PC. io-port
PC I/O port number or I/O channel used for accessing the (E)ISA card. address
The memory address used to access the (E)ISA card.
-f file Read command line options from file.
--fss_root_dir="path" Specify root directory for File System Simulation.
-G path Specify startup directory for CrossView Pro.
-i Has CrossView Pro download the image of the absolute object file.
-L file Keeps a log of CrossView-to-target communications in a file. Not available for all execution environments.
-n address Informs CrossView Pro that the program was loaded into memory at an address other than zero.
-p file Starts playing back commands from file.
-P file Starts playing back commands from file with commands single step.
-r file Starts recording commands in file.
-R file Starts recording screen output in file.
-s number Sets the maximum number of special variables (variables independent of the program that CrossView Pro provides for your use). The default is 26.
-sd directory [;directory]... Specifies the directories CrossView Pro should search for source files. Relative paths are allowed. When the N command is used to load a new symbol file, the current directory is set to the directory containing the symbol file and CrossView Pro now searches for source files relative to this directory. Directories must be separated by semicolons.
--sync_on_halt[=on|off ] Turn synchronization (DSYNC and ISYNC instructions) on or off when CrossView Pro halts execution. When you use profiling or want accurate cycle counting (for example with single stepping), turn off the synchronization instructions. The default is on.
-tcfg file Specify a target configuration file. This overrules the filename specified in xvw.ini. See section CrossView Pro Target Settings in the Overview chapter.
--timeout=n_seconds Start CrossView Pro command line batch operation mode and terminate after n_seconds.
-T [file] Starts CrossView in transparency mode if present; if file is given, commands in file are sent to the execution environment.

Table 4-1: CrossView Pro Startup Options

4.4.1 What You May Have Done Wrong

Most problems in starting up CrossView Pro for a debugging session stem from improperly setting up the execution environment or from an improper connection between the host computer and the execution environment. Some execution environments require you to enter transparency mode to set the execution environment for a debugging session. Check the notes for your particular execution environment and the Addendum of this manual.

Here are some other common problems:

4.5 The CrossView Pro Desktop

The CrossView Pro desktop is the screen background in which all windows, icons and dialog boxes appear (see figure 4-1). Under some windowing systems, the desktop is itself a window that does not contain all other CrossView Pro windows.

The desktop always has the Command Window opened or iconized.

Figure 4-1: CrossView Pro Desktop

At the top of the desktop is the Menu Bar, which contains the menus applicable to the currently active window. Below the menu bar is the main Toolbar, from which you can execute commands to control program execution as button functions. Except for the Command Window, the desktop can contain other windows as well.

Along the bottom of the desktop there is a Main Status Bar. The status bar displays messages such as short "help messages" when you move the cursor over any button in any CrossView Pro window.

Menus

Each CrossView Pro window may have a menu associated with it. Under Microsoft Windows, the active window's menu is displayed in the menu bar of the desktop.

Depending on your execution environment some menu items are always grayed out. For example, Communication Setup is grayed out if your target is an instruction set simulator.

Windows

The debugger supports two types of windows: primary windows and dialog boxes. Dialog boxes are the windows you access from a primary window. For the remainder of this manual, the term "window" denotes a primary window.

This manual also uses the term pop-up window. A pop-up window is a primary window that contains supplemental information such as on-line help.

CrossView Pro Windows are used to display information and to get user input through either buttons, commands typed in input fields, or menu selections. Windows may be moved around the desktop, sized, or iconized. All windows can be opened from the View menu. The section on CrossView Pro Windows provides more detail about each window.

A window is considered opened even if it is iconized (under Microsoft Windows, this is called minimized). A window is considered closed if it does not exist on the desktop in any form.

Dialog Boxes

Certain menu items or push buttons may call up a dialog box to complete an action, display information, or get additional data. No other actions can be performed until the dialog box is closed.

4.5.1 Menus

Each window in CrossView Pro uses the menu as shown in figure 4-2. The method of selection of a menu item varies depending on the windowing system being used. See your Windowing System's manual for details of how to do this.

Each window has a hidden control menu (the icon on the top-left of the window), to manipulate the window. The menu Close command in the control menu closes the current window. Your implementation of the windowing system may have additional features. See your documentation for further details.

Figure 4-2: CrossView Pro Menus

4.5.1.1 Local Popup Menus

On MS-Windows environments CrossView Pro supports local popup menus. Local popup menus are invoked by clicking the right mouse button. The menu contents is context sensitive. If the mouse pointer is on top of the global (main) toolbar the Configure Toolbar dialog is shown. If the mouse pointer is located in the MDI window (task window or background) the View Menu is shown which allows you to open new windows.

Within the Source Window four different local popup menus may appear. If the cursor is within the display area of the window the Run Menu is shown. The Run Menu contains commands associated with program execution. If your cursor is at a breakpoint indicator, the Breakpoints dialog is shown. If the cursor is on a code coverage marker then the local popup menu contains commands to move the cursor to the next or previous block of (not)covered statements. If your cursor is in the profile column you can change the format of the timing figures. All other windows have their own local popup menu. The exception to the rule is the command window which does not have a local popup. See figure 4-3 for an example of the local popup menu of the Memory Window.

Figure 4-3: CrossView Pro Local Popup Menu (Memory Window)

4.5.2 Window Operation

Windows can be opened, made active, and closed.

Opening Windows

The View menu of the menu bar lists all windows. Selecting a window name from this list causes the window to open up. Selecting a window that is already open brings that window to the front.

Selecting a Window

At any one time, a particular window is active. Most operations act (by default) on the active window. The active window is distinguished by highlighting the title bar. Only one window may be active at a time. There are several ways to select a window (that is, make a window active).

Closing a Window

Windows are closed by selecting the Control | Close menu item, or by clicking a Close button, as shown in figure 4-4. Selecting this item from the Command Window will exit CrossView Pro.

Figure 4-4: Closing a Window

4.5.3 Dialog Boxes

The debugger uses dialog boxes to acquire information needed to complete a requested operation. The debugger also uses dialog boxes to display information. If a button or menu item displays an ellipsis (...) after its name, then there is an associated dialog box.

For example, the dialog box shown in figure 4-5 searches for a string. This dialog box uses a list edit field to enter a search string, radio buttons to select the search direction, a check box to specify case sensitivity and push buttons to allow certain functions to be performed.

Figure 4-5: Dialog Box

4.5.4 Customizing CrossView Pro

You can customize CrossView Pro's visual appearance and operative parameters to best suit your debugging environment.

Changing the Visual Appearance

Windows can be organized by resizing and moving them around the desktop (see your Windowing System's manual for details on how to do this). All windows under Microsoft Windows have an additional Window menu item. This menu allows the user to arrange all opened windows in a tiled or cascaded format. In the tiled format, selected by Window | Tile, all windows become the same size. All windows are the visible, the same size and do not overlap. In the cascaded format, selected by Window | Cascade, all open windows are changed to the same size and overlapped in a cascade with a constant vertical and horizontal offset. Iconized (minimized) windows can be automatically rearranged by selecting Window | Arrange Icons from the Window menu.

See the section Using X Resources in the chapter Software Installation for details on changing the visual appearance of CrossView Pro under X Windows.

Changing Operative Parameters

You can adjust the operative parameters for CrossView Pro using the various menus in CrossView Pro.

In the Target menu you will find:

In the File | Options... menu you will find:

In the Tools menu you will find:

In the Data menu you will find:

In the Settings menu you will find:

Saving Changes on Exit

If you find yourself using a particular configuration, you may want to save your configuration when you exit CrossView Pro:

CrossView Pro exits. If you selected one or more items in the Save tab of the Options dialog your settings are saved in the initialization file xvw.ini. This file is in the startup directory.

4.5.5 CrossView Pro Messages

CrossView Pro communicates with you in a variety of ways. The command window displays the results of commands. Important messages, such as errors, appear in dialog boxes that pop up.

4.6 CrossView Pro Windows

The two prominent windows used in CrossView Pro are the Command Window and the Source Window. From the Command Window you can type CrossView Pro and emulator commands, and gain access to all other windows. You can accomplish most global operations from either the menu bar or the Command Window. Only from the Command Window can you accomplish Single step playback. When you close the Command Window, you exit CrossView Pro.

The Source Window focuses on the program being debugged. This window controls most of the commonly-used execution operations, such as breakpoints and searching functions.

Available Windows

You can open all CrossView Pro windows (except for the Data Analysis windows) from the View menu by selecting the name of the window. Selecting a window in this case brings the window to front and makes it the active window. Available windows are:

Improving CrossView Pro Performance

CrossView Pro updates every window that is open (except for the Data Analysis windows), even if it is iconized (minimized). Keeping a window up to date usually involves extra communication with the emulator, slowing CrossView Pro down. For instance, if the Register Window is open, CrossView Pro asks the emulator to dump the contents of all displayed registers after each single step. Thus it is a good idea to keep only those windows open that you need.

4.6.1 Command Window

The Command Window allows you to:

From the View menu you can specify if you want the Command Window to be a CrossView Pro Command Window or an Emulator Command Window. This way you can specify whether CrossView Pro interprets commands or they go directly to the emulator.

Figure 4-6. shows the Command Window. You can type commands into the command edit field (bottom field) or select them from the command history list (middle field), edit and execute them. The command history field displays previously entered commands. You can select and execute one or more commands. The command history list provides you with a clear, comfortable way to re-execute specific commands or sequences of commands by preserving them in a scrollable list.

You can switch between the history list and the command edit field by hitting the <Tab> key. Hitting the <Esc> key (escape) returns you to an empty edit field.

The top field is the Command Output Window or the Emulator Output Window, depending on the type of Command Window you choose. Each command, echoed from the command edit field, appears with a '>' prefix. CrossView Pro displays its response (or the emulator's response if the window is an Emulator Command Window) to the command immediately following the command.

Figure 4-6: CrossView Pro Command Window

The Command Window also has two push buttons that provide rapid access to frequently used actions. The Execute button executes the current command (or sequence of commands if more than one command is selected). Note that the <Enter> or <Return> key is equivalent. Use the Halt button to interrupt commands executing in continuous mode, or to stop the emulator.

The Command Window maintains a history of recently executed commands. To re-perform previously executed commands simply double-click on it or select the command(s) from the command history list in the Command Window and press the Execute button. By hitting the <Tab> key, it is also possible to select one or more entries. Hitting <Tab> or <Esc> will return you to the command edit field.

The maximum number of lines saved to the CrossView Pro command buffer list is set during debugger startup. The default is 100 lines. To change the default select Initialization tab in the File | Options... item from the menu. This number can also be modified via a startup option.

4.6.2 Source Window

The Source Window offers most of the debugging functions you will need on a regular basis. It allows you to:

An example of the source window is shown in figure 4-7.

Figure 4-7: CrossView Pro Source Window

You can specify the step mode, symbolic disassembly and source lines / disassembly with the Source Window Setup dialog box (Settings | Source Window Setup...) or with Run | Step Mode. Alteratively, you can use the drop-down menus in the Source Window's status bar.

The default step modes are:

Source lines Window: Source line step
Disassembly Window: Instruction step
Source and Disassembly Window: mode of previous window!
(assumes the step mode of the previous Source Window setting)

The location of the cursor is also the viewing position. The line number and address of the viewing position, appears at the top-left position of the Source Window. This does NOT represent the current execution position ($pc). The current execution position appears in reverse or blue color. The cursor appears as a dotted line.

On MS-Windows the so-called "quick watch" feature is supported. When you position the mouse cursor over a variable or a function, a bubble help box appears showing the value of the variable or the type information of the function respectively.

A green colored toggle shows that no breakpoint is set. A red colored toggle indicates an installed breakpoint. An orange colored toggle indicates an installed but disabled breakpoint. If code coverage is enabled, coverage markers appear to the right of the breakpoint toggles. If a checkmark appears next to a line, it has been executed. If no checkmark appears next to a line, it has not been executed.

The Source Window provides a local Toolbar containing the following buttons, nearly all of which are shortcuts (using selected text) to operations that you can perform via the menu bar:

Stop program or command

Run or continue execution (same as F5)

Run to cursor (same as F7)

Step (over function calls)

Step (into function calls)

Restart application

Find program counter (PC)

Show selected source expression

Watch selected source expression

Find symbol

Search for a text string

Repeat search for text string

Edit current source file

Edit breakpoint at cursor

Display code coverage

Display profiling

You can toggle the appearance of this local toolbar by selecting the View | Local Toolbars | Source menu item.

Edit Source

To edit the current source file in the Source Window, select Edit | Edit Source or press the Edit Source button. On MS-Windows the Codewright editor will be called with the filename and line number of the file that is currently in the debugger. on UNIX systems the xvwedit program will be called with the filename and line number of the file that is currently in the debugger.

The xvwedit program is a shell script. You can adapt it to your specific requirements.

4.6.3 Register Window

Figure 4-8 shows the Register Window. This window allows you to view and edit register contents.

Figure 4-8: CrossView Pro Register Window

Note that the contents of the Register Window for your particular target may be different from the one show in figure 4-8.

You can specify which register set definition appears in the Register Window with the Register Window Setup dialog box (Settings | Register Window Setup...). In this dialog you can also specify the display format of values in the Register Window: hexadecimal or decimal.

CrossView Pro supports multiple Register Windows. Register Windows either have the title "Register" or "Register - register set name". The "Register" title indicates the default register set.

In-situ editing allows you to change the registers contents directly by clicking on the corresponding cell.

4.6.4 Memory Window

The Memory Window is shown in figure 4-9. This window allows you to view and edit the target memory.

Depending on the setting of the Automatically refresh check box in the Memory Window Setup dialog, CrossView Pro updates the displayed values every time the program is stopped or only updates the values by user request. For example, by pressing the Update Memory Window button located on the toolbar.

Figure 4-9: CrossView Pro Memory Window

To edit the target memory, click on a memory cell and type a new value. To display another memory region: click on an address cell and type a new address. CrossView Pro accepts input in symbolic format, so you can enter expressions instead of just values.

CrossView Pro supports multiple instances of the Memory Window. If your target supports multiple memory spaces, the Memory Window supports them all. Refer to the section about memory space keywords to become familiar with the memory space keywords and associated syntax your target system uses.

You can specify the way data appears in the Memory Window by opening the Memory Window Setup dialog. Select Settings | Memory Window Setup... to open this dialog. The memory contents can appear in many formats including ASCII character, hexadecimal, decimal, signed, unsigned, and floating point formats. You can specify the size of the memory window. You specify the number of memory cells that appear within the window. The number of cells is fixed in the sense that if you re-size the window the number of cells does not change.

Besides the current value of memory locations, the Memory Window also displays whether memory locations have been accessed during program execution. This is called 'data coverage'. An application program may read from, write to, or fetch an instruction from a memory location. Of course all combinations may be legal. Although writing data to a memory location from which an instruction has been fetched is suspicious. All types of accesss, read, write, fetch or combinations of these, can be shown using different foreground and background colors. The color combination used to show "rwx" access are specified in the Desktop Setup dialog. Change the background color if instructions are fetched from a memory location, and change the foreground color to show read and write access.

You can display data coverage information in the Memory Window by clicking on the Coverage button in the Memory Window or by setting the Display data/code coverage check box in the Memory Window Setup dialog.

The Memory Window has the ability to highlight memory cells of which the contents have been changed. Click on the Highlight Value Changes button in the Memory Window to see the changed cells. With the Freeze Highlight Reference Values button you can enter a new reference point for highlighting. All the cells that have been changed since that reference point are highlighted.

The Memory Window provides a local Toolbar containing the following buttons:

Fill memory

Fill single memory address

Copy memory

Find memory

Display data coverage

Highlight changed values

Set highlighted values as reference

Refresh memory window

You can toggle the appearance of this local toolbar by selecting the View | Local Toolbars | Memory menu item.

4.6.5 Data Window

The Data Window is shown in figure 4-10. This window allows you to show the value of monitored expressions and variables.

The Data Window updates the values shown every time the program stops, and after an o command.

It is possible to display both monitored and unmonitored data expressions in the Data Window. CrossView Pro monitors and updates "WATCH" expressions after every halt in execution, and marks them with the text "WATCH" at the start of the display line in the Data Window. "SHOW" expressions, on the other hand, are one-shot inspections of an expression's value, and CrossView Pro does not update them until you click on the Update Selected Data Item button or Update Old Data Items button. When a "SHOW" expressions is no longer actual, it is marked with the word "OLD".

Figure 4-10: CrossView Pro Data Window

To set the default display format of the data shown, select the proper format in the Data | Data Display Setup... dialog.

To inspect the value of global variables and data structures, double-click on the variable name in the Source Window. Depending on preferences you set in the Data Display Setup dialog, the variable appears immediately in the Data Window, see figure 4-10, or the Expression Evaluation dialog appears first.

In-situ editing allows you to change the contents of everything in this window by clicking the value you want to change.

If you have set the Display addresses check box in the Data Display Setup dialog box the addresses of the variables are also shown.

Pointers, structures and arrays displayed in the data window have a compact and expanded form. The compact form for a structure is just <struct>, while the expanded form shows all the fields. The compact form of a pointer is the value of the pointer, while the expanded form shows the pointed-to object. Indicate the compact form by putting a '+' at the start of the display. (i.e., the object is expandable), and indicate the expanded form with (i.e., the object is contractible). Nesting is supported, so you can expand structures within structures ad infinitum.

To expand a pointer, structure or an array, double-click on the '+' in the Data Window.

The Data Window provides a local Toolbar containing the following buttons:

Show or watch a new expression

Toggle watch attribute of selected item "on" or "off"

Reformat selected item

Update selected data item

Delete selected data item

Update old data items

Delete old data items

You can toggle the appearance of this local toolbar by selecting the View | Local Toolbars | Data menu item.

The auto-watch locals feature may be activated or deactivated. When active, a selected Data Window becomes the "auto-watch" window, and all local variables from the current top-of-stack frame appear in that Data Window. The text "LOCAL" appears at the start of the display for variables displayed in this manner. As the execution position changes, the auto-watch window deletes and adds locals as necessary, so that the locals on the current top-of stack frame always appear.

To see the value of the local variables of a function, Select View | Data | Watch Locals Window from the menu.

CrossView Pro supports multiple Data Windows. Data Windows either have the title "Data Window #n" or "All Local Variables". The "All Local Variables" title indicates the auto-watch window if it exists (as explained above).

4.6.6 Stack Window

The stack records the return addresses of all functions the application has called, and CrossView Pro can use this information to reconstruct the path to the current execution position. The Stack Window, shown in figure 4-11, displays the function calls on the stack with the values of the parameters passed to them in an easily accessible and understandable form.

The Stack Window can help you assess program execution and allows you to view parameter values. The stack window allows you to:

Figure 4-11: CrossView Pro Stack Window with Toolbar

The Stack Window provides a local Toolbar containing the following buttons:

Set stack breakpoint after call to function

Set stack breakpoint at function entry point

Show local variables in selected stack frame

Watch local variables in selected stack frame

Find call site

You can toggle the appearance of this local toolbar by selecting the View | Local Toolbars | Stack menu item.

4.6.7 Trace Window

The Trace Window, shown in figure 4-12, allows you to:

CrossView Pro automatically updates the Trace Window each time you halt execution, as long as the window is open, allowing you to check the progress and flow of your program throughout the debugging session.

The Trace Window is only supported if your execution environment supports the trace facility.

Figure 4-12: CrossView Pro Trace Window

4.6.8 Terminal Window

The Terminal Windows, shown in figure 4-13, let you observe and test the input and output of your program.

The CrossView Pro Terminal windows provide an interface to exchange data with the application on the target. This I/O facility can be implemented in various ways. Using standard I/O stream function calls like printf() in your source, you can test I/O to and from the target system or simulator.

The File System Simulation feature redirects I/O to a Terminal Window if the filename FSS_window:window_name is used in the "open" call, window_name is the name of a Terminal Window.

A terminal window can be connected to multiple I/O streams of various types. For example, streams 0, 1 and 2 can be mapped to one terminal window. An I/O stream, however, can be mapped to one terminal window only. Each terminal window must have a unique name.

Figure 4-13: CrossView Pro Terminal Windows

You can specify the characteristics of the Terminal Window by opening the Terminal Window Setup dialog. Select Settings | Terminal Window Setup... to open this dialog, or click with the right mouse button in the Terminal Window to bring up a popup menu and select Setup.... You can specify the input and output format of the terminal window. The input format can be a VT100-like terminal. The output format can be a VT100 terminal, display control codes, decimal, octal or hexadecimal. You can map linefeeds to carriage-return linefeeds, wrap at the end of a line, specify buffered input or specify that the window must be cleared at system reset and program reset. You can also log the input and output data to a file.

The default size of a terminal window is 24 lines of 80 characters. Everything that scrolls outside this window is lost. The visual window size can be smaller (scroll-bars are shown). You can specify another size in the Terminal Window Setup dialog.

Each terminal window has a local popup menu, which you can activate by clicking the right mouse button.

Figure 4-14: Terminal Window Local Popup Menu

Reset clears the contents of the terminal window and it also clears all attributes set with escape sequences. A Clear just clears the contents of a terminal window. Reverse changes the foreground and background colors and Local echo enables echoing back of typed characters in a terminal window. Setup... opens the Terminal Window Setup dialog.

You can connect an I/O stream to a terminal window in the Connections tab of the Settings | I/O Simulation Setup... dialog box.

4.6.9 Data Analysis Window

CrossView Pro incorporates an advanced signal analysis interface designed to enable developers to monitor signal data more critically and thoroughly. This feature is useful when developing signal processing software for application areas such as communication, wireless and image processing.

Contrary to the other CrossView Pro windows the Data Analysis window (as shown in figure 4-15) is not opened from the View menu, but is opened as result of processing a data analysis script (or from the Settings menu). Most other CrossView Pro windows are updated whenever the target application stops execution due to, for example, a breakpoint. The Data Analysis window is only updated on user request. This is done because a large set of data is shown in the Data Analysis window and this set of data must be available and complete at the time the window is updated. Therefore, the user normally constructs a complex breakpoint to trigger the update of the Data Analysis window.

Figure 4-15: CrossView Pro Data Analysis Window

The Data Analysis Window provides a local Toolbar containing the following buttons:

Zoom in horizontally

Zoom out horizontally

Unzoom horizontally to normal (show all collected data)

Zoom in vertically

Zoom out vertically

Unzoom vertically to normal (show all collected data)

Update Data Analysis window

The graph displayed in the Data Analysis window is constructed by processing a CXL script. Refer to the CXL syntax specification in section 11.5.2 for details. TASKING provides scripts for standard signal analysis such as FFT. However, the programmer can write CXL scripts and process the data in the format he desires.

See section 11.5 for more details on data analysis.

4.6.10 Pop-Up Windows

Finally, two more windows can appear in certain situations:

Help Window: Activated with function key F1 or when a Help button is pressed inside a dialog.

Toolbox: This window contains user defined buttons.

4.7 Control Operations for CrossView Pro

All control operations can take place in any CrossView Pro Window. You can select and save startup options. You can record and play back playback files. You can define macros and assign them a button in the toolbox (allowing you to configure up 16 buttons).

4.7.1 Echoing Commands

The Command Window echoes every command given to CrossView Pro. CrossView Pro translates most button actions and menu selections into the CrossView Pro keyboard command equivalents. The Command Window echoes the equivalent commands just as if you had typed them there.

4.7.2 Mouse/Menu/Command Equivalents

Actions in CrossView Pro are performed by using keyboard commands typed into the Command Window, selecting a menu item, by clicking on a push button and sometimes by direct manipulation of objects with the mouse. Many actions can be accomplished several ways. For instance there are three different ways to set a breakpoint. You can:

1. Use the line b command in the command entry field.

2. Click on a breakpoint toggle in the Source Window.

3. Select Breakpoints | Breakpoints... menu item to open up the Breakpoints dialog box.

4.8 Using the On-Line Help

CrossView Pro has an extensive on-line help system to aid you. Help topics cover all CrossView Pro Windows, commands, and dialog boxes.

4.8.1 Accessing On-line Help

You can access help in several ways:

1. Click the Help button on a dialog box

Opens the help system with information about how to perform the task or about the meaning of the dialog.

2. Click on the question mark in the upper right corner of a dialog, then click the element in the dialog you want help on.

A yellow box briefly explains the element you asked help on.

3. Select the Help | Help menu item or press the F1-key.

Opens the help system with information about the active window.

4. Hover the mouse pointer over a toolbar button.

A yellow box shows the title of the button. A more complete description is shown in the status bar at the bottom of the screen.

4.8.2 Using MS-Windows Help

You enter help at a topic that explains the current window or dialog. By clicking on links, you can follow different paths. To return to your starting point click the Back button or open the Options | Display History Window and click on the node that you want to return to.

The Contents tab displays a list of main subjects. The Index tab displays a list of keywords that relate to certain topics. When you click the Search tab, a dialog box appears that allows you to search for a string. The Choose topic to display box shows all topics that are related to the search string.

To save time, you can iconize the Help Window and maximize it when necessary.


Copyright © 2002 Altium BV