aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-05-14 02:11:53 +0000
committerFred Fish <fnf@specifix.com>1996-05-14 02:11:53 +0000
commit572977a5525c76cd50ef6e7383134f7313467d5d (patch)
treeaa9def187b04897e0ddf824de6d2b009c4446d49 /gdb
parentefb33f6b0724ff4bf615ae49a749de0aae8ee7df (diff)
downloadgdb-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')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/gdbtk.c4
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cba7fb3..e74f363 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+start-sanitize-gdbtk
+Mon May 13 13:43:25 1996 Fred Fish <fnf@cygnus.com>
+
+ * gdbtk.c (tk_command): Catch case where no argument is given
+ since this will cause the tcl interpreter to dump core.
+end-sanitize-gdbtk
+
Mon May 13 17:40:58 1996 Jeffrey A Law (law@cygnus.com)
* top.c (execute_control_command, case while_control): Allow
@@ -75,7 +82,9 @@ Wed May 8 20:33:24 1996 Fred Fish <fnf@cygnus.com>
(enable_delete_breakpoint): Ditto.
* breakpoint.h (clear_momentary_breakpoints): Remove prototype.
* symtab.c (find_pc_line): Improve comments.
+start-sanitize-gdbtk
* gdbtk.c: Fix a couple of misspellings.
+end-sanitize-gdbtk
* xcoffread.c: Ditto.
Tue May 7 18:37:06 1996 Stan Shebs <shebs@andros.cygnus.com>
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);