1.3.22 define

Enables you to derive new user-defined commands from existing commands.

User-defined commands accept arguments separated by whitespace.

Syntax

define cmd
    ...
end

Where:

cmd

Specifies the command name followed by one or more debugger commands. Enter each debugger command on a new line and terminate the define command by using the end command. You can use arguments by using $arg0...$argn, or $argv for all arguments.

Note:

Existing built in commands cannot be redefined.

Example 1-25 Examples

# Define add-args command to print sum of first 3 arguments
define add-args
    print $arg0+$arg1+$arg2
end

# Define echo-all command to echo all arguments
define echo-all
    echo $argv
end
Non-ConfidentialPDF file icon PDF versionARM DUI0452Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.