Function
Print out information about the state of CrossView Pro.
The command line syntax is:
I
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.
Function
Conditional command execution.
The command line syntax is:
if ( expression ) { cmds } [ { cmds } ]
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:
if (a=b) {5t} {C}
CrossView Pro will trace back five levels on the stack if a is equal to b. Otherwise, CrossView Pro will continue.
The command line:
if (wait>1000) {wait;l r}
will print the value of wait and list all registers if the value of wait exceeds 1000.
Function
Close a File I/O stream.
Select the Settings | I/O Simulation Setup... menu item. Select a stream in the Connections tab and click on the Delete button.
The command line syntax is:
ios_close {stream | "file"}
Description
You can specify either a filename or a stream number.
Example
To close stream number 1, type:
ios_close 1
To close file data.txt and close 1 stream that is mapped to this file, type:
ios_close "data.txt"
Only 1 stream is closed, even if multiple streams are attached to this file. The command displays which stream number has been closed.
Function
Open a File I/O stream.
Select the Settings | I/O Simulation Setup... menu item. Choose 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:
ios_open ["file"[,[mode][,[r][,$xvw_variable]]]]
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:
ios_open
To open file data.txt and assign the new stream number to $ios_nr, type:
ios_open "data.txt",,,$ios_nr
To open file data.txt in read-only mode and wrap around when end of file is reached, type:
ios_open "data.txt",r,r,$ios_nr
ios_wopen, ios_close, ios_read, ios_write
Function
Read binary data from an I/O stream.
The command line syntax is:
ios_read {stream | "file"},address,number_of_maus[,x]
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:
ios_read 4,0x100,16
To read from stream $istrm 1 MAU hex value, type:
ios_read $istrm,0x100,1,x
ios_readf, ios_write, ios_open
Function
Formatted read from an I/O stream (scanf). Store the data at the location defined by the expression.
The command line syntax is:
ios_readf {stream | "file"},"format",expression
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:
%d Decimal.
%x Hexadecimal (without 0x prefix).
%c Char.
%s String.
%f Float.
Example
To read a hex value from stream 4 and store it the value of program variable ch1, type:
ios_readf 4,"%x",&ch1
To read a hex value from stream 4 and store it in register R2, type:
ios_readf 4,"%x",$R2
To read two hex values from stream $istrm and assign them to program variable ch1 and target register R2, type:
ios_readf $istrm,"%x %x",&ch1,$R2
Function
Move File I/O file pointer to the beginning of the file.
Select the Settings | I/O Simulation Setup... menu item. Choose 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:
ios_rewind {stream | "file"}
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:
ios_rewind 4
To move the file pointer of the file connected to stream $istrm to the beginning of the file, type:
ios_rewind $istrm
To move the file pointer to the beginning of file my.txt, which is connected to a stream, type:
ios_rewind "my.txt"
Function
Open a File I/O stream and map the stream to a terminal window.
Select the Settings | I/O Simulation Setup... menu item. Choose 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:
ios_wopen [["terminal_window "][,$xvw_variable]]
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:
ios_wopen ,$ios_nr
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_wopen "My terminal",$ios_nr
Function
Write binary data to an I/O stream.
The command line syntax is:
ios_write {stream | "file"},address,number_of_maus[,x]
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:
ios_write 4,0x100,16
To write 1 MAU hex value to stream $ostrm, type:
ios_write $ostrm,0x100,1,x
ios_read, ios_writef, ios_open
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:
ios_writef {stream | "file"},"format", expression
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:
%d Decimal.
%x Hexadecimal (without 0x prefix).
%c Char.
%s String.
%f Float.
Example
To write the hex value of program variable ch1 to stream 4, type:
ios_writef 4,"%x",ch1
To write the hex value of register R2 to stream $ostrm, type:
ios_writef $ostrm,"%x",$R2
To write the hex values of program variable ch1 and target register R2 to stream 4, type:
ios_writef 4,"%x %x",&ch1,$R2
Function
Synchronize the viewing and execution positions.
To synchronize the positions manually, click on the
Find PC button in the Source Window or select the Edit | Find PC menu item.
The command line syntax is:
L
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.
Example
To synchronize the viewing and execution positions, then list current file, function, and line number, type:
L
Function
List.
In general, the dialog box in which you define a feature
also contains a list.
The command line syntax is:
l { a| b| d|
f| g| k| l|
L| m| p| r|
s| S} [string]
l [func]
l stack
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):
t - Display tasks.
m - Display mailboxes.
q - Display queues.
p - Display pipes.
s - Display semaphores.
e - Display events.
h - Display HISRs (High-level Interrupt Service
Routines)
si - Display signals.
ti - Display timers.
pm - Display partition memory.
dm - Display dynamic memory.
r - Display resources.
misc - Display miscellaneous information.
Example
To list defined assertions and the state of the assertion mechanism, type:
l a
To list all locals and parameters of the current function, type:
l p
Data is displayed using the normal (/n) format. To list all the parameters and locals of the function fcn, type:
l fcn
To list queue information for the current tasks (only if your configuration supports it), type:
l k q
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:
load [filename]
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:
load demo.abs
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:
M
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.
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:
m exp
number m d
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:
m myvar
To monitor the address of variable myvar, type:
m &myvar
To monitor the element alpha+1 of array, type:
m array[alpha+1]
To delete expression number 2 of the monitored data, type:
2 m d
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:
addr_start mcp addr_end, addr_dest
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:
&buf mcp &buf+sizeof(buf), 0x200
Function
Retrieve data from the target into a buffer.
The command line syntax is:
memget expr,count ,buffer_name
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:
addr0 = (char *) &expr<$i{0}>
addr1 = (char *) &expr<$i{1}>
delta = addr1 - addr0
elem_size = sizeof(expr<$i{0}>)
type = C-type(expr<$i{0}>)
for (i = 0; i < count; i++)
{
value = read elem_size MAUs from address addr0 + (i * delta)
buffer[i] = convert_to_double(type, value);
}
Example
1. C structure access.
struct { double re, im; int f; } data[100];
To store the data[x].re values into acquisition buffer $a:
memget data[$i].re,100,$a
To store the data[x].im values into acquisition buffer $b:
memget data[$i].im,100,$b
2. Memory access.
To retrieve 18 integer values from memory starting at address 0x100 and store these in acquisition buffer $buffer:
memget ((int[]) 0x100)[$i],3*6,$buffer
bufa
, bufd
, graph
, rawmemget.
Section 11.5,
Data Analysis,
in chapter Special Features.
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:
addr mF expr [, expr]...
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:
0x400 mF 0x12, 0xAB
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:
addr_start mf addr_end, expr [,expr]...
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:
0x400 mf 0x404, 0x01, 0x02
The result of this command is:
address: 0x400 0x401 0x402 0x403 0x404 value: 1 2 1 2 1
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:
addr_start ms addr_end, expr [,expr]...
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:
0x400 mf 0x4ff, 0 0x400 mf 0x404, 1, 2
To search for the values 0x01 and 0x02 at memory locations in the range 0x400 to 0x4ff, type:
0x400 ms 0x4ff, 0x01, 0x02
The result of this command is:
FOUND pattern at 0x400 FOUND pattern at 0x402
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:
N [[path]filename[.abs]]
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:
N demo.abs
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:
n [ addr ]
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:
n 1000
To display the current bias, type:
n
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:
nC
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:
nC
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:
nU
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:
nU
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:
o string
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:
o map
Function
Set or display specific options.
Option values can be changed in various dialogs and menus.
The command line syntax is:
opt [ option_name [= option_value]]
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:
opt
To disable mixing of disassembly code and source lines in the assembly window, type:
opt mixedasm=off
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:
[ line ] P [ exp ]
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:
4 P 5
Function
Print source lines.
C source is displayed in the Source Window.
The command line syntax is:
[ line ] p [ exp ]
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:
4 p 5
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:
pC
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:
pC
Function
Disable, turn off, profiling.
Select the Tools | Profiling menu item if this item was set.
The command line syntax is:
pd
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:
pd
Function
Enable, turn on, profiling.
Select the Tools | Profiling menu item if this item was not set.
The command line syntax is:
pe
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:
pe
Function
List profiling results.
Select the Tools | Profiling Report... menu item, make your changes and select the Update button.
The command line syntax is:
proinfo [[all | module_or_function_name][,filename]]
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:
pe proinfo
To list profile information of function main to the output window, type:
proinfo main
To list profile information of all modules and functions in file hello.pro, type:
proinfo all,hello.pro
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 | Reset Application menu item.
The command line syntax is:
prst
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.
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:
pU
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:
pU
Function
Quiet breakpoint reporting.
The command line syntax is:
Q
Description
If this appears as the first command in a breakpoint's command list, the debugger does not make the usual announcement of:
function: line number: source file
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:
21 b {Q; var1}
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.
Function
Quit a debugging session.
Select the File | Exit menu item.
The command line syntax is:
q [ s | y ]
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.
Function
Reset program and begin execution from initial conditions.
Select the Run | Reset Application menu item followed by the Run | Run menu item.
The command line syntax is:
R
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.
Function
Retrieve data from the target into a buffer.
The command line syntax is:
rawmemget address,type,count,buffername [ ,interleave]
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:
rawmemget 0x100,int,3*6,$buffer
bufa
, bufd
, graph
, memget
.
Section 11.5,
Data Analysis,
in chapter Special Features.
Function
Reset target system to initial conditions.
Select the Run | Reset Target System menu item.
The command line syntax is:
rst
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.
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 the Run | Step Over menu item. Check the Run | Step Mode menu item: Source line step must be selected.
The command line syntax is:
[ exp ] S
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:
S
To step five C statements, type:
5 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 the
Run | Step Into menu item. Check the Run | Step Mode menu item: Source line step must be selected.
The command line syntax is:
[ exp ] s
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:
s
To step five source instructions, type:
5 s
Function
Save macros.
Select the Tools | Macro Definitions... menu item to view 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:
save file
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:
save mac.sav
set
,
unset
,
echo
,
!
,
<
,
<<
Function
Definition and display of macros.
To create a macro, select the Tools | Macro Definitions... menu item to view the Macro Definitions
dialog box. Click on the New... button.
The command line syntax is:
set [ name [ "cmds" ] ]
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:
set
To display the body of the macro named macro, type:
set macro!
To define macro to be a macro which lists the registers then enters the function given by its first argument, type:
set macro "l r; e $1"
To invoke this macro, you might type, for example:
macro(main)
Function
Single step machine instructions, stepping over subroutine calls
Select the Run | Step Mode | Instruction step menu item. Then click on the Step Over button in the Source Window, or select the Run | Step Over menu item.
The command line syntax is:
[ exp ] Si
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:
Si
To step five machine instructions, type:
5 Si
Function
Single step machine instructions, stepping into subroutine calls
Select the Run | Step Mode | Instruction step menu item. Then click on the Step Into button in the Source Window, or select the Run | Step Into menu item.
The command line syntax is:
[ exp ] si
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:
si
To step five machine instructions, type:
5 si
Function
Stop the execution of the target immediately.
The command line syntax is:
st
Description
This command stops the running process immediately.
Not available for all execution environments.
Function
Stack trace with local variables
The command line syntax is:
[ exp ] T
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:
T
To print out the top five levels of the stack trace with corresponding local variables, type:
5 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:
[ exp ] t
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:
t
To print out the top five levels of the stack trace, type:
5 t
Function
Disable, turn off, trace.
Select the Tools | Trace menu item if this item was set.
The command line syntax is:
td
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:
td
Function
Enable, turn on, trace.
Select the Tools | Trace menu item if this item was not set.
The command line syntax is:
te
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:
te
Function
Toggle the updating of the appropriate window when the target runs in the background.
The command line syntax is:
[interval] u [d|k|r|s|a|mem|t]
Description
The following windows can be updated:
d (Data), k (Stack), r
(Register),
s (Source), a (Assembly), mem (Memory), t (Trace)
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:
u r
To toggle the updating of the Source Window, type:
u s
To disable period updating, type:
0 u
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:
ubgw [ s | a | k | r | d | mem | t | all ]
Description
The following windows can be updated:
s (Source), a (Assembly), k (Stack), r (Register), d (Data), mem (Memory), t (Trace), all (all open windows)
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:
ubgw s
To update the Memory Window, type:
ubgw mem
Function
Delete a macro definition.
Select the Tools | 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:
unset [ name !]
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:
unset
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:
unset macro!
Function
Update a Data Analysis window.
Press on the Update Data Analysis Window button in a Data Analysis window.
The command line syntax is:
update "window"
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:
graph_clear_updates "demo"
graph_add_update "demo",memget data[$i],100,$buffer
graph_add_update "demo",graphm "demo","show_x_t.cxl"
graph_add_update "demo",graph "demo","x_t.cxl",$buffer,0,1
update "demo"
To update window demo as part of a complex breakpoint, type:
0x100 bi {update! "demo"}
graph_add_update, graph_clear_updates.
Section 11.5,
Data Analysis,
in chapter Special Features.
Function
Change source directories run-time.
Select the Target | Settings... menu item to view the Target Settings 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:
use [ path ]...
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:
use
To search for source files in the directory /project/src and in the src directory relative to your current directory, type:
use /project/src;../src
Function
Wait for the completion of the target.
The command line syntax is:
wt
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.
Function
Force an exit from assertion mode.
The command line syntax is:
[ exp ] x
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:
a if (myvar > 10) {x}
To define an assertion to suspend the assertion mechanism and continue program execution when global variable myvar exceeds 10, type:
a if (myvar > 10) { A s; 1 x; C}
Function
Toggle case sensitivity in searches
Select the Edit | Search String... menu item to view the Search String dialog box. This dialog contains the
Case Sensitive check box.
The command line syntax is:
Z
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