2.3.131. STEPLINE

Executes one or more program statements (high-level step), and steps into procedure and function calls.

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

STEPLINE [value]

STEPLINE =starting_address [,value]

where:

starting_address

Specifies where execution is to begin. If you do not supply this parameter execution continues from the current 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 statement or source line is executed. All lines that contain executable code, including those in called functions, count towards the number of lines executed.

Description

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

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

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

  • describes only the external functions in the code, then STEPLINE steps by machine instruction.

STEPLINE steps into procedure or function calls. When line or statement debug information is available, the transition from the call site to the first executable statement of the called code counts as one step. If source debug information is available for some but not all of the functions in the program, STEPLINE steps to the next source line, whether this is within a called function, for example, from program entry-point to main(), or outside of the current function, for example from an assembler library routine PC to an enclosing source function.

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 STEPLINE command cannot be used in a macro if the macro is attached to another entity, such as a breakpoint.

Examples

The following examples show how to use STEPLINE:

stepline

Step the program by one statement.

stepline 5

Step the program five statements.

s =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