diff options
author | Tom Tromey <tromey@redhat.com> | 1996-01-24 06:27:59 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 1996-01-24 06:27:59 +0000 |
commit | 4e327047ce195fe703b5ee64badca4631883cbe0 (patch) | |
tree | 6fbc7ddd69145ab5acaa9497e766d5d47f0fee1e /gdb/gdbtk.c | |
parent | 5a8d8b8db7f824edb04c5ca2692dd644bc943da8 (diff) | |
download | gdb-4e327047ce195fe703b5ee64badca4631883cbe0.zip gdb-4e327047ce195fe703b5ee64badca4631883cbe0.tar.gz gdb-4e327047ce195fe703b5ee64badca4631883cbe0.tar.bz2 |
Updated for Tcl 7.5a2 and Tk 4.1a2
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r-- | gdb/gdbtk.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c index dd99f69..aaf9193 100644 --- a/gdb/gdbtk.c +++ b/gdb/gdbtk.c @@ -153,11 +153,16 @@ gdbtk_query (query, args) char *query; va_list args; { - char buf[200]; + char buf[200], *merge[2]; + char *command; long val; vsprintf (buf, query, args); - Tcl_VarEval (interp, "gdbtk_tcl_query ", "{", buf, "}", NULL); + merge[0] = "gdbtk_tcl_query"; + merge[1] = buf; + command = Tcl_Merge (2, merge); + Tcl_Eval (interp, command); + free (command); val = atol (interp->result); return val; @@ -277,6 +282,8 @@ breakpoint_notify(b, action) if (b->type != bp_breakpoint) return; + /* We ensure that ACTION contains no special Tcl characters, so we + can do this. */ sprintf (buf, "gdbtk_tcl_breakpoint %s %d", action, b->number); v = Tcl_Eval (interp, buf); @@ -680,7 +687,7 @@ call_wrapper (clientData, interp, argc, argv) /* In case of an error, we may need to force the GUI into idle mode because gdbtk_call_command may have bombed out while in the command routine. */ - Tcl_VarEval (interp, "gdbtk_tcl_idle", NULL); + Tcl_Eval (interp, "gdbtk_tcl_idle"); } do_cleanups (ALL_CLEANUPS); @@ -1069,9 +1076,9 @@ gdbtk_call_command (cmdblk, arg, from_tty) { if (cmdblk->class == class_run) { - Tcl_VarEval (interp, "gdbtk_tcl_busy", NULL); + Tcl_Eval (interp, "gdbtk_tcl_busy"); (*cmdblk->function.cfunc)(arg, from_tty); - Tcl_VarEval (interp, "gdbtk_tcl_idle", NULL); + Tcl_Eval (interp, "gdbtk_tcl_idle"); } else (*cmdblk->function.cfunc)(arg, from_tty); |