From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@cygnus.com>
Cc: Insight List <insight@sourceware.cygnus.com>
Subject: Re: Patch: operate-and-get-next
Date: Fri, 28 Sep 2001 10:19:00 -0000 [thread overview]
Message-ID: <87snd7rzni.fsf@creche.redhat.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0109280919240.16046-100000@makita.cygnus.com>
>>>>> "Keith" == Keith Seitz <keiths@cygnus.com> writes:
Keith> (Try up/down in the console window. It doesn't work properly.)
I looked into this a bit. It turns out we already have some of the
machinery in place to make it work correctly. All that remains is
making selected_frame_level_changed_hook do a little more work.
I came up with the appended patch.
Unfortunately, if you try this patch you'll see weird behavior. When
you first run your program the source window will go through a few
gyrations, first displaying nothing, then briefly (for me anyway)
displaying some assembly, before finally settling on the breakpoint on
main().
I think this is distracting enough to make this patch not acceptable :-(.
I really don't know how to fix it.
(Checking that gdb_selected_frame_level != -1 in
gdbtk_tcl_selected_frame_changed helps, but still doesn't suffice.)
Any ideas?
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* library/stackwin.itb (StackWin::change_frame): Don't call
gdbtk_update.
* library/srcwin.itb (SrcWin::stack): Don't call gdbtk_update.
* generic/gdbtk-hooks.c (gdbtk_selected_frame_changed): Invoke
gdbtk_tcl_selected_frame_changed.
* library/interface.tcl (gdbtk_tcl_selected_frame_changed): New
proc.
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.18
diff -u -r1.18 gdbtk-hooks.c
--- generic/gdbtk-hooks.c 2001/08/16 15:48:14 1.18
+++ generic/gdbtk-hooks.c 2001/09/28 17:10:24
@@ -769,6 +769,7 @@
int level;
{
Tcl_UpdateLinkedVar (gdbtk_interp, "gdb_selected_frame_level");
+ Tcl_GlobalEval (gdbtk_interp, "gdbtk_tcl_selected_frame_changed");
}
/* Called when the current thread changes. */
Index: library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.29
diff -u -r1.29 interface.tcl
--- library/interface.tcl 2001/08/13 18:30:36 1.29
+++ library/interface.tcl 2001/09/28 17:10:25
@@ -1751,3 +1751,8 @@
GDBEventHandler::dispatch $e
delete object $e
}
+
+# The selected frame changed. Inform the UI.
+proc gdbtk_tcl_selected_frame_changed {} {
+ gdbtk_update
+}
Index: library/srcwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
retrieving revision 1.16
diff -u -r1.16 srcwin.itb
--- library/srcwin.itb 2001/08/24 00:11:06 1.16
+++ library/srcwin.itb 2001/09/28 17:10:26
@@ -480,7 +480,6 @@
if {[catch {gdb_cmd "$cmd"} message]} {
dbug E "STACK ERROR: $message"
}
- gdbtk_update
gdbtk_idle
}
Index: library/stackwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/stackwin.itb,v
retrieving revision 1.5
diff -u -r1.5 stackwin.itb
--- library/stackwin.itb 2001/08/20 19:14:09 1.5
+++ library/stackwin.itb 2001/09/28 17:10:26
@@ -120,11 +120,6 @@
set size [$itk_component(slb) size]
set frame_num [expr {$size - $sel - 1}]
catch {gdb_cmd "frame $frame_num"}
-
- # Run idle hooks and cause all widgets to update
- set protect_me 1
- gdbtk_update
- set protect_me 0
gdbtk_idle
}
}
next prev parent reply other threads:[~2001-09-28 10:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-28 9:15 Tom Tromey
2001-09-28 9:27 ` Keith Seitz
2001-09-28 9:36 ` Tom Tromey
2001-09-28 9:40 ` Keith Seitz
2001-09-28 9:54 ` John R. Moore
2001-09-28 10:12 ` Tom Tromey
2001-09-28 10:19 ` Tom Tromey [this message]
2001-09-28 10:27 ` Keith Seitz
2001-09-28 10:41 ` Tom Tromey
2001-09-28 11:03 ` Keith Seitz
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=87snd7rzni.fsf@creche.redhat.com \
--to=tromey@redhat.com \
--cc=insight@sourceware.cygnus.com \
--cc=keiths@cygnus.com \
/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).