diff options
author | Fred Fish <fnf@specifix.com> | 1996-05-14 02:11:53 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-05-14 02:11:53 +0000 |
commit | 572977a5525c76cd50ef6e7383134f7313467d5d (patch) | |
tree | aa9def187b04897e0ddf824de6d2b009c4446d49 /gdb/gdbtk.c | |
parent | efb33f6b0724ff4bf615ae49a749de0aae8ee7df (diff) | |
download | gdb-572977a5525c76cd50ef6e7383134f7313467d5d.zip gdb-572977a5525c76cd50ef6e7383134f7313467d5d.tar.gz gdb-572977a5525c76cd50ef6e7383134f7313467d5d.tar.bz2 |
* gdbtk.c (tk_command): Catch case where no argument is given
since this will cause the tcl interpreter to dump core.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r-- | gdb/gdbtk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index bf5c251..08b483e 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -1009,6 +1009,10 @@ tk_command (cmd, from_tty) char *result; struct cleanup *old_chain; + /* Catch case of no argument, since this will make the tcl interpreter dump core. */ + if (cmd == NULL) + error_no_arg ("tcl command to interpret"); + retval = Tcl_Eval (interp, cmd); result = strdup (interp->result); |