break-script

This command assigns a script file to a specific breakpoint. When the breakpoint is triggered then the script is executed.

Show/hideSyntax

break-script number [filename]

Where:

number

Specifies the breakpoint number. This is the number assigned by the debugger when it is set. You can use info breakpoints to display the number and status of all breakpoints and watchpoints.

filename

Specifies the script file that you want to execute when the specified breakpoint is triggered. If filename is not specified then the currently assigned filename is removed from the breakpoint.

Show/hideUsage

Be aware of the following when using scripts with breakpoints:

  • You must not assign a script to a breakpoint that has sub-breakpoints. If you do, the debugger attempts to execute the script for each sub-breakpoint. If this happens, an error message is displayed.

  • Take care with the commands you use in a script that is attached to a breakpoint. For example, if you use the quit command in a script, the debugger disconnects from the target when the breakpoint is hit.

  • If you put the continue command at the end of a script, this has the same effect as setting the Continue Execution checkbox on the Breakpoint Properties dialog box.

Show/hideExample

Example 11. break-script

break-script 1 myScript.ds      # Run myScript.ds when breakpoint 1 is triggered

Show/hideSee also

Copyright © 2010, 2011 ARM. All rights reserved.ARM DUI 0452G
Non-ConfidentialID092311