
Defining Your Own Command Strings
4-17
Entering and Using Commands
4.5
Defining Your Own Command Strings
The debugger provides a shorthand method of entering often-used com-
mands or command sequences. This processing is called
aliasing. Aliasing
enables you to define an alias name for the command(s) and then enter the
alias name as if it were a debugger command.
To do this, use the ALIAS command. The syntax for this command is:
alias
[
alias name [, “command string”] ]
The primary purpose of the ALIAS command is to associate the
alias name
with the debugger command you’ve supplied as the
command string. How-
ever, the ALIAS command is versatile and can be used in several ways:
-
Aliasing several commands. The
command string can contain more
than one debugger command — just separate the commands with semico-
lons. Be sure to enclose the
command string in quotes.
For example, suppose you always began a debugging session by loading
the same object file, displaying the same C source file, and running to a
certain point in the code. You could define an alias to do all these tasks at
once:
alias init,”load test.out;file source.c;go main”
Now you could enter init instead of the three commands listed within the
quote marks.
-
Supplying parameters to the command string. The
command string
can define parameters that you’ll supply later. To do this, use a percent
sign and a number (%1) to represent the parameter. The numbers should
be consecutive (%1, %2, %3), unless you plan to reuse the same parame-
ter value for multiple commands.
For example, suppose that every time you filled an area of memory, you
also wanted to display that block in the MEMORY window:
alias mfil,”fill %1, %2, %3,;mem %1”
You could enter:
mfil 0x2ff80,0x18,0x1122
In this example, the first value (0x2ff80) is substituted for the first FILL pa-
rameter and the MEM parameter (%1). The second and third values are
substituted for the second and third FILL parameters (%2 and %3).
Содержание TMS320C6 Series
Страница 10: ...x ...
Страница 20: ...xx ...
Страница 118: ...4 20 ...
Страница 144: ...6 16 ...
Страница 164: ...7 20 ...
Страница 170: ...8 6 ...
Страница 284: ...B 18 ...
Страница 290: ...C 6 ...