I

Function

Print out information about the state of CrossView Pro.

The command line syntax is:

Description

Print out information about the state of CrossView Pro, including: the CrossView Pro version number, the execution environment version information, the name of the program being debugged (and the number of its files and functions), the state of the assertion mechanism, the state of output recording, the state of command recording, the state of target communication recording and the state of search case sensitivity.

The state of the assertion mechanism tells how many assertions have been defined and whether the overall assertion mechanism is active or suspended; it does not tell whether any individual assertions are active or suspended.

l , a , A , > , >> , >& , Z

if

Function

Conditional command execution.

The command line syntax is:

Description

If expression evaluates to a non-zero value, execute the first group of commands. Otherwise, the second group of commands, if present, will be executed. This command is nestable.

Leave a space between if and exp. if(a==b) parses as a function call. The if statement is used primarily within breakpoint command lists.

Example

If you type:

CrossView Pro will trace back five levels on the stack if a is equal to b. Otherwise, CrossView Pro will continue.

The command line:

will print the value of wait and list all registers if the value of wait exceeds 1000.

ios_close

Function

Close a File I/O stream.

From the Settings menu, select I/O Simulation Setup... Select a stream in the Connections tab and click on the Delete button.

The command line syntax is:

Description

You can specify either a filename or a stream number.

Example

To close stream number 1, type:

To close file data.txt and close 1 stream that is mapped to this file, type:

Only 1 stream is closed, even if multiple streams are attached to this file. The command displays which stream number has been closed.

ios_open, ios_wopen

ios_open

Function

Open a File I/O stream.

From the Settings menu, select I/O Simulation Setup... Open the File I/O tab and click on the Configure... button. Attach a stream (with a file) to a probe point.

The command line syntax is:

Description

This command is useful to connect a file to a stream at the command line of CrossView. CrossView returns a stream number which is opened with this command in the $xvw_variable and displays it too.

The filename is optional. When the filename is omitted and such a newly opened stream receives data and is not shown in any opened terminal window a new window will be opened that interacts with this stream.

Furthermore the mode can be specified when a I/O stream is opened: read, write or append:

r Open file for reading. The file pointer is positioned at the beginning of the file.

r+ Open file for reading and writing. The file pointer is positioned at the beginning of the file.

w Truncate file to zero length or create file for writing. The file pointer is positioned at the beginning of the file.

w+ Open file for reading and writing. The file is created if it does not exist, otherwise it is truncated. The file pointer is positioned at the beginning of the file.

a Open file for writing. The file is created if it does not exist. The file pointer is positioned at the end of the file.

a+ Open file for reading and writing. The file is created if it does not exist. The file pointer is positioned at the end of the file.

All modes can have a 'b' appended, indicating binary access. The 'b' can be positioned before or after the '+'. This mode affects the ios_read and ios_write commands. The ios_read command writes host data to target memory. In binary mode MAUs (minimum addressable units) are filled with a number of bytes that fits in 1 MAU. For example, a MAU with a size of 24 bits will be filled with 24/8= 3 bytes. Otherwise the least significant 8 bits of a MAU will be filled with 1 byte and the highest 16 bits will be filled with zeros. The ios_write command writes target memory to the host. In binary mode for each MAU the number of bytes to be written equals the number of bytes that fits in 1 MAU. For a MAU size of 24 bits CrossView Pro will write 3 bytes to the host. If the mode is not binary CrossView Pro will write the least significant 8 bits (1 byte) of each MAU to the host.

CrossView Pro opens all files by default in w+ mode, overwriting the opened file if it already exists.

The optional 'r' specifies to rewind to the beginning of the file when the end of file is reached.

$xvw_variable is a user special variable in CrossView Pro which holds the value of the newly opened stream number. This variable can also be used in the read and write commands to read from or write to the file.

Example

To open a new File I/O stream, type:

To open file data.txt and assign the new stream number to $ios_nr, type:

To open file data.txt in read-only mode and wrap around when end of file is reached, type:

ios_wopen, ios_close, ios_read, ios_write

ios_read

Function

Read binary data from an I/O stream.

The command line syntax is:

Description

You can specify a File I/O stream number or a filename. address is the memory location where the read data will be stored. number_of_maus is the length of the data to be read in MAUs (minimum addressable units).

The optional ',x' specifies that the read data should be interpreted as hexadecimal values. The hexadecimal format is a whitespace separated (no TAB) hexadecimal string without the 0x prefix.

