| |||
| Home > RealView Debugger Commands > Alphabetical command reference > GO | |||
Executes the target program starting from the current PC or from a specified address.
[=GOstart_address[,]] [ {temp_break [%%passcount][,]
}... [;macro-call]]
where:
start_addressSpecifies an address at which execution is to begin.
temp_breakActs as a temporary instruction breakpoint, which is automatically cleared when program execution is suspended.
passcountSpecifies the number of times the address
is executed before the command actually halts.temp_break
macro_nameInvokes a macro if a temporary break occurs. The macro return value determines whether execution continues or not. If there is an attached macro, execution continues when the macro returns a non-zero value. If the macro returns zero, execution halts.
This command executes the target program starting from the
current PC or from a specified address. The command also causes
program execution to resume after it has been suspended. Execution
continues until a permanent or temporary breakpoint, an error, or
a halt instruction is encountered. You can also use the HALT and STOP commands
to halt execution.
RealView Debugger continues to accept commands after GO has been entered. Commands that cannot be completed while the target is running (synchronous commands) are delayed until the target is next stopped. For more information about the limitations the Debug Interface imposes while the target is running, see your target documentation.
You can specify a temporary instruction breakpoint with the GO command, providing similar functionality to the Go to Cursor GUI command. The temporary breakpoint is removed as soon as the target stops, whether the breakpoint was hit or not. You can also associate a macro to be run that can also determine whether the target remains stopped at the breakpoint.
The GO command runs synchronously.
If you are working with OS-aware images, and the current connection is running in RSD mode, then the GO command starts the current thread.
When specifying a start address you must be careful to make sure that the processor stack has been set up and remains balanced.
The GO command cannot be used in a macro if the macro is attached to another entity, such as a breakpoint.
The following examples show how to use GO:
GOStart or resume executing the target program from the current PC.
GO @1Resume executing the target program from the current PC, stopping when the current function returns to its caller.
GO write_io; until (x==2)Resume executing the target program from the current
PC, and stop when x has the value 2.
go \DHRY_1\#149:3 ;countHits()Set a temporary breakpoint at line 149 in dhry_1.c,
start executing the dhrystone image, and run the countHits() macro
when the temporary breakpoint is hit. You might use this in a script
as follows:
add int hitCount
define /R int countHits()
{
if (@PC == 0x8480)
hitCount++;
return 1;
}
.
go \DHRY_1\#149:3 ;countHits()
// Display the hit count before deleting the variable
printval hitCount
delete hitCount
the following in the RealView Debugger User Guide:
the following in the RealView Debugger RTOS Guide: