define

This command enables you to derive new user-defined commands from existing commands. User-defined commands accept arguments separated by whitespace. You can use the arguments in expressions by using $arg0...$argn, for example:

print 4+$arg0      # add 4 to the first argument and print result

Show/hideSyntax

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.

Note

Existing built in commands cannot be redefined.

Show/hideExample

Example 19. define

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

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0452K
Non-ConfidentialID071912