If the stream was opened in binary mode (see ios_open), MAUs are filled with a number of bytes that fits in 1 MAU. For example, a MAU with a size of 24 bits will be filled with 24/8= 3 bytes. Otherwise the least significant 8 bits of a MAU will be filled with 1 byte and the highest 16 bits will be filled with zeros.

Example

To read 16 minimum addressable units from stream 4, type:

To read from stream $istrm 1 MAU hex value, type:

ios_readf, ios_write, ios_open

ios_readf

Function

Formatted read from an I/O stream (scanf). Store the data at the location defined by the expression.

The command line syntax is:

Description

You can specify a File I/O stream number or a filename. format is a format specifier as used in the scanf C library function. expression can be any CrossView Pro expression.

Valid format specifiers are:

Example

To read a hex value from stream 4 and store it the value of program variable ch1, type:

To read a hex value from stream 4 and store it in register R2, type:

To read two hex values from stream $istrm and assign them to program variable ch1 and target register R2, type:

ios_read, ios_write, ios_open

ios_rewind

Function

Move File I/O file pointer to the beginning of the file.

From the Settings menu, select I/O Simulation Setup... Open the File I/O tab and click on the Configure... button. Attach a stream to a probe point. In the New Stream dialog enable the Wrap around check box.

The command line syntax is:

Description

With ios_rewind the file pointer is moved to the beginning of the file.

Example

To move the file pointer of the file connected to stream 4 to the beginning of the file, type:

To move the file pointer of the file connected to stream $istrm to the beginning of the file, type:

To move the file pointer to the beginning of file my.txt, which is connected to a stream, type:

ios_read, ios_write, ios_open

ios_wopen

Function

Open a File I/O stream and map the stream to a terminal window.

From the Settings menu, select I/O Simulation Setup... Open the File I/O tab and click on the Configure... button. Attach a stream (which is only connected to a terminal window) to a probe point.

The command line syntax is:

Description

When the name matches the name of an existing terminal window the newly opened stream is mapped to this terminal window.

$xvw_variable is a user special variable in CrossView Pro which holds the value of the newly opened stream number. This variable can also be used in the read and write commands to read from or write to the terminal_window.

You can close the opened stream with ios_close.

Example

To create a new terminal window and map the newly created stream to it. The name of the new terminal window will be like #x., type:

To open a new stream and if there is a terminal window with the name "My terminal" map stream to it, otherwise create a new terminal and name it "My terminal"., type:

ios_open, ios_close

ios_write

Function

Write binary data to an I/O stream.

The command line syntax is:

Description

You can specify a File I/O stream number or a filename. address is the memory location where the data will be read from. number_of_maus is the length of the data to be written in MAUs (minimum addressable units).

The optional ',x' specifies that the data should be interpreted as hexadecimal values. The hexadecimal format is a whitespace separated (no TAB) hexadecimal string without the 0x prefix.

If the stream was opened in binary mode (see ios_open), for each MAU the number of bytes to be written equals the number of bytes that fits in 1 MAU. For a MAU size of 24 bits CrossView Pro will write 3 bytes to the host. If the mode is not binary CrossView Pro will write the least significant 8 bits (1 byte) of each MAU to the host.

Example

To write 16 minimum addressable units to stream 4, type:

To write 1 MAU hex value to stream $ostrm, type:

ios_read, ios_writef, ios_open

ios_writef

Function

Formatted write to an I/O stream (printf).. The data is obtained from the C expression, for example a variable.

The command line syntax is:

Description

You can specify a File I/O stream number or a filename. format is a format specifier as used in the printf C library function. expression can be any CrossView Pro expression.

Valid format specifiers are:

Example

To write the hex value of program variable ch1 to stream 4, type:

To write the hex value of register R2 to stream $ostrm, type:

To write the hex values of program variable ch1 and target register R2 to stream 4, type:

ios_read, ios_write, ios_open

L

Function

Synchronize the viewing and execution positions.

To synchronize the positions manually, click on the Find PC button in the Source Window or select Find PC from the Edit menu.

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.

In general, the dialog box in which you define a feature also contains 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.

From the File menu, select Load Symbolic Debug Info... 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 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 Expression Evaluation Dialog check box in the Data Display Setup dialog is not set. If the latter is the case, click on the Add 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 Data 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 Copy Memory dialog. Enter the start address and the 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

memget

Function

Retrieve data from the target into a buffer.

The command line syntax is:

Description

The memget command is used to retrieve data from the target system and to store the data in the acquisition buffer buffer_name. Data in the acquisition buffer is of type double. CrossView Pro will automatically handle data conversion based upon the type of expression expr.

