SourcePoint AMD Help

Table of Contents

cause

Display the reason for the last target stop.

Syntax

[[px]] cause

Where:

[px]

is the viewpoint override, including punctuation ([]), specifying that the viewpoint is temporarily set to processor x of the boundary scan chain. ย The processor can be specified as px (where x is the processor ID), or an alias you have defined for a given processor ID. ALL cannot be used as a viewpoint override.

Discussion

The cause control variable returns a string indicating the reason for the last target stop. SourcePoint usually can determine which code breakpoint caused execution to stop. This is not always possible with data breakpoints.

The information is also displayed automatically in the SourcePoint Status Bar immediately after the stop (although it will be overwritten by later status information). Being able to determine the cause of a target stop (which breakpoint hit), enables the use of breakpoint macros (e.g., a macro file can be executed whenever a specific breakpoint occurs).

Possible return values include:

"Unknown reason"
"User stop"
"Step completed"
"Target reset"
"Processor breakpoint @ 00010004"
"Software breakpoint @ 00010008"

Example 1

To display the reason for the last target stop:

Command input:

cause

Result:

Software breakpoint @ 00010008

Example 2

To assign the cause string to a debug variable:

Command input:

define nstring strReason=cause

strReason

Result:

Software breakpoint @ 00001020

ย 

ย