L

Function

Synchronize the viewing and execution positions.

To synchronize the positions manually, click on the Synchronize source accelerator button in the Source Window or select the Run | Synchronize Source menu item.

The command line syntax is:

Description

This command synchronizes the viewing and execution positions. It also lists the current file, function and line number of the current program counter. The viewing position is always moved to match the execution position.

The L command is synonymous with a 0 e command and does not affect the execution position.

This command is not allowed when the target runs in the background.

Example

To synchronize the viewing and execution positions, then list current file, function, and line number, type:

e , l

l

Function

List.

There are multiple mouse equivalents for this command. Generally speaking, the dialog box in which you define a feature also maintains a list.

The command line syntax is:

Description

In the first case above, list one of the following: assertions, breakpoints, directories, files, globals, kernel state data, labels (on module scope), all Labels, memory map (of application code sections), procedures, registers, special variables, Symbol tables. If string is present, then list only those items that start with string.

In the second case, list the values of all parameters and locals of the function func. Without a function, this command lists all parameters and locals of the current function in view.

In the third case, list all parameters and locals of the function at depth stack.

The l f and l m commands also show the address of the modules' first procedure. The l m command is identical to l  f, list files, but the list of files is sorted on ascending segment addresses. func must be a function on the stack or the current function.

For configurations that support real-time kernels, the l k command can have one of the following arguments (l k is the same as specifying l k t):

Example

To list defined assertions and the state of the assertion mechanism, type:

To list all locals and parameters of the current function, type:

Data is displayed using the normal (/n) format. To list all the parameters and locals of the function fcn, type:

To list queue information for the current tasks (only if your configuration supports it), type:

L , et

load

Function

Load a program's symbol file and download the image part.

Select the File | Load Symbolic Debug Info... menu item. This dialog allows you to specify the file.

The command syntax is:

Description

This command performs the N and dn commands sucessively.

Downloading a file only copies the image part into target memory (dn). It will not cause CrossView Pro to re-read symbolic information (N). The load command does both.

This command is not allowed when the target runs in the background.

Example

To load the symbol table of file demo.abs in CrossView Pro and to download the image part, type:

dn , N

M

Function

List the data currently being monitored.

Refer to the Data Window. Each time the program stops, the debugger evaluates all monitored expressions and displays the results in the Data Window.

The command line syntax is:

Description

List all C expressions being monitored by CrossView Pro. The listing associates a unique number with each expression. This number is used to specify the deletion of monitored data.

m

m

Function

Monitor (watch) an expression. (Also delete a monitor.)

From the Source Window, double-click on an expression. A new monitor is created in the Data Window or the Expression Evaluation dialog is opened if the Bypass Dialog check box in the Data Display Setup dialog is not set. If the latter is the case, click on the Watch button to create a new monitor in the Data Window. To remove an existing monitor, select the monitor in the Data Window and click on the Delete selected item button.

The command syntax is:

Description

The m command has two distinct functions. The first monitors the given expression. The second deletes the monitoring of the expression specified by number.

Data monitoring takes place whenever the program stops execution, that is, for a breakpoint, assertion, single step, or user interrupt (ctrl-C). In window mode, the values of all currently monitored data are displayed in the Data window. Each piece of monitored data has a unique identifying number that is used when deleting it.

Example

To monitor the value of the variable myvar, type:

To monitor the address of variable myvar, type:

To monitor the element alpha+1 of array, type:

To delete expression number 2 of the monitored data, type:

M , b , a , s , R , C

mcp

Function

Memory copy.

From the Memory Window, click on the Copy memory button to open the Memory Copy dialog. Enter the start address and end address (inclusive) of the memory region you want to copy. Enter the destination address and click on the OK button.

The command syntax is:

Description

The mcp command copies a block of target memory starting at address addr_start to destination address addr_dest. The size of the memory block is defined as: 'addr_end - addr_start + 1'. The data item located at address addr_end is included in the copy.

If your target supports multiple memory spaces then it is legal to copy data between different memory spaces. Of course addr_start and addr_end must be located in the same memory space. This command does not have any effect on code breakpoints.

Example

To copy the contents of variable buf to address 0x200, type:

mF , mf

mF

Function

Memory single fill.