Expression expr contains the iterator "$i" which initially starts at 0 and increments to count-1.

Notation convention:
"expr<$i{n}>" means "expr in which all instances of "$i" are substituted by "n".

To correctly retrieve the data from the target CrossView Pro needs to know the start address, the size of the data elements, and the number of items to fetch. The number of items to fetch from the target is specified by count. The following algorithm is used to fill the acquisition buffer:

Example

1. C structure access.

To store the data[x].re values into acquisition buffer $a:

To store the data[x].im values into acquisition buffer $b:

2. Memory access.

To retrieve 18 integer values from memory starting at address 0x100 and store these in acquisition buffer $buffer:

bufa , bufd , graph , rawmemget.
Section 11.5, Data Analysis, in chapter Special Features.

mF

Function

Memory single fill.

From the Memory Window, click on the Fill Single Memory Address button to open the Single Fill Memory 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 Find Memory button to open the Search Memory 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.

From the File menu, select Load Symbolic Debug Info... 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, I/O simulation streams, assertions and CrossView Pro local variables remain active.

If a new file (different filename) is loaded, all breakpoints, monitors, I/O simulation 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

From the File menu, select Load Symbolic Debug Info... 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.

From the View menu, select Command | Emulator. 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 various 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 3, 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.

From the Tools menu, select Profiling 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.

From the Tools menu, select Profiling 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.

From the Tools menu, select Profiling Report...
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. Without arguments (same as all) this command lists the profiling information of all modules and function.

Instead of listing the results you can also save the results in a file with extension .pro.

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 of all modules and functions to the output window, type:

To list profile information of function main to the output window, type:

To list profile information of all modules and functions in file hello.pro, type:

cproinfo, 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.

From the Run menu, select Reset Application.

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.

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.

From the File menu, select Exit.

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.

From the Run menu, select Reset Application and then Run.

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

rawmemget

Function

Retrieve data from the target into a buffer.

The command line syntax is:

Description

The rawmemget command is used to retrieve data from the target system and to store the data in the acquisition buffer buffername. Data in the acquisition buffer is of type double. CrossView Pro will automatically handle data conversion based upon the type of the data. It reads count elements of type type from the target starting at address address into the buffer.

interleave indicates the distance between successive elements. The default value is sizeof(type).

Example

To retrieve 18 integer values from memory starting at address 0x100 and store these in acquisition buffer $buffer:

bufa , bufd , graph , memget .
Section 11.5, Data Analysis, in chapter Special Features.

rst

Function

Reset target system to initial conditions.

From hte Run menu, select Reset Target System.

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 button in the Source Window. You can also select Step Over from the Run menu. Check the Step Mode menu item in the Run menu: Source line 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 step into a function (single step), click on the Step Into button in the Source Window. You can also select Step Into from the Run menu. Check the Step Mode menu item in the Run menu: 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.

From the Tools menu, select Macro Definitions... to open the Macro Definitions dialog box. From this dialog box, you can save macros with 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 Macro Definitions... from the Tools menu. Click on the New... button and add a new macro.

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

From the Run menu, select Step Mode | Instruction step. Then click on the Step Over button in the Source Window, or select Step Over from the Run menu.

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

From the Run menu, select Step Mode | Instruction step. Then click on the Step Into button in the Source Window, or select Step Into from the Run menu.

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

st

Function

Stop the execution of the target immediately.

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

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.

From the View menu, select Stack. 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.

From the Tools menu, select Trace 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.

From the Tools menu, select Trace 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.

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.

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.

From the View menu, select Background Mode 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.

From the Tools menu, select Macro Definitions... to open 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 , !

update

Function

Update a Data Analysis window.

Click on the Update Data Analysis Window button in a Data Analysis window.

The command line syntax is:

Description

Update Data Analysis window window by issuing a sequence of update commands. These update commands were added with the graph_add_update command.

When you use the update command in a complex breakpoint, you should append a '!' character to prevent early macro expansion.

Example

To retrieve data and show it in window demo, type:

To update window demo as part of a complex breakpoint, type:

graph_add_update, graph_clear_updates.
Section 11.5, Data Analysis, in chapter Special Features.

use

Function

Change source directories run-time.

From the Target menu, select Settings... to open the Target Settings dialog box. Click on the Configure... button and 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.

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.

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

From the Edit menu, select Search String... to open 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 - gus


Copyright © 2003 Altium BV