Toggle the state of the assertion mode.
To activate or suspend assertion mode, select the
Debug | Assertions... menu item, and enable or disable the
Assertion Mode Active check box.
The command line syntax is:
Activate (A a) or suspend (A s) overall state of the assertion mechanism. If no operand is given, toggle the state.
To activate the assertion mechanism, type:
A a
To suspend the assertion mechanism, type:
A s
To toggle the state of the assertion mechanism, simply type:
A
Define or modify an assertion.
Select the Debug | Assertions... menu item to view the Assertions dialog box. Select New... to define an assertion. Select and assertion and select Edit... to modify an assertion.
The command line syntax is:
The a command is used to invoke two different commands. The syntax for each command is distinct. The first version allows modification of the state of the assertion specified by the expression exp. (The assertion can be activated (a a), deleted (a d) or suspended (a s).) The second version creates a new assertion with the given command list cmds. Using the mouse, you can create a new assertion or toggle the state of an existing one from the Assertions dialogue box.
Suspended assertions continue to exist, but are not active. Deleted assertions must be explicitly redefined in order to be made active again.
The commands for every active assertion are executed after every source statement is executed. The x command in an assertion command list forces an exit from assertion mode.
This command is not allowed when the target runs in the background.
To suspend assertion 3, type:
3 a s
To delete assertion 1, type:
1 a d
To set an assertion to stop the program when global variable myvar exceeds 3, type:
a if (myvar > 3) {x}
List all of the currently defined breakpoints.
Select the Debug | Breakpoints.. menu item to view the Breakpoints dialog box.
The command line syntax is:
Breakpoints are listed with numbers associated with them. These numbers can be used to delete individual breakpoints.
b
,
bb
,
bB
,
bi
,
bI
,
bu
,
bU
,
R
,
C
,
D
,
l
Set a code breakpoint.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Code... button to create a new code breakpoint, leave the Task ID field empty or enter the string "any".
Alternatively, you can set a code breakpoint directly in the source by double-clicking on unmarked text, the viewing position, or the execution position.
The command line syntax is:
You can attach a list of CrossView Pro commands with the breakpoint. If no line is given, set the breakpoint at the current viewing position.
When the breakpoint is hit execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next, any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the b command.
To set a breakpoint at the current line, type:
b
To set a breakpoint at line 10 that will list all global variables and halt execution, type:
10 b {l g}
bd
,
bD
, bdis
,
bena
,
bb
,
bB
,
bi
,
bI
,
bt
,
bti
,
btI
,
bu
,
bU
,
Q
Set a temporary breakpoint at the beginning of a function.
In the Stack Window, click on the desired function and
select the Debug | Stack Breakpoint | At Function Entry menu item.
The command line syntax is:
The function is designated by the stack level stack. If no function is specified, CrossView Pro uses the current function (stack level 0), and associates the list of CrossView Pro commands cmds with the breakpoint.
Breakpoints set in the Stack Window are always temporary, meaning they will be deleted after the first time you reach them. A breakpoint set in this manner will not be visible in the Source Window.
When the breakpoint is hit, execution is halted; the breakpoint is then removed. By default the current execution position, function, line number, and source statement are displayed. Next, any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bB command.
This command is not allowed when the target runs in the background.
To set a temporary breakpoint at the beginning of the current function which prints a stack trace, type:
bB {T}
To set a temporary breakpoint at the beginning of the function whose stack number is 2, type:
2 bB
b
,
bb
,
bd
,
bD
,
bi
,
bI
,
bt
,
bti
,
btI
,
bu
,
bU
,
Q
Set a permanent breakpoint at the beginning of a function.
In the Stack Window, click on the desired function and select the Debug | Stack Breakpoint | At Function Entry menu item. To make the stack breakpoint permanent, select the
Debug | Breakpoints... menu item, select the desired stack breakpoint,
click on the Edit...
button and select the Permanent radio button.
The command line syntax is:
Set a breakpoint at the beginning of the function designated by the stack level stack. Otherwise, use the current function (stack level 0), and associate the list of CrossView Pro commands cmds with the breakpoint.
When the breakpoint is hit, execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next, any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bb command.
This command is not allowed when the target runs in the background.
To set a breakpoint at the beginning of the current function, which prints a stack trace, type:
bb {T}
To set a breakpoint at the beginning of a function whose stack number is 2, type:
2 bb
b
,
bB
,
bd
,
bD
,
bi
,
bI
,
bt
,
bti
,
btI
,
bu
,
bU
,
Q
Set a breakpoint's count and reset count.
Select the Debug | Breakpoint... menu item, select
the breakpoint for which you want to set the count and reset count, click
on the Edit...
button, enter a breakpoint count and select the
Reset to 1 or Reset to value radio button.
The command line syntax is:
Set the count and reset_count for the breakpoint with breakpoint number number. When no arguments are given, the breakpoint at the current viewing position is set to a count of 1 and a reset count of 1. If no breakpoint is present at the current viewing position, the message "No such breakpoint" appears.
Each time a breakpoint is hit, CrossView Pro decrements the count. When the count reaches 0, execution is halted and the count is reset to the reset_count.
This command is not allowed when the target runs in the background.
To set a breakpoint's count and reset count to 1 for the breakpoint at the current viewing position, type:
bc
To set the count to 3 and the reset count to 4 for the breakpoint whose breakpoint number is 2, type:
2 bc 3 4
Set a temporary cycle count breakpoint.
There is no mouse equivalent for this command.
The command line syntax is:
Set a temporary breakpoint after the specified cycle count. count can be any expression evaluating to a number. The list of CrossView Pro commands cmds are executed when the breakpoint is hit.
When the breakpoint is hit, execution is halted; the breakpoint is then removed. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bCYC command.
To set a temporary breakpoint after 4 clock cycles and list all global variables, type:
4 bCYC {l g}
b
, bcyc
, bINST
, binst
, bTIM
, btim
,
D
Set a permanent cycle count breakpoint.
There is no mouse equivalent for this command.
The command line syntax is:
Set a permanent breakpoint after the specified cycle count. count can be any expression evaluating to a number. The list of CrossView Pro commands cmds are executed when the breakpoint is hit.
When the breakpoint is hit, execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bcyc command.
To set a cycle count breakpoint after 4 clock cycles and list all global variables, type:
4 bcyc {l g}
b
, bCYC
, bINST
, binst
, bTIM
, btim
,
D
Set a read and/or write data breakpoint over a range of addresses.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Data... button to create a new Data breakpoint.
The command line syntax is:
Set a read, write, or both (read and write) data breakpoint in the address range exp1 to exp2 and associate the list of CrossView Pro commands cmds with the breakpoint.
When the breakpoint is hit, execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next, any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bD command.
If exp1 is the address of a local (stack) variable, the function in which it was declared must be currently active on the stack. If the local variable corresponding to a data breakpoint goes out of scope due to a return from the function in which it is currently active, the data breakpoint will be removed and a message will be printed telling the user that the variable is no longer active.
Not available for all execution environments.
To set a data breakpoint that includes the entire structure rec1, type:
&rec1 bD r (int)&rec1+sizeof(rec1)-1
This breakpoint will be hit only if any address in the range of addresses is read from.
To set a data breakpoint for the address range 10 to 10f hex (256 bytes) that will list all global variables, type:
0x10 bD b 0x10f {l g;}
This breakpoint will be hit if any memory locations within the range 10-10f hex are either read from or written to.
b
,
bb
,
bB
,
bd
,
bi
,
bI
,
bt
,
bti
,
btI
,
bu
,
bU
,
Q
Set a read and/or write data breakpoint at an address.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Data... button to create a new Data breakpoint.
The command line syntax is:
Set a read, write or both (read and write) data breakpoint at the address specified by exp and associate the list of CrossView Pro commands cmds with the breakpoint.
When the breakpoint is hit, execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bd command.
If exp corresponds to a local (stack) variable, the function in which it was declared must be currently active on the stack. If the local variable corresponding to a data breakpoint goes out of scope due to a return from the function in which it is currently active, the data breakpoint will be removed and a message will be printed telling you that the variable is no longer active.
Not available for all execution environments.
To set a breakpoint at the variable count which will all be hit only if the variable is read from memory, type:
&count bd r
Note that the breakpoint only acts on the lowest byte
in memory of this variable.
To set a breakpoint at address 10 hex that will list all global variables, type:
0x10 bd b {l g}
This breakpoint will be hit if address 10 hex is either read from or written to.
b
,
bb
,
bB
,
bD
,
bi
,
bI
,
bt
,
bti
,
btI
,
bu
,
bU
,
Q
Disable code breakpoint.
Select the Debug | Breakpoint... menu item, select
the breakpoint you want to disable, click on the Edit... button, disable the Enabled check
box.
The command line syntax is:
Disable the code breakpoint associated with the given number.
This does not delete the code breakpoint. It disables the code breakpoint until you enable it again with the bena command.
This command does not work on data breakpoints, only on code breakpoints
To disable code breakpoint number 3, type:
3 bdis
Enable code breakpoint.
Select the Debug | Breakpoint... menu item, select
the breakpoint you want to disable, click on the Edit... button, set the Enabled check
box.
The command line syntax is:
Enable the code breakpoint associated with the given numbe., which was previously disabled by the bdis command.
This command does not work on data breakpoints, only on code breakpoints
To enable code breakpoint number 3, type:
3 bena
Set a temporary low-level breakpoint at a machine instruction.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Code... button to create a new code breakpoint. Select the Temporary radio button, edit the Address field,
leave the Task ID field empty or enter the string "any" and select Apply.
The command line syntax is:
Set a temporary breakpoint at the machine instruction at address addr, or the current viewing position's address if addr is not specified; the list of CrossView Pro commands cmds are executed when the breakpoint is hit.
Make sure that addr is the start address of a machine instruction, otherwise the results are unpredictable. When the breakpoint is hit execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bI command.
To set a temporary breakpoint at the current viewing position's address, type:
bI
To set a temporary breakpoint at address 100 that will print the addresses of the next five source statements, type:
100 bI {P 5}
b
,
bb
,
bB
,
bd
,
bD
,
bi
,
bt
,
bti
,
btI
,
bu
,
bU
,
Q
Set a permanent low-level breakpoint at a machine instruction.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Code... button to create a new code breakpoint. Select the Permanent radio button, edit the Address field,
leave the Task ID field empty or enter the string "any" and select Apply.
Alternatively, you can place a breakpoint in the intermixed window or assembly window by double clicking on the desired instruction.
The command line syntax is:
Set a permanent breakpoint at the machine instruction at address addr, or the current viewing position's address if addr is not specified; the list of CrossView Pro commands cmds are executed when the breakpoint is hit.
Make sure that addr is the start address of a machine instruction, otherwise the results are unpredictable. When the breakpoint is hit execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bi command.
To set a breakpoint at the current viewing position's address, type:
bi
To set a breakpoint at address 100 that will print the addresses of the next five source statements, type:
100 bi {P 5}
b
,
bb
,
bB
,
bd
,
bD
,
bI
,
bt
,
bti
,
btI
,
bu
,
bU
,
Q
Set a temporary instruction count breakpoint.
There is no mouse equivalent for this command.
The command line syntax is:
Set a temporary breakpoint after the specified count number of machine instructions have been executed. count can be any expression evaluating to a number. The list of CrossView Pro commands cmds are executed when the breakpoint is hit.
When the breakpoint is hit, execution is halted; the breakpoint is then removed. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bINST command.
To set a temporary breakpoint after execution of 5 instructions and list all global variables, type:
5 bINST {l g}
b
, bCYC
, bcyc
, binst
, bTIM
, btim
,
D
Set a permanent instruction count breakpoint.
There is no mouse equivalent for this command.
The command line syntax is:
Set a permanent breakpoint after the specified count number of machine instructions have been executed. count can be any expression evaluating to a number. The list of CrossView Pro commands cmds are executed when the breakpoint is hit.
When the breakpoint is hit, execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the binst command.
To set a permanent breakpoint after execution of 5 instructions and list all global variables, type:
5 binst {l g}
b
, bCYC
, bcyc
, bINST
, bTIM
, btim
,
D
Set a task aware code breakpoint.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Code... button to create a new code breakpoint and fill in the Task ID field.
The command line syntax is:
Set a task aware code breakpoint at the specified source line and associate the list of CrossView Pro commands cmds with the breakpoint. If no line is given, set the breakpoint at the current viewing position. The TaskId is the identification of the task as displayed in the Tasks Window or specified by the l k command.
When the breakpoint is hit, execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next, any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bt command.
To set a breakpoint for task 4 at the current viewing position, type:
bt "4"
To set a breakpoint for task 4 at line 10, which lists all global variables, type:
10 bt "4" {l g}
b
,
bb
,
bB
,
bd
,
bD
,
bi
,
bI
,
bti
,
btI
,
bu
,
bU
,
l
,
Q
Set a temporary low-level task aware breakpoint at a machine instruction.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Code... button to create a new code breakpoint and fill in the Task ID field. Select the Temporary radio button, edit the Address field and select Apply.
The command line syntax is:
Set a temporary task aware breakpoint at the machine instruction at address addr, or the current viewing position's address if addr is not specified; the list of CrossView Pro commands cmds are executed when the breakpoint is hit. The TaskId is the identification of the task as displayed in the Tasks Window or specified by the l k command.
Make sure that addr is the start address of a machine instruction, otherwise the results are unpredictable. When the breakpoint is hit execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the btI command.
To set a temporary breakpoint for task 4 at the current viewing position's address, type:
btI "4"
To set a temporary breakpoint for task 4 at address 0xF00 and print the message, type:
0xF00 btI "4" {"breakpoint triggered: address 0xF00, task 4"}
b
,
bb
,
bB
,
bd
,
bD
,
bi
,
bI
,
bt
,
bti
,
bu
,
bU
,
l
,
Q
Set a permanent low-level task aware breakpoint at a machine instruction.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. Select the New Code... button to create a new code breakpoint and fill in the Task ID field. Select the Permanent radio button, edit the Address field and select Apply.
The command line syntax is:
Set a permanent task aware breakpoint at the machine instruction at address addr, or the current viewing position's address if addr is not specified; the list of CrossView Pro commands cmds are executed when the breakpoint is hit. The TaskId is the identification of the task as displayed in the Tasks Window or specified by the l k command.
Make sure that addr is the start address of a machine instruction, otherwise the results are unpredictable. When the breakpoint is hit execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bti command.
To set a breakpoint for task 4 at the current viewing position's address, type:
bti "4"
To set a breakpoint for task 4 at address 0xF00 and print the message, type:
0xF00 bti "4" {"breakpoint triggered: address 0xF00, task 4"}
b
,
bb
,
bB
,
bd
,
bD
,
bi
,
bI
,
bt
,
btI
,
bu
,
bU
,
l
,
Q
Set a temporary time breakpoint.
There is no mouse equivalent for this command.
The command line syntax is:
Set a temporary breakpoint after the specified time (in seconds). time can be any expression evaluating to a number. The list of CrossView Pro commands cmds are executed when the breakpoint is hit.
When the breakpoint is hit, execution is halted; the breakpoint is then removed. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bTIM command.
To set a temporary breakpoint after 0.5 seconds and list all global variables, type:
0.5 bTIM {l g}
b
, bCYC
, bcyc
, bINST
, binst
, btim
,
D
Set a permanent time breakpoint.
There is no mouse equivalent for this command.
The command line syntax is:
Set a permanent breakpoint after the specified time (in seconds). time can be any expression evaluating to a number. The list of CrossView Pro commands cmds are executed when the breakpoint is hit.
When the breakpoint is hit, execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the btim command.
To set a permanent breakpoint after 0.5 seconds and list all global variables, type:
0.5 bTIM {l g}
b
, bCYC
, bcyc
, bINST
, binst
, bTIM
,
D
Set a temporary up-level breakpoint.
In the Stack Window, double-click on the desired function. Alternately, you can click on the desired function in the Stack Window and select the Debug | Stack Breakpoint | After Function Call menu item.
The command line syntax is:
This command sets a temporary up-level breakpoint immediately after the return to the function designated by the stack number stack, otherwise the currently viewed function is used. Associate the list of CrossView Pro commands commands with the breakpoint.
When the breakpoint is hit execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bU command.
Breakpoints set in the Stack Window are always temporary, meaning they will be deleted after the first time you reach them. A breakpoint set in this manner will not be visible in the Source Window.
This command is not allowed when the target runs in the background.
To set a temporary up-level breakpoint immediately after the return from the currently viewed function, type:
bU
To set a temporary up-level breakpoint immediately after the return from the function at stack level 2, type:
2 bU {1}
After stopping, this command will cause CrossView Pro to print out the function's local variables and arguments.
b
,
bb
,
bB
,
bd
,
bD
,
bi
,
bI
,
bt
,
bti
,
btI
,
bu
,
Q
Set a permanent up-level breakpoint.
In the Stack Window you can click on the desired function and select the Debug | Stack Breakpoint | After Function Call menu item. To make the stack breakpoint permanent, select the
Debug | Breakpoints... menu item, select the desired stack breakpoint,
click on the Edit...
button and select the Permanent radio button.
The command line syntax is:
Set a permanent up-level breakpoint immediately after the return to the function designated by the stack number stack, otherwise the currently viewed function is used. Associate the list of CrossView Pro commands commands with the breakpoint.
When the breakpoint is hit execution is halted. By default the current execution position, function, line number, and source statement are displayed. Next any commands associated with the breakpoint are executed. The Q command can be used to suppress the output from the bu command.
This command is not allowed when the target runs in the background.
To set an up-level breakpoint at the beginning of the currently viewed function, type:
bu
To set an up-level breakpoint at beginning of function whose stack number is 2 and, after stopping, print out the local variables and arguments of that function, type:
2 bu {l}
b
,
bb
,
bB
,
bd
,
bD
,
bi
,
bI
,
bt
,
bti
,
btI
,
bU
,
Q
Continue using the current value of the program counter.
In the Source Window, click on the
Continue execution accelerator button. You can also select the Run | Run menu item.
The command line syntax is:
If exp is specified and you are stopped at a breakpoint, then the breakpoint count is set to this value. If line is specified, a temporary breakpoint is set at that line number. Note that this temporary breakpoint will overwrite any existing breakpoint at that line.
The C command can be used in the command lists of breakpoints to resume execution automatically.
This command is not allowed when the target runs in the background.
To continue execution from the current target program counter, type:
C
To set the breakpoint's count to 4 and continue, type:
4 C
To set a temporary breakpoint at line 52 and continue, type:
C 52
Continue execution in background using the current value of the target program counter.
There is no mouse equivalent for this command.
The command line syntax is:
If exp is specified and you are stopped at a breakpoint, then the breakpoint count is set to this value. If line is specified, a temporary breakpoint is set at that line number. Note that this temporary breakpoint will overwrite any existing breakpoint at that line.
The CB command can be used in the command lists of breakpoints to resume execution automatically.
This command is not allowed when the target runs in the background.
Not available for all execution environments.
To continue execution from the current target program counter, type:
CB
To set the breakpoint's count to 4 and continue, type:
4 CB
To set a temporary breakpoint at line 52 and continue, type:
CB 52
Disable, turn off, gathering of coverage data.
Select the Run | Coverage menu item if this item was set.
The command line syntax is:
If coverage is supported by your version of CrossView Pro, this command disables the coverage system. Normally, you should disable coverage if you are not interested in the coverage results, as this will often improve the performance of the execution environment.
To disable coverage, type:
cd
Enable, turn on, gathering of coverage data.
Select the Run | Coverage menu item if this item was not set.
The command line syntax is:
If coverage is supported by your version of CrossView Pro, this command enables the coverage system. Normally, you should disable coverage if you are not interested in the coverage results, as this will often improve the performance of the execution environment.
To enable coverage, type:
ce
Display a C-execution trace.
Select the View | Trace | Source Level menu item. The Trace Window displays the most recently executed lines of code
every time program execution is stopped. CrossView Pro automatically
updates the Trace Window each time execution is halted, as long as the window
is open.
The command line syntax is:
Display a C-execution trace in the Command window, corresponding to the last number of machine instructions executed. Since the ct command relies on the emulator's trace buffer, the ct command will not be implemented on some emulators.
For each executed line of code, the Trace Window displays:
The window shows all the code executed since the the last time the program halted.
This command is not allowed when the target runs in the background.
Not available for all execution environments.
To display, in the Command window, the last C statements (corresponding to the last ten machine instructions) executed, type:
10 ct
Display a disassembled trace.
Select the View | Trace | Instruction Level menu item. The Trace Window displays the most recently executed lines of
code every time program execution is stopped. CrossView Pro automatically updates the Trace Window each time execution is halted, as long as
the window is open.
The command line syntax is:
Display a disassembled trace in the Command window, corresponding to the last number of machine instructions executed.
Since the ct i command relies on the emulator's trace buffer, the ct i command will not be implemented on some emulators.
This command is not allowed when the target runs in the background.
Not available for all execution environments.
To display in the Command window the last 20 disassembled instructions executed, type:
20 ct i
Display a raw trace.
Select the View | Trace | Raw menu item. The Trace Window displays the most recently executed lines of code every time program execution is stopped. CrossView Pro automatically
updates the Trace Window each time execution is halted, as long as the window
is open.
The command line syntax is:
Display a raw trace in the Command window, corresponding to the last number of trace frames. This command merely shows the contents of the emulator's trace buffer.
Since the ct r command relies on the emulator's trace buffer, the ct r command will not be implemented on some emulators.
This command is not allowed when the target runs in the background.
Not available for all execution environments.
To display in the Command window the last 20 trace frames, type:
20 ct r
Delete all currently defined breakpoints.
Select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. This box contains a delete function.
The command line syntax is:
D deletes all currently defined breakpoints. Dy does not ask for confirmation.
Delete a specific breakpoint.
To delete a code breakpoint directly from the C source, simply double-click the mouse on the corresponding, highlighted source line in the Source Window. The code breakpoint will be deleted and
the line will cease to be highlighted.
Otherwise, select the Debug | Breakpoints... menu item to view the Breakpoints dialog box. This box contains a delete function.
The command line syntax is:
Delete the breakpoint associated with the given number. If no number is given, delete the breakpoint at the current line. If there is no breakpoint at the current line, a B command will be executed to display all breakpoints.
Whenever a breakpoint is deleted the remaining breakpoints are renumbered starting at 0.
To delete a breakpoint at the current line, type:
d
To delete breakpoint number 3, type:
3 d
b
,
bb
,
bB
,
bd
,
bD
,
bi
,
bI
,
bt
,
bti
,
btI
,
bu
,
bU
,
B
,
D
Disassemble a range of memory.
Select the View | Source | Disassembly or View | Source | Source and Disassembly menu item to open the Disassembly or Source and Disassembly window respectively.
The command line syntax is:
Disassemble a range of memory. The output is interleaved with source lines when i is specified. You can enter valid expressions as well for address and count.
To disassemble 4 instructions starting at 3 bytes behind the start address of the function main., type:
dis main+3,#4
To disassemble memory for (initval+1) instructions, starting at the address of the function main., type:
dis main+3,#initval+1
To disassemble from 0x2000 up to and including the instruction at 0x2100 and also interleave C source lines of any function resident in that memory range, type:
dis 0x2000,0x2100,i
Download a file
Select the File | Download Image menu item to download the image part of the file to the execution environment.
The command line syntax is:
Download the image part of the specified file to the execution environment. If no file is specified, use the file specified when CrossView Pro was invoked, and from which the symbolic information was read during startup, or the file specified in either the N command or the Load Symbolic Debug Info dialog.
Downloading a file only copies an image part into target memory. It will not cause CrossView Pro to re-read symbolic information.
This command is not allowed when the target runs in the background.
To download the current file, type
dn
To download the IEEE file demo.abs, type:
dn demo.abs
To download the hex file test.hex, type:
dn test.hex
Download a file into a specific memory space
Select the File | Download Image menu item to download the image part of the file to the execution environment.
Select a memory space in the Into mem. list selection box.
The command line syntax is:
Download the image part of the specified file to the execution environment into the specified memory space mem_space. The file must contain data in hexadecimal format, that is, Intel Hex, Motorola S-records, Tektronix Hex and Extended Tektronix Hex formats are supported. If no file is specified, use the file specified when CrossView Pro was invoked, or the file specified in either the N command or the Load Symbolic Debug Info dialog.
This command is not allowed when the target runs in the background.
To download the current file into memory space CODE, type
dnm CODE
To download the IEEE file demo.abs into memory space CODE, type:
dnm CODE demo.abs
Dump a range of memory.
Select the View | Memory menu item to open the Memory Window.
The command line syntax is:
The dump command can dump memory as hexadecimal data or as C variables. You can enter valid C expressions as well for address and count. You can also dump Motorola S records or Intel hex records. Also, you can specify a filename in which the dump is to be written or appended.
style can be one of:
a c D O U X d o u x E F G e f g n P p R r s t I M
Style I dumps Intel hex and style M specifies Motorola S records output. See the Accessing Code and Data chapter and the section Formatting Expressions in the chapter Command Language for details on each of the other format styles. The R and r style are only available for targets that support the fractional type.
Mind the following:
To dump the first byte of the function main., type:
dump main
To dump the first 10 bytes of the function main as Motorola S records in the file main.sre, type:
dump main,main+10,M,main.sre
To dump the first 5 bytes of the function main. as 1 string, type:
dump main,main+10,M,main.sre,a
To append the first 5 bytes of the function main. as 1 string, type:
dump main,,c5
To dump the resulting value bytes of 'the address of main binary anded with 3', type:
dump main+1,#main&3
Establish viewing position
Select the File | Open Source... menu item to view a file. In the Source Window, click on the Find Function button to find a function, or select the Search | Browse Function... menu item.
In the Stack Window click once on the function to be examined.
The command line syntax is:
The e option invokes two distinct commands. The first version establishes the viewing position to be the first line of file, the first executable line of the function function or the current viewing position if no argument is given.
The second version establishes the viewing position to be the line at stack level stack in the stack trace. (See the t command.)
The stack e command is not allowed when the target runs in the background.
The L command is equivalent to 0 e.
To view the function main, type:
e main
To view the test file test.c, type:
e test.c
To view the call site of the current function, type:
0 e
To view the line at stack level 3, type:
3 e
Start execution on current CPU and switch to another CPU.
The command line syntax is:
Start execution on the current CPU and switch to CPU cpu_number.
This command can only be issued when the currently selected CPU is in debug mode.
To start execution on the current CPU and select the CPU indicated by number 1, type:
1 eC
Select a CPU or show current CPU number.
The command line syntax is:
The ec command allows you to select a CPU in your current Execution Environment if your target has multi-CPU support.
This command can only be issued when the currently selected CPU is in debug mode.
To view the current CPU selection, type:
ec
To select the CPU indicated by number 1, type:
1 ec
Display the definition of a macro name without executing the macro.
You can view the definition of a macro by selecting the Options | Macro Definitions... menu item to view the Macro Definitions dialog box.
The command line syntax is:
Perform macro expansion on text without executing. This allows you to see how a macro is expanded. It is particularly informative when macros call other macros.
If you type:
echo macro(3)
CrossView Pro will display the expansion of macro(3).
Establish viewing position at a specified address.
Select the Search | Find Address... menu item.
The command line syntax is:
The ei command establishes the viewing position to be at the instruction specified.
This command is useful for viewing some code in the assembly window, without changing the program counter, since the execution position is not changed.
To view the current viewing position, type:
ei
To view the instruction at address 0x100, type:
0x100 ei
Select the specified task's context.
In the Tasks Window click once on the task to be examined.
The command line syntax is:
Select the specified task's context. The TaskId is the identification of the task as displayed in the Tasks Window or specified by the l k command.
The current execution position, function, line number, and source statement are displayed. All other windows, except for the Kernel Windows, are updated accordingly.
Subsequent CrossView Pro commands use the context of the selected task. For example, the t command shows a stack trace of the selected task.
To select task 4, type:
et "4"
Set default address printing format
Their is no mouse equivalent for this command.
The command line syntax is:
Set the default address printing format, using a printf format specification.
If there is no argument, the format defaults to %x, which prints an address in hexadecimal.
This command is intended to allow users to see memory addresses in decimal, octal or a format of their choosing.
To display addresses in octal, type:
f "%o"
To display addresses in hex, type:
f
Close a stream previously opened by FSS_stdio_open.
The command line syntax is:
Close the stream indicated by streamnumber.
To close stream 1, type:
FSS_stdio_close 1
FSS_stdio_open.
Section File System Simulation in chapter Special Features.
Redirect the output of a stream to a file.
The command line syntax is:
Redirect the stream indicated by streamnumber to the file filename. rwdirection can be an r for read-only, w for writable, or rw for read/write.
To redirect stream 1 (output, so w for writable) to the file myfile.out, type:
FSS_stdio_open myfile.out,w,1
The following command is used to close the stream.
FSS_stdio_close 1
FSS_stdio_close.
Section File System Simulation in chapter Special Features.
Change the program counter to a new execution position.
Click on a source line and select the
Run | Jump to Cursor menu item.
The command line syntax is:
This command changes the program counter so that line becomes the current execution position. Line must be a line in the current function.
This command changes only the program counter. It does not cause the target to begin execution.
Exercise caution when changing the execution position. Oftentimes, each line of C source code is compiled into several machine language instructions. Moving the program counter to a new address in the middle of a series of related assembly instructions is sometimes risky. Moreover, even though you change the program counter, registers and variables may not have the expected values if parts of the code are bypassed.
This command is not allowed when the target runs in the background.
To change the program counter so that the next instruction to be executed corresponds to line 127, type:
g 127
Change the program counter to a new execution position.
Click on a source line and select the
Run | Jump to Cursor menu item.
The command line syntax is:
This command changes the program counter so that address becomes the current execution position.
This command changes only the program counter. It does not cause the target to begin execution.
Exercise caution when changing the execution position. The Jump to Cursor menu item is not available in the source lines window mode to prevent problems by skipping pieces of C code which are required to be executed. Moving the program counter to a new address in the middle of a series of related assembly instructions is sometimes risky. Moreover, even though you change the program counter, registers and variables may not have the expected values if parts of the code are bypassed.
This command is not allowed when the target runs in the background.
To change the program counter so that the next instruction to be executed corresponds to address 0x0800, type:
0x0800 gi
Print out information about the state of CrossView Pro.
There is no mouse equivalent for this command.
The command line syntax is:
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.
Conditional command execution.
There is no mouse equivalent for this function.
The command line syntax is:
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.
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.
Other commands:
expression - ^
L - Z