From the Memory Window, click on the Single Fill memory button to open the Memory Single Fill dialog. Enter the start address the memory region you want to fill. Enter one or more expressions separated by commas and click on the OK button.

The command syntax is:

Description

The mF command fills target memory with data. The value defined by exp is written to address addr in target memory. Multiple exps separated by commas may be entered. Each exp is written to a subsequent MAU.

If your target supports multiple memory spaces then addr may refer to any memory space.

If the sizeof a given exp occupies more than one MAU, only the least significant MAU will be written to memory. This command does not have any effect on code breakpoints.

Example

To store value 0x12 at memory location 0x400 and value 0xAB at location 0x401, type:

mcp , mf

mf

Function

Memory fill, repeating the specified pattern until the specified region is filled.

From the Memory Window, click on the Fill memory button to open the Memory Fill dialog. Enter the start address and end address (inclusive) of the memory region you want to fill. Enter one or more expressions separated by commas and click on the OK button.

The command syntax is:

Description

The mf command fills a block of target memory with a pattern. The memory region starting at address addr_start and ending at address addr_end is filled with the pattern defined by exp [,exp]. Multiple exps separated by commas may be entered. Each exp is written to a subsequent MAU.

The specified pattern is repeated until the end address of memory region is reached.

If your target supports multiple memory spaces then addr may refer to any memory space.

If the sizeof a given exp occupies more than one MAU, only the least significant MAU will be written to memory. This command does not have any effect on code breakpoints.

Example

To store values 0x01 and 0x02 at succeeding memory locations in the range 0x400 to 0x404, type:

The result of this command is:

mcp , mf

ms

Function

Memory search.

From the Memory Window, click on the Search memory button to open the Memory Search dialog. Enter the start address and end address (inclusive) of the memory region you want to search. Enter one or more search patterns separated by commas and click on the OK button.

The command syntax is:

Description

The ms command searches for a pattern within a block of target memory. The memory region starting at address addr_start and ending at address addr_end (inclusive) is searched for the pattern defined by exp [,exp]. Multiple exps separated by commas may be entered. Each exp corresponds to a subsequent MAU.

If your target supports multiple memory spaces then addr may refer to any memory space.

This command does not have any effect on code breakpoints.

Example

Suppose the memory range 0x400 to 0x4ff was filled using the following commands:

To search for the values 0x01 and 0x02 at memory locations in the range 0x400 to 0x4ff, type:

The result of this command is:

mcp , mF , mf

N

Function

Load a program's symbol file.

Select the File | Load Symbolic Debug Info... menu item. This menu item allows you to specify the file.

The command syntax is:

Description

Load the symbol table of the specified file in CrossView Pro. If no filename is given, the file being debugged is reloaded. In this case only the breakpoints set by the user are removed. Monitors, simulated I/O streams, assertions and CrossView Pro local variables remain active.

If a new file (different filename) is loaded, all breakpoints, monitors, simulated I/O streams, assertions and CrossView Pro local variables are removed.

If a path is supplied, CrossView Pro changes its current directory according to the specified path. In case a relative search path to source files was provided at startup time, CrossView Pro will search relative to the new working directory.

This command is automatically executed during CrossView Pro startup when a filename was given on the command line. Use the dn command to send the associated executable code to the target.

Example

To load the symbol table of file demo.abs in CrossView Pro, type:

dn

n

Function

Set address bias

Select the File | Load Symbolic Debug Info... menu item. In the Load Symbolic Debug Info dialog you can edit the Code address bias field.

The command syntax is:

Description

Set address bias of overlay files to addr. If no address is given, then display current bias.

If a program is to be loaded at a different address than that indicated in the linked and located (absolute object) file, then the address information in the debugger's symbol file will be incomplete, since it does not know where the program is actually going to be loaded. This command will normalize the addresses by adding the bias to every address.

Example

To add a bias of 1000 to every address in the code, type:

To display the current bias, type:

nC

Function

Set the viewing position to the next covered block of statements.

Use the scroll bar and click on the desired line.

The command line syntax is:

Description

If code coverage is supported by your version of CrossView Pro, this command enables you to skip to the next block of statements that have been executed while the program was running on the target.

Example

To move the cursor to the next executed block, type:

nU , pC , pU

nU

Function

Set the viewing position to the next not covered block of statements.

Use the scroll bar and click on the desired line.

The command line syntax is:

Description

