B.3.2 CADIBptCondition_t and CADIBptConditionOperator_t

This section describes the CADIBptCondition_t and CADIBptConditionOperator_t structs.

Breakpoint comparison operations only apply to CADI_BPT_MEMORY and CADI_BPT_REGISTER breakpoints. Other breakpoints must always specify CADI_BPT_COND_UNCONDITIONAL as conditionOperator. Breakpoint conditions are always applied as a secondary condition after the primary condition of the breakpoint that depends on the breakpoint type and the trigger type.

If the useFormalCondition is set, CADI_BPT_PROGRAM, CADI_BPT_PROGRAM_RANGE, CADI_BPT_INST_STEP, CADI_BPT_EXCEPTION must obey the ignoreCount. However, the debugger must ensure that conditionOperator is CADI_BPT_COND_UNCONDITIONAL, otherwise the behavior is undefined.

struct CADIBptCondition_t
public: // methods
                     CADIBptConditionOperator_t conditionOperator = CADI_BPT_COND_UNCONDITIONAL,
                     int64_t comparisonValue = 0,
                     uint32_t threadID = 0,
                     uint32_t ignoreCount = 0,
                     uint32_t bitwidth = 0) :
public: // data
   CADIBptConditionOperator_t   conditionOperator; 
   int64_t                      comparisonValue;  
   uint32_t                     threadID; 
   uint32_t                      ignoreCount;  
   uint32_t                      bitwidth; 
specifies the types of condition that determine whether a breakpoint matches. It specifies how the fields comparisonValue and threadID are interpreted. If this field is set to a value that the target does not support, targets must return CADI_STATUS_ArgNotSupported from CADIBptSet().
if the bottom 30-bits of conditionOperator have a value other than CADI_BPT_COND_UNCONDITIONAL (0), then they specify how to compare comparisonValue with the value associated with the breakpoint hit. See the list of the enumerated condition values for CADIBptConditionOperator_t.
if bit 31 of conditionOperator is set (CADI_BPT_COND_THREADID), then this field specifies that the breakpoint only hits if threadID matches the current thread. It is up to the target to specify how to match thread IDs. Targets must use the extendedTargetFeatures register to identify the mechanism being used. (See the CADITargetFeatures_t struct under the nExtendedTargetFeaturesRegNum entry.) One possible mechanism for ARM targets is to match against CONTEXTIDR. If threadID is nonzero and bit 31 of conditionOperator is not set, targets must return CADI_STATUS_ArgNotSupported from CADIBptSet().
is the number of breaks to ignore.
is the width of comparison value.

The conditional breakpoint operations are enumerated in CADIBptConditionOperator_t.

enum CADIBptConditionOperator_t
    CADI_BPT_COND_UNCONDITIONAL,  // Normal breakpoint, always break, no additional condition.
    CADI_BPT_COND_EQUALS,         // Only break if value == comparisionValue (unsigned comparison).
    CADI_BPT_COND_NOT_EQUALS,     // Only break if value != comparisionValue (unsigned comparison).

        // signed comparison
    CADI_BPT_COND_GREATER_THAN_SIGNED,            // Only break if value >  comparisionValue.
    CADI_BPT_COND_GREATER_THAN_OR_EQUALS_SIGNED,  // Only break if value >= comparisionValue.
    CADI_BPT_COND_LESS_THAN_SIGNED,               // Only break if value <  comparisionValue.
    CADI_BPT_COND_LESS_THAN_OR_EQUALS_SIGNED,     // Only break if value <= comparisionValue.

        // unsigned comparison
    CADI_BPT_COND_GREATER_THAN_UNSIGNED,             // Only break if value >  comparisionValue.
    CADI_BPT_COND_GREATER_THAN_OR_EQUALS_UNSIGNED,   // Only break if value >= comparisionValue.
    CADI_BPT_COND_LESS_THAN_UNSIGNED,                // Only break if value <  comparisionValue.
    CADI_BPT_COND_LESS_THAN_OR_EQUALS_UNSIGNED,      // Only break if value <= comparisionValue.

    CADI_BPT_COND_ENUM_COUNT,                        // Not a valid condition operator.

        // legacy support, same as signed comparison.
    CADI_BPT_COND_THREADID = 0x80000000,   // Thread-aware breakpoint.

        // these are no breakpoint conditions:
Non-ConfidentialPDF file icon PDF versionARM 100963_0200_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.