From ce1c9218e1d2aeb1236a4e85d0d9d8142a0ecc00 Mon Sep 17 00:00:00 2001 From: fnasser Date: Mon, 23 Oct 2000 22:41:53 +0000 Subject: [PATCH] 2000-10-23 Fernando Nasser * gdbtk-hooks.c (x_events): Only process events if the target is running. --- gdb/gdbtk/generic/ChangeLog | 5 +++++ gdb/gdbtk/generic/gdbtk-hooks.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/gdb/gdbtk/generic/ChangeLog b/gdb/gdbtk/generic/ChangeLog index 33acb82cb1..f833aedaa2 100644 --- a/gdb/gdbtk/generic/ChangeLog +++ b/gdb/gdbtk/generic/ChangeLog @@ -1,5 +1,10 @@ 2000-10-23 Fernando Nasser + * gdbtk-hooks.c (x_events): Only process events if the target is + running. + +2000-10-23 Fernando Nasser + * gdbtk-variable.c: Removed. Obsolete file. 2000-10-13 Fernando Nasser diff --git a/gdb/gdbtk/generic/gdbtk-hooks.c b/gdb/gdbtk/generic/gdbtk-hooks.c index e780d817ad..98fd8a8c9d 100644 --- a/gdb/gdbtk/generic/gdbtk-hooks.c +++ b/gdb/gdbtk/generic/gdbtk-hooks.c @@ -416,9 +416,19 @@ x_event (signo) static volatile int in_x_event = 0; static Tcl_Obj *varname = NULL; static int count = 0; + + /* Do nor re-enter this code or enter it while collecting gdb output. */ if (in_x_event || in_fputs) return 0; + /* Also, only do things while the target is running (stops and redraws). + FIXME: We wold like to at least redraw at other times but this is bundled + together in the TCL_WINDOW_EVENTS group and we would also process user + input. We will have to prevent (unwanted) user input to be generated + in order to be able to redraw (removing this test here). */ + if (!running_now) + return 0; + in_x_event = 1; gdbtk_force_detach = 0; -- 2.11.0