If code coverage is supported by your version of CrossView Pro, this command enables you to skip to the next block of statements that have not been executed while the program was running on the target.

Example

To move the cursor to the next not executed block, type:

nC , pC , pU

o

Function

Enter emulator mode.

Select the View | Command | Emulator menu item. If you know the emulator-level command language, you can communicate directly with the emulator from this window.

The command line syntax is:

Description

Pass string to emulator and show the emulator response.

The o command lets you communicate with the emulator directly via emulator commands.

Do not issue one-shot transparency emulator commands that result in large output (or otherwise require intervention other than a carriage return to terminate output). Instead, enter transparency mode first, then issue the command.

Example

To send the string map to the emulator, type:

opt

Function

Set or display specific options.

Option values can be changed in the corresponding dialogs and menus.

The command line syntax is:

Description

If no arguments are passed, all options with their current value are listed. By specifying an option's name, the current value of that option is displayed. By specifying an option name followed by a valid value, the option is set to that new value.

The options are a sub-set of CrossView's so-called "special variables". See chapter Command Language for a list of all special variables.

Example

To display all options, type:

To disable mixing of disassembly code and source lines in the assembly window, type:

l

P

Function

Print source lines, including machine addresses.

In the Source Window, the machine address of the line at the current viewing position is displayed in the Address field in the upper left corner.

The command line syntax is:

Description

Print exp lines of source starting at line line, including machine addresses. If exp is omitted, print one line. If line is omitted, start from the current viewing position.

Example

To print source lines 4, 5, 6, 7 and 8 (displaying machine addresses) of the current source file, type:

p

p

Function

Print source lines.

C source is displayed in the Source Window.

The command line syntax is:

Description

Print exp lines of source starting at line line. If exp is omitted, print one line. If line is omitted, start from the current viewing position.

Example

To print source lines 4, 5, 6, 7 and 8 of the current source file, type:

P

pC

Function

Set the viewing position to the previous covered block of statements.

Use the scroll bar and click on the desired line.

The command line syntax is:

Description

If code coverage is supported by your version of CrossView Pro, this command enables you to skip to the previous block of statements that have been executed while the program was running on the target.

Example

To move the cursor to the previous executed block, type:

nC , nU , pU

pd

Function

Disable, turn off, profiling.

Select the Run | Profiling menu item if this item was set.

The command line syntax is:

Description

If profiling is supported by your version of CrossView Pro, this command disables the profiling system. Normally, you should disable profiling if you are not interested in the profiling results, as this will often improve the performance of the execution environment.

Example

To disable profiling, type:

pe

pe

Function

Enable, turn on, profiling.

Select the Run | Profiling menu item if this item was not set.

The command line syntax is:

Description

If profiling is supported by your version of CrossView Pro, this command enables the profiling system. Normally, you should disable profiling if you are not interested in the profiling results, as this will often improve the performance of the execution environment.

Example

To enable profiling, type:

pd

proinfo

Function

List profiling results.

Select the Debug | Profiling Report... menu item, make your changes and select the Update button..

The command line syntax is:

Description

If profiling is supported by your version of CrossView Pro and profiling is enabled, this command lists the profiling results. Normally, you should disable profiling if you are not interested in the profiling results, as this will often improve the performance of the execution environment.

Example

To list the profiling results, type:

pd , pe

prst

Function

Reset the application being debugged to initial conditions. That is, set the program counter to the start address of the application.

Select the Run | Program Reset menu item.

The command line syntax is:

Description

The program counter is set to the start address of the application being debugged. This command does NOT perform a hardware reset of the target system. That is, no registers are modified except for the program counter.

This command is not allowed when the target runs in the background.

R , rst

pU

Function

Set the viewing position to the previous not covered block of statements.

Use the scroll bar and click on the desired line.

The command line syntax is:

Description

If code coverage is supported by your version of CrossView Pro, this command enables you to skip to the previous block of statements that have not been executed while the program was running on the target.

Example

To move the cursor to the previous not executed block, type:

nC , nU , pC

Q

Function

Quiet breakpoint reporting.

There is no mouse equivalent for this command.

The command line syntax is:

Description

If this appears as the first command in a breakpoint's command list, the debugger does not make the usual announcement of:

when the breakpoint is hit.

