OSDN Git Service

* generic/gdbtk-hooks.c (gdbtk_call_command): Make a null
authorKeith Seitz <keiths@redhat.com>
Wed, 6 Nov 2002 14:22:28 +0000 (14:22 +0000)
committerKeith Seitz <keiths@redhat.com>
Wed, 6 Nov 2002 14:22:28 +0000 (14:22 +0000)
        cleanup and run it after every issued gdb command. Apparently
        some commands depend on this. [This should really be part of
        main gdb...]

gdb/gdbtk/ChangeLog
gdb/gdbtk/generic/gdbtk-hooks.c

index a988c73..0a20dc0 100644 (file)
@@ -1,3 +1,10 @@
+2002-11-06  Keith Seitz  <keiths@redhat.com>
+
+       * generic/gdbtk-hooks.c (gdbtk_call_command): Make a null
+       cleanup and run it after every issued gdb command. Apparently
+       some commands depend on this. [This should really be part of
+       main gdb...]
+
 2002-10-15  Martin M. Hunt  <hunt@redhat.com>
 
        * library/tclIndex: Rebuilt.
index 8f41b28..d947c82 100644 (file)
@@ -519,6 +519,9 @@ static void
 gdbtk_call_command (struct cmd_list_element *cmdblk,
                    char *arg, int from_tty)
 {
+  struct cleanup *old_chain;
+
+  old_chain = make_cleanup (null_cleanup, 0);
   running_now = 0;
   if (cmdblk->class == class_run || cmdblk->class == class_trace)
     {
@@ -533,6 +536,8 @@ gdbtk_call_command (struct cmd_list_element *cmdblk,
     }
   else
     cmd_func (cmdblk, arg, from_tty);
+
+  do_cleanups (old_chain);
 }
 
 /* Called after a `set' command succeeds.  Runs the Tcl hook