aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2000-03-25 15:32:19 +0000
committerDaniel Berlin <dberlin@dberlin.org>2000-03-25 15:32:19 +0000
commit1c689132b1c0864f109d63b2f6a32a10d2da2ad2 (patch)
treef9d1aae6e4b2aa2bf49ff5e9d0575788ea7752d8 /gdb/maint.c
parent8399535b5b1f0e7752947d4c67369c88b73b55c1 (diff)
downloadgdb-1c689132b1c0864f109d63b2f6a32a10d2da2ad2.zip
gdb-1c689132b1c0864f109d63b2f6a32a10d2da2ad2.tar.gz
gdb-1c689132b1c0864f109d63b2f6a32a10d2da2ad2.tar.bz2
Fix maintenance deprecate crash, add testcase
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 7003c02..dd974b7 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -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))
{