diff options
author | Jeff Law <law@redhat.com> | 1994-12-30 19:53:39 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-12-30 19:53:39 +0000 |
commit | 0f8cdd9ba42a878a78380901afe4e2031935ca1f (patch) | |
tree | 0fdb4871d671a2f893846c1c3ae0f84f82647b5d /gdb/NEWS | |
parent | 15edf5253b529490f705971833a475269fa6b3b3 (diff) | |
download | gdb-0f8cdd9ba42a878a78380901afe4e2031935ca1f.zip gdb-0f8cdd9ba42a878a78380901afe4e2031935ca1f.tar.gz gdb-0f8cdd9ba42a878a78380901afe4e2031935ca1f.tar.bz2 |
* Allow up to 10 whitespace separated arguments to user defined
commands.
* top.c (struct user_args): Structure for holding arguments to
user defined commands.
(print_command_line): Delete unused "tmp_chain" variable. Clean
up flow control by having cases exit in the same manner.
Before executing a command or evaluating an expression, substitute
the current $arg0..$arg9 values if the command/expression uses them.
(arg_cleanup): New function.
(setup_user_args, locate_arg, insert_args): Likewise.
(execute_user_command): Allow arguments to user defined commands.
* Allow if/while commands to be used within a breakpoint command
list.
* breakpoint.c (bpstat_do_actions): Call execute_control_command
rather than execute_command (passes entire command structure rather
than just the command line text).
(breakpoint_1): Use "print_command_line" to print a breakpoint
command line (including control structures).
* gdbcmd.h (execute_control_command): Provide extern decl.
(print_command_line): Likewise.
* top.c (execute_control_command): No longer static.
(print_command_line): New function to recursively print a command
line, including control structures.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,6 +1,19 @@ What has changed since GDB-3.5? (Organized release by release) +* User commands may accept up to 10 arguments separated by whitespace. +Arguments are accessed within the user command via $arg0..$arg0. +A trivial example: +define adder + print $arg0 + $arg1 + $arg2 + +To execute the command use: +adder 1 2 3 + +Defines the command "adder" which prints the sum of its three arguments. +Note the arguments are text substitutions, so they may reference variables, +use complex expressions, or even perform inferior function calls. + * New "if" and "while" commands. This makes it possible to write somewhat more sophisticated user-defined commands. |