| |||
| Home > Setting Breakpoints > Setting breakpoints for location-specific data values > Breaking in a function or range that also depends on a data value | |||
To set a breakpoint in a function or range that also depends on a data value:
Connect to the target.
Load an executable image.
This procedure uses the dhrystone image provided in the RVDS examples.
Select Debug → Breakpoints → Hardware → HW While in function/range, Break if X... from the Code window main menu. The HW While in function/range, Break if X dialog box is displayed. Figure 11.36 shows an example:
Specify the location for the first breakpoint unit, which can be:
an address range
a function.
For example:
@dhrystone\\DHRY_2\Proc_8
For the second breakpoint unit, choose the type of hardware breakpoint that you want to set. The default is HW Access.
Enter the data address expression that must be accessed to activate the breakpoint.
For example, enter &Int_Glob.
If you also want to match on a specific data value:
Select the And if Data Value matches check box.
Enter the required data value in the data field.
Click OK to set up the breakpoint units and close the dialog box.
This creates a breakpoint chain. Figure 11.37 shows an example. Chained breakpoints activate only when all breakpoint units have activated.