2.3.27. CONTEXT

The CONTEXT command displays the current context.

Syntax

CONTEXT [/F]

where:

/F

Displays all contexts (roots).

Description

The CONTEXT command displays the current context. If you are using the GUI, then the context is displayed in the Output pane. The context includes the current root, module, procedure, and line. The context must be in a module with high-level debug information for the line number to be displayed.

CONTEXT runs asynchronously unless it is run in a macro.

Examples

The following example shows how to use CONTEXT using the dhrystone application:

> context
At the PC: (0x00008000): ENTRY\__main
Source view: DHRY_1\main Line 78

This demonstrates the case where the PC and the current source view do not correspond. In this case, the editor is displaying the beginning of the function main() at line 78, while the pc is at location 0x8000 in the __main(), the routine that calls main().

The following example sets a breakpoint in main() and runs to that breakpoint:

> bi \DHRY_1\#98:0
> go
Stopped at 0x000084D0 due to SW Instruction Breakpoint
Stopped at 0x000084D0: DHRY_1\main Line 98
> con
At the PC: (0x000084D0): DHRY_1\main Line 98

Now the PC and the source view are synchronized, the form of the message changes.

Finally, the /F form, of CONTEXT displays the Root: specification shown in the following example (see Chapter 1 Working with the CLI for more information on root context specifications):

> CONTEXT/F
At the PC: (0x000084D0): DHRY_1_1\DHRY_1_C\main Line 98
Root: @dhrystone\\ [SCOPE]

See also

The following commands provide similar or related functionality:

Copyright © 2005, 2006 ARM Limited. All rights reserved.ARM DUI 0284C
Non-Confidential