This is the mail archive of the
insight-prs@sources.redhat.com
mailing list for the Insight project.
Re: insight/52
- To: nobody at sourceware dot cygnus dot com
- Subject: Re: insight/52
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: 12 Oct 2000 16:13:01 -0000
- Cc: insight-prs at sourceware dot cygnus dot com,
- Reply-To: Fernando Nasser <fnasser at cygnus dot com>
The following reply was made to PR insight/52; it has been noted by GNATS.
From: Fernando Nasser <fnasser@cygnus.com>
To: insight-gnats@sourceware.cygnus.com, sbjohnson@ozemail.com.au,
nobody@sourceware.cygnus.com
Cc:
Subject: Re: insight/52
Date: Thu, 12 Oct 2000 16:04:48 +0000
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=52&database=insight
Steven,
Here is a patch that would protect you from this unwanted update.
I had no way of testing it (the C part compiles but the Tcl code was just
visually inspected). If you could help me and try it I would appreciate.
Thanks,
Fernando
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@cygnus.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
Index: gdb/ser-unix.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-unix.c,v
retrieving revision 1.6
diff -c -p -r1.6 ser-unix.c
*** ser-unix.c 2000/09/15 20:40:15 1.6
--- ser-unix.c 2000/10/12 15:39:12
*************** do_unix_readchar (serial_t scb, int time
*** 920,930 ****
someone else might have freed it. The ui_loop_hook signals that
we should exit by returning 1. */
! if (ui_loop_hook)
! {
! if (ui_loop_hook (0))
! return SERIAL_TIMEOUT;
! }
status = ser_unix_wait_for (scb, delta);
timeout = (timeout <= 0) ? timeout : (timeout - delta);
--- 920,936 ----
someone else might have freed it. The ui_loop_hook signals that
we should exit by returning 1. */
! /* NOTE: To prevent GUI commands to be issued while we are executing
! a previous one, we just call the GUI hook when we have an infinite
! timeout (that means that our target is running). The only command
! that the GUI sends in that state is the stop, which is the one we
! are really interested. FN */
!
! if (ui_loop_hook && (timeout < 0))
! {
! if (ui_loop_hook (0))
! return SERIAL_TIMEOUT;
! }
status = ser_unix_wait_for (scb, delta);
timeout = (timeout <= 0) ? timeout : (timeout - delta);
Index: gdb/gdbtk/library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.4
diff -c -p -r1.4 interface.tcl
*** interface.tcl 2000/03/28 01:59:39 1.4
--- interface.tcl 2000/10/12 15:48:43
*************** proc gdbtk_busy {} {
*** 135,140 ****
--- 135,149 ----
# that could change target state.
# ------------------------------------------------------------------
proc gdbtk_update {} {
+ global gdb_running
+
+ # Fencepost: Do not update if we are running the target
+ # We get here because script commands may have changed memory or
+ # registers and "after idle" events registered as a consequence
+ # If we try to update while the target is running we are doomed.
+ if {$gdb_running}
+ return
+
set err [catch {run_hooks gdb_update_hook} txt]
if {$err} {
debug "gdbtk_update ERROR: $txt"