The purpose of this command is to allow quiet breakpoint reporting. For example, to check the value of a variable without cluttering the screen with text.

Example

If you type the following:

CrossView Pro will set a breakpoint at line 21. When that breakpoint is hit, CrossView Pro will print the value of var1, but will not print the current function, line number, and source file.

b

q

Function

Quit a debugging session.

Select the File | Exit menu item.

The command line syntax is:

Description

CrossView Pro will prompt you if you really want to quit if you do not specify anything. Note that the current desktop settings are NOT saved then!

Typing q s saves the current desktop settings and quits the debugger without confirmation.

Typing q y does not save the current desktop settings and quits the debugger without confirmation.

Inside a command line procedure call it will just quit from this.

When the target runs in the background CrossView Pro will first stop the target.

R

Function

Reset program and begin execution from initial conditions.

Select the Run | Program Reset menu item followed by the Run | Run menu item.

The command line syntax is:

Description

Reset the application being debugged and begin execution from initial conditions. The program counter is set to the start address of the application being debugged. This command does NOT perform a hardware reset of the target system. That is, no registers are modified except for the program counter.

This command is not allowed when the target runs in the background.

C , g , prst

rst

Function

Reset target system to initial conditions.

Select the Run | Target System Reset menu item.

The command line syntax is:

Description

The target is initialized according to the power-up sequence for the processor. Almost all registers, including the system stack pointer and program counter are initialized.

A target system reset may have undesired side effects. To be sure that the application code is correct, a download must be performed after a target system reset.

This command is not allowed when the target runs in the background.

R , prst

S

Function

Single step C statements, stepping over function calls.

To step over a function, click on the Step Over accelerator button in the Source Window. You can also select the Run | Step Over menu item. Verify the Run | Step Mode menu item; Source Step must be selected.

The command line syntax is:

Description

If you try to step over a call to a function which contains a breakpoint (or which calls another function with a breakpoint) then the breakpoint will be hit.

Stepping over a function means that CrossView Pro treats function calls as a single statement and advances to the next line in the source. This is a useful operation if a function has already been debugged or if you do not want to take the time to step through a function line by line.

When multiple statements are present on one line, they are all executed by this single step.

This command is not allowed when the target runs in the background.

Example

To step one C statement, type:

To step five C statements, type:

C , s , si , Si

s

Function

Single step C statements, stepping into function calls

To single step into a function, click on the Step Into accelerator button in the Source Window. You can also select the Run | Step Into menu item. Verify the Run | Step Mode menu item; Source line step must be selected.

The command line syntax is:

Description

Single step exp (default is 1), C statements, stepping into function calls.

Stepping into a function means that CrossView Pro enters the function and executes its prologue machine instructions halting at the first C statement. When the end of the function is reached, CrossView Pro brings you back to the line after the function call. The debugger changes the source code file displayed in the Source Window, if necessary.

This command is not allowed when the target runs in the background.

Example

To step one source instruction, type:

To step five source instructions, type:

C , S , si , Si

save

Function

Save macros.

Select the Options | Macro Definitions... menu item to view the Macro Definitions dialog box. From this dialog box, you can save macros by clicking on the Save button. To save macro definitions in a file other than the current one, click on the Save as... button.

The command line syntax is:

Description

Save all currently defined macros in the specified file. This file is in the format of a sequence of set commands, and thus can be loaded by reading it as a playback file. See the < and << commands.

An existing save file with the same name will be overwritten.

Example

To save the definitions of the currently defined macros in the file mac.sav, type:

set , unset , echo , ! , < , <<

set

Function

Definition and display of macros.

To create a macro, select the Options | Macro Definitions... menu item to view the Macro Definitions dialog box. Click on the New... button.

The command line syntax is:

Description

The set command allows for definition and display of macros. If name and cmds are supplied, a macro entry is made associating the name with the commands. If only name is supplied, the body of the specified macro is displayed.

If no arguments are supplied the names of all currently defined macros are displayed. Macro definitions must contain the body of the macro in double quotation marks.

Macros may take arguments. In the body of a macro formal arguments are referred to as $n, where n is the argument number starting from 1.

It is important to understand that macro expansion takes place for all names. Therefore, if you wish to pass the name of an existing macro to a command, such as set, you must escape it with '!', to keep CrossView Pro from expanding the name.

Example

To display the names of all currently defined macros, type:

