From: Fernando Nasser <fnasser@cygnus.com>
To: Steven Johnson <sbjohnson@ozemail.com.au>
Cc: insight@sourceware.cygnus.com
Subject: Re: insight/52
Date: Thu, 12 Oct 2000 15:35:00 -0000 [thread overview]
Message-ID: <39E63CC3.C16057@cygnus.com> (raw)
In-Reply-To: <39E62A7D.5CECCADD@ozemail.com.au>
Here is a revised (and also untested patch).
Please let me know how it goes.
(the ser-unix.c part you already have applied)
Thanks again for the four-hands bug tracking effort.
Regards,
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: 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 22:29:49
*************** proc gdbtk_busy {} {
*** 135,140 ****
--- 135,170 ----
# that could change target state.
# ------------------------------------------------------------------
proc gdbtk_update {} {
+
+ set err [catch {run_hooks gdb_update_hook} txt]
+ if {$err} {
+ debug "gdbtk_update ERROR: $txt"
+ }
+
+ # Force the screen to update
+ update
+ }
+
+ # ------------------------------------------------------------------
+ # PROCEDURE: gdbtk_update_safe - run all update hooks in a safe way
+ #
+ # Use this procedure to force all widgets to update
+ # themselves. This hook is usually run after command
+ # that could change target state.
+ # Like gdbtk_update but safe to be used in "after idle"
+ # which is used in update hooks.
+ # ------------------------------------------------------------------
+ proc gdbtk_update_safe {} {
+ 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"
*************** proc gdbtk_tcl_display {action number {v
*** 548,554 ****
# the user has changed the contents of a register.
# ------------------------------------------------------------------
proc gdbtk_register_changed {} {
! after idle gdbtk_update
}
# ------------------------------------------------------------------
--- 578,584 ----
# the user has changed the contents of a register.
# ------------------------------------------------------------------
proc gdbtk_register_changed {} {
! after idle gdbtk_update_safe
}
# ------------------------------------------------------------------
*************** proc gdbtk_register_changed {} {
*** 558,564 ****
# the program's variables).
# ------------------------------------------------------------------
proc gdbtk_memory_changed {} {
! after idle gdbtk_update
}
####################################################################
--- 588,594 ----
# the program's variables).
# ------------------------------------------------------------------
proc gdbtk_memory_changed {} {
! after idle gdbtk_update_safe
}
####################################################################
prev parent reply other threads:[~2000-10-12 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20001012161301.19246.qmail@sourceware.cygnus.com>
[not found] ` <39E62A7D.5CECCADD@ozemail.com.au>
2000-10-12 14:54 ` insight/52 Fernando Nasser
2000-10-12 15:35 ` Fernando Nasser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39E63CC3.C16057@cygnus.com \
--to=fnasser@cygnus.com \
--cc=insight@sourceware.cygnus.com \
--cc=sbjohnson@ozemail.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).