Fix maintenance deprecate crash, add testcase
This commit is contained in:
parent
8399535b5b
commit
1c689132b1
3 changed files with 129 additions and 125 deletions
|
@ -57,6 +57,8 @@ static void maintenance_info_sections PARAMS ((char *, int));
|
|||
|
||||
static void maintenance_print_command PARAMS ((char *, int));
|
||||
|
||||
static void maintenance_do_deprecate (char *, int);
|
||||
|
||||
/* Set this to the maximum number of seconds to wait instead of waiting forever
|
||||
in target_wait(). If this timer times out, then it generates an error and
|
||||
the command is aborted. This replaces most of the need for timeouts in the
|
||||
|
@ -411,6 +413,8 @@ maintenance_do_deprecate (char *text, int deprecate)
|
|||
int len;
|
||||
char *replacement = NULL;
|
||||
|
||||
if (text == NULL)
|
||||
return;
|
||||
|
||||
if (!lookup_cmd_composition (text, &alias, &prefix_cmd, &cmd))
|
||||
{
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2000-03-25 Daniel Berlin <dan@cgsoftware.com>
|
||||
|
||||
* gdb.base/commands.exp (deprecated_command_test): Add test for
|
||||
deprecate with no arguments.
|
||||
|
||||
2000-03-24 Jonathan Larmour <jlarmour@redhat.co.uk>
|
||||
|
||||
* gdb.base/break.exp: Add new test for setting breakpoints on
|
||||
|
|
|
@ -397,6 +397,7 @@ proc deprecated_command_test {} {
|
|||
gdb_test "maintenance deprecate set endian big" "" "deprecate long comamnd"
|
||||
gdb_test "set endian big" "Warning: command 'set endian big' is deprecated.*No alternative known.*" "long command deprecated with no alternative."
|
||||
|
||||
gdb_test "maintenance deprecate" "\"maintenance deprecate\".*" "deprecate with no arguments"
|
||||
}
|
||||
|
||||
|
||||
|
@ -413,9 +414,3 @@ user_defined_command_test
|
|||
watchpoint_command_test
|
||||
test_command_prompt_position
|
||||
deprecated_command_test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue