Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH - TUI and Insight Related] Fix for PR13378
@ 2011-11-11 20:54 Sterling Augustine
  2011-11-11 21:17 ` Keith Seitz
  2011-11-12  0:28 ` Pedro Alves
  0 siblings, 2 replies; 3+ messages in thread
From: Sterling Augustine @ 2011-11-11 20:54 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

Hi,

Enclosed is a very simple patch which fixes the annoying TUI-updating
issue described in
http://sourceware.org/bugzilla/show_bug.cgi?id=13378.

It simply eliminates a call to
deprecated_selected_frame_level_changed_hook. This hook has been
deprecated for many years, so one would think it's clients have had
time to remove the dependency. After using it locally for a week now,
I see no ill effects in TUI. stopping at breakpoints, up, down, and
the other stuff all work fine for me. However, the testsuite is, err,
incomplete on this feature.

I do wonder if Insight--or some other front end--might have a problem
with it though. If you deal with TUI or another front end, can you
take it for a spin?

If this patch is accepted, then the next logical one would be to
eliminate the hook altogether, but that will require changes to
Insight.

Thanks,

Sterling


2011-11-11  Sterling Augustine  <saugustine@google.com>

	PR gdb/13378
	* frame.c (select_frame): Don't call
	deprecated_selected_frame_level_changed_hook.  Eliminate obsolete
	FIXME.

[-- Attachment #2: tui-bounce.patch --]
[-- Type: text/x-patch, Size: 1183 bytes --]

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.303
diff -u -r1.303 frame.c
--- frame.c	27 Oct 2011 11:04:25 -0000	1.303
+++ frame.c	11 Nov 2011 20:50:56 -0000
@@ -1396,17 +1396,6 @@
   selected_frame = fi;
   /* NOTE: cagney/2002-05-04: FI can be NULL.  This occurs when the
      frame is being invalidated.  */
-  if (deprecated_selected_frame_level_changed_hook)
-    deprecated_selected_frame_level_changed_hook (frame_relative_level (fi));
-
-  /* FIXME: kseitz/2002-08-28: It would be nice to call
-     selected_frame_level_changed_event() right here, but due to limitations
-     in the current interfaces, we would end up flooding UIs with events
-     because select_frame() is used extensively internally.
-
-     Once we have frame-parameterized frame (and frame-related) commands,
-     the event notification can be moved here, since this function will only
-     be called when the user's selected frame is being changed.  */
 
   /* Ensure that symbols for this frame are read in.  Also, determine the
      source language of this frame, and switch to it if desired.  */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH - TUI and Insight Related] Fix for PR13378
  2011-11-11 20:54 [PATCH - TUI and Insight Related] Fix for PR13378 Sterling Augustine
@ 2011-11-11 21:17 ` Keith Seitz
  2011-11-12  0:28 ` Pedro Alves
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Seitz @ 2011-11-11 21:17 UTC (permalink / raw)
  To: Sterling Augustine; +Cc: gdb-patches

On 11/11/2011 12:53 PM, Sterling Augustine wrote:
> If this patch is accepted, then the next logical one would be to
> eliminate the hook altogether, but that will require changes to
> Insight.

I'll get that when it goes in. :-)

Keith


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH - TUI and Insight Related] Fix for PR13378
  2011-11-11 20:54 [PATCH - TUI and Insight Related] Fix for PR13378 Sterling Augustine
  2011-11-11 21:17 ` Keith Seitz
@ 2011-11-12  0:28 ` Pedro Alves
  1 sibling, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2011-11-12  0:28 UTC (permalink / raw)
  To: gdb-patches; +Cc: Sterling Augustine

On Friday 11 November 2011 20:53:59, Sterling Augustine wrote:
> Hi,
> 
> Enclosed is a very simple patch which fixes the annoying TUI-updating
> issue described in
> http://sourceware.org/bugzilla/show_bug.cgi?id=13378.
> 
> It simply eliminates a call to
> deprecated_selected_frame_level_changed_hook. This hook has been
> deprecated for many years, so one would think it's clients have had
> time to remove the dependency. 

Sorry, this approach is backwards.  We should stop TUI from
installing the hook first instead.  Then when all users have
disappeared, we can eliminate the hook.

> After using it locally for a week now,
> I see no ill effects in TUI. stopping at breakpoints, up, down, and
> the other stuff all work fine for me. However, the testsuite is, err,
> incomplete on this feature.

I've tried it, and that's unfortunately not true -- TUI no longer
reacts to up/down.  

The right fix is adding a new observer for when the user changes the
frame, and make TUI use it instead of this hook that triggers all
too often.  I thought MI had such an observer, but I guess that
was some discussion that never got anywhere or a patch that never
got in.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-12  0:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-11 20:54 [PATCH - TUI and Insight Related] Fix for PR13378 Sterling Augustine
2011-11-11 21:17 ` Keith Seitz
2011-11-12  0:28 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox