2.3.133. STEPO

Executes a specified number of lines (high-level step), and completely executes functions.

Note

If you perform a high-level step in code for which there is no source available, RealView Debugger attempts to step up the call stack until a location is reached that has source available.

Syntax

STEPO [={starting_address [,value] | value}]

where:

starting_address

Specifies where execution is to begin. If you do not supply this parameter execution begins at the address currently defined by the PC.

Note

Specifying an address is equivalent to directly modifying the PC. Do not specify a starting address unless you are sure of the consequences to the processor and program state.

value

Specifies the number of lines of source code to be executed. If you do not supply this parameter a single line is executed. All lines in the current program count towards the number of lines executed. A call to a function causes the whole of the function to be executed, and counts as one line.

Description

The STEPO command executes one or more source program units. If the debug information in the executable:

  • describes the boundaries of program statements, then STEPO steps by program statement

  • describes the source file line for each machine instruction, then STEPO steps by source line

  • describes only the function entry points in the code, then STEPO steps by machine instruction.

If a statement calls one or more procedures or functions, they are all executed to completion as part of the execution of the statement.

If the step starts in the middle of a statement (for example, because you have used STEPINSTR) a single step takes you to the start of the next statement.

If you compile high level language code with debug information and with optimization enabled, for example using armcc -g -O1, it is possible that:

  • source code is not executed in the order it appears in the source file

  • some source program statements are not executed because the optimizer has deduced they are redundant

  • some source program statements appear to be not executed because the optimizer has indivisibly combined them with other statements

  • statements are executed fewer times than you expect

  • it might not be possible to breakpoint or step some statements, because the machine instructions are shared with other source code.

These, and other effects, are the normal consequences of compiler optimization.

For assembler source files assembled with debug information, a single assembly statement consists of;

  • an explicitly written assembly instruction

  • an assembler pseudo-operation resulting in machine instructions, even if several instructions are generated, for example an ARM ADR instruction

  • a call of an assembler macro that generates machine instructions.

It is normal to use this instruction in conjunction with the disassembly mode of the source window, selected using the MODE command.

The STEPO command cannot be used in a macro if the macro is attached to another entity, such as a breakpoint.

Alias

SO is an alias of STEPO.

Examples

The following examples show how to use STEPO:

stepo

Step the program by one statement.

so 5

Step the program five statements.

so =0x8000,5

Starting at address 0x8000, step the program five statements.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111