2.3.3. ALIAS

Enables you to manipulate command aliases. Aliases are new debugger commands constructed from (optionally, parts of) existing debugger commands or macros.


ALIAS [alias_name [=[definition]]]



Names your new debugger command. This name is accepted as a legal debugger command name.

An optional asterisk * embedded in the name indicates that the parts of the name that follow are not required, so your command can be abbreviated.


Defines the replacement string that is substituted in place of alias_name whenever alias_name is invoked.

The definition normally contains macro invocations or debugger internal commands, or parts of such commands. However, any string of legal debugger characters is accepted.

Using $* within a definition inserts the command-line parameters to the alias in the expansion. By default, parameters are appended to the alias when command expansion occurs.


The ALIAS command can create, list, or delete new debugger commands. The building blocks are existing debugger commands and macros and, optionally, specific parameters. You can use ALIAS to define either:

  • a new name (for example, one that is shorter or easier to remember) for an existing command

  • a command that defines fixed parameters for an existing command.

ALIAS can only substitute one command for another. If you require a multiple command alias, use the MACRO command instead.

Enter ALIAS without parameters to display a list of the defined alias commands in the order in which they were added.

You can name your alias using almost any sequence of letters or numbers. However, when a command is entered the debugger searches for internal debugger commands before it searches for aliases. Therefore, you must ensure that you do not use an alias name that is the same as an internal debugger command. The name priorities are as follows:

  1. Debugger internal command, or defined abbreviation of command

  2. Defined alias names, and the defined abbreviations of alias names

  3. Macro names.

You can place alias command arguments in a specific position in the expanded debugger command by inserting the sequence $* where the parameters to the command alias must appear.

Rules for the ALIAS command

The following rules apply to the use of the ALIAS command:

  • ALIAS runs asynchronously unless it is called within a macro.

  • alias_name must not exist at the time it is added. To change the definition of an alias, first define the alias equal to the nothing (alias nm=) to delete it and then add it again.

  • If a debugger command has the same name as an alias, the debugger command is the one that is executed.

  • Alias names are always matched before macros names.

  • If two alias abbreviations or an alias and an abbreviation match, the first alias added during the current session is always used.

  • An alias definition must be defined in terms of predefined debugger commands or macro names.

  • An alias definition can reference debugger commands and macros.


The following examples show how to use ALIAS:

alias showf*ile =dtfile ;99

Defines a command called SHOWFILE that can be abbreviated to SHOWF, that is equivalent to the DTFILE command with its output directed to window number 99.

alias dub =dump /b

Defines a command called DUB, with no abbreviation, that expands to the DUMP command in byte mode (/b).

dub 0x20

Calls the alias dub to print out memory in bytes from address 0x20. This alias invocation is exactly the same as typing:

dump /b 0x20
alias bpc =breakexecution,continue,message:{Break} $* ;DoCheck()

Defines a command called BPC, with no abbreviation, that expands to the breakexecution command with specific parameters and trigger macro DoCheck(). It must be invoked with the address to break at as a parameter:

bpc \MAIN_C\#15

This is equivalent to typing the command:

breakexecution,continue,message:{Break} \MAIN_C\#15 ;DoCheck()

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N