To display the body of the macro named macro, type:

To define macro to be a macro which lists the registers then enters the function given by its first argument, type:

To invoke this macro, you might type, for example:

unset , echo , save , !

Si

Function

Single step machine instructions, stepping over subroutine calls

Select the Run | Step Mode | Machine step menu item. Then click on the Step Over accelerator button in the Source Window, or select the Run | Step Over menu item.

The command line syntax is:

Description

Single step exp (default is 1) machine instructions, stepping over subroutine calls.

If you try to step over a call to a subroutine which contains a breakpoint (or which calls another subroutine with a breakpoint) then the breakpoint will be hit.

The next instruction to be executed is shown as a disassembled instruction, not as a C statement.

This command is not allowed when the target runs in the background.

Example

To step one machine instruction, type:

To step five machine instructions, type:

C , s , S , si , R

si

Function

Single step machine instructions, stepping into subroutine calls

Select the Run | Step Mode | Machine step menu item. Then click on the Step Into accelerator button in the Source Window, or select the Run | Step Into menu item.

The command line syntax is:

Description

Single step exp (default is 1), machine instructions, stepping into subroutine calls.

The next instruction is shown as a disassembled instruction, not as a C statement.

This command is not allowed when the target runs in the background.

Example

To step one machine instruction, type:

To step five machine instructions, type:

C , s , S , Si , R

sio

Function

Associate a stream with a file or screen.

Use the Debug | Simulated I/O Setup menu item to set up simulated I/O streams. You can open a simulated I/O stream with one of the View | Simulated I/O | Stream x menu items or use the Debug | Simulated I/O Setup dialog to configure a number of streams. In this case, the associated window will be created when input is required from the window or when output is sent to the window.

The command line syntax is:

Description

Associate an I/O stream with a file file or screen. Valid stream numbers are 0 through 7. The stream may be input (i) or output (o). I/O is either done on the file file or via the screen/keyboard. The stream may be read from or written to using the format format which tells CrossView Pro how to interpret the data. The default format is character. Formats may also be x (hexadecimal) and o (octal).

Other options to the sio command are: delete (d) the specified stream, and change the input prompt string (stream sio p prompt). The sio command with no arguments lists all simulated I/O streams.

This command can only be used in conjunction with user I/O routines containing _simi or _simo calls. See the Simulated Input/Output chapter for further details.

Deleting a stream will close all communication with that stream. This is useful to stop output to the screen or file when enough output information has been seen and resumption of the program, running without I/O breaks from this simulated I/O stream, is desired.

Example

To start simulated input from the file testdata.in, type:

This input will be associated with stream 5. Data in the testdata.in file are expected to be in hexadecimal format.

To list all simulated I/O streams, type:

st

Function

Stop the execution of the target immediately.

There is no mouse equivalent for this command.

The command line syntax is:

Description

This command stops the running process immediately.

Not available for all execution environments.

CB , wt

T

Function

Stack trace with local variables

There is no mouse equivalent for this command.

The command line syntax is:

Description

Produce a trace of functions on the stack and show local variables. Only the first exp levels of the stack trace will be displayed. If exp is omitted, all of the levels of the stack trace (up to 20) will be printed.

This command works independently of the Stack Window.

This command is not allowed when the target runs in the background.

Example

To print out a stack trace of 20 levels with corresponding local variables, type:

To print out the top five levels of the stack trace with corresponding local variables, type:

e , l , t

t

Function

Stack trace.

Select the View | Stack menu item. The Stack Window shows the current situation in the stack after the program has been stopped. It displays the following information for each stack frame:

The command line syntax is:

Description

Produce a trace of functions on the stack.

exp specifies the number of levels of the stack trace to be displayed. If omitted, up to 20 levels of the stack trace will be printed.

Each stack level shown in the Stack Window is displayed with its level number first. The levels are numbered sequentially from zero. That is, the lowest/last level in the function call chain is always assigned zero.

This command is not allowed when the target runs in the background.

Example

To print out a stack trace of 20 levels, type:

To print out the top five levels of the stack trace, type:

e , l , T

td

Function

Disable, turn off, trace.

Select the Run | Trace menu item if this item was set.

The command line syntax is:

Description

If trace is supported by your version of CrossView Pro, this command disables tracing (both instruction level, high level and raw). Trace is automatically disabled when you close the Trace Window.

Example

To disable tracing, type:

te

te

Function

Enable, turn on, trace.

Select the Run | Trace menu item if this item was not set.

The command line syntax is:

Description

If trace is supported by your version of CrossView Pro, this command enables tracing (both instruction level, high level and raw). Trace is automatically enabled when you open a Trace Window.

Example

To enable tracing, type:

td

u

Function

Toggle the updating of the appropriate window when the target runs in the background.

There is no mouse equivalent for this command.

The command line syntax is:

Description

The following windows can be updated:

With interval you can specify the update interval (in seconds). If interval is zero, no window is automatically updated.

The updating of the Data Window is ON at startup, the others are OFF

If all windows are being updated and/or many monitor commands are active it will increase the load on the communication between CrossView Pro and the target.

The u d and the u cd commands toggle both the Data Window and the Composite Data Window. The same goes for the u r, u k, u cr and the u ck commands in respect to the Register Window, Stack Window, Composite Register Window and the Composite Stack Window.

This command is not available if the background mode is not supported (check the addendum).

Example

To toggle the updating of the Register Window, type:

To toggle the updating of the Source Window, type:

To disable period updating, type:

CB , ubgw

ubgw

Function

Update the appropriate window when the target runs in the background.

Select the View | Background Mode menu item and select one of the refresh options.

The command line syntax is:

Description

The following windows can be updated:

Without an argument, the ubgw command refreshes all windows selected by the background mode (u command).

The ubgw all command refreshes all open windows.

This command is not available if the background mode is not supported (check the addendum).

Example

To update the Source Window, type:

To update the Memory Window, type:

u

unset

Function

Delete a macro definition.

Select the Options | Macro Definitions... menu item to view the Macro Definitions dialog box. Highlight the name of the macro and click on the Delete button.

The command line syntax is:

Description

The unset command deletes a macro. If name is supplied, the specified macro is deleted. If no arguments are supplied, all currently defined macros are deleted after CrossView Pro confirms your intent.

It is important to understand that macro expansion takes place for all names. Therefore if you wish to pass the name of a macro to a command, for example unset, you must escape it with `!', to keep from expanding the name.

Example

To delete all macros, type:

CrossView Pro will first ask for confirmation. To delete all the macro definitions at the same time, click on the Delete all button in the Macro Definitions dialog box.

To delete the macro named macro, type:

set , echo , unset , !

use

Function

Change source directories run-time.

Select the Options | Startup | CrossView menu item to view the CrossView Startup dialog box. Click on the Configure... button to specify the names of the directories containing your source files. Relative paths are allowed.

The command line syntax is:

Description

The use command changes the source directories. Without a path this command empties the search path, except for the path . (current directory). If one or more paths are supplied, this command adds the, semicolon separated, paths to the list of searched directories. Relative paths are allowed.

Example

To clear the source directory path, type:

To search for source files in the directory /project/src and in the src directory relative to your current directory, type:

l d

wt

Function

Wait for the completion of the target.

There is no mouse equivalent for this command.

The command line syntax is:

Description

This command can only be used if the target runs in the background mode.

This command waits for the running process to stop.

Waiting can be interrupted by typing ctrl-C. The target continues to run without interruption. It could be that some informational messages from the target are displayed in the command window. They can be ignored.

Not available for all execution environments.

CB , st

x

Function

Force an exit from assertion mode.

There is no mouse equivalent for this command.

The command line syntax is:

Description

Normally this command stops execution immediately, but if exp is present and its value is non-zero, then CrossView Pro finishes executing the entire command list of the current assertion.

Example

To define an assertion to stop the program when the value of global variable myvar exceeds 10, type:

To define an assertion to suspend the assertion mechanism and continue program execution when global variable myvar exceeds 10, type:

a , A , l

Z

Function

Toggle case sensitivity in searches

Select the Search | Search String... menu item to view the Search String dialog box. This dialog contains the Case Sensitive check box.

The command line syntax is:

Description

Toggle case sensitivity in searches. The initial state of this toggle depends on information in the currently loaded absolute file. Use the I command to find out the state of the case sensitivity.

This command affects everything: file names, function names, variables and string searches.

/ , ?




Other commands:

expression - ^
A - if


Copyright © 2000 TASKING, Inc.