Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] add selected-frame-level-changed events
Date: Wed, 28 Aug 2002 10:33:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0208281026020.1407-100000@valrhona.uglyboxes.com> (raw)
In-Reply-To: <3D6D025E.1080900@ges.redhat.com>

On Wed, 28 Aug 2002, Andrew Cagney wrote:

> So that the change has an ``exit clause''.  that way it is clear when 
> the fixme can be deleted/fixed.

Noted.

> Otherwize, yes, just commit

For the record, here's what I've committed:

ChangeLog
2002-08-28  Keith Seitz  <keiths@redhat.com>

        * stack.c (select_frame): Add FIXME concerning selected-frame
        events.
        (select_frame_command): Send selected-frame-level-changed
        event notification, but only if the level actually changed.
        (up_silently_base): Add selected-frame-level-changed event
        notification.
        (down_silently_base): Likewise.

Patch
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.40
diff -p -r1.40 stack.c
*** stack.c	11 Jul 2002 19:29:08 -0000	1.40
--- stack.c	28 Aug 2002 17:26:22 -0000
*************** select_frame (struct frame_info *fi)
*** 1517,1522 ****
--- 1517,1531 ----
    if (selected_frame_level_changed_hook)
      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 users 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.  */
    if (fi)
*************** select_frame_command_wrapper (char *leve
*** 1620,1627 ****
  static void
  select_frame_command (char *level_exp, int from_tty)
  {
!   register struct frame_info *frame, *frame1;
!   unsigned int level = 0;
  
    if (!target_has_stack)
      error ("No stack.");
--- 1629,1636 ----
  static void
  select_frame_command (char *level_exp, int from_tty)
  {
!   struct frame_info *frame;
!   int level = frame_relative_level (selected_frame);
  
    if (!target_has_stack)
      error ("No stack.");
*************** select_frame_command (char *level_exp, i
*** 1629,1634 ****
--- 1638,1645 ----
    frame = parse_frame_specification (level_exp);
  
    select_frame (frame);
+   if (level != frame_relative_level (selected_frame))
+     selected_frame_level_changed_event (frame_relative_level (selected_frame));
  }
  
  /* The "frame" command.  With no arg, print selected frame briefly.
*************** up_silently_base (char *count_exp)
*** 1674,1679 ****
--- 1685,1691 ----
    if (count1 != 0 && count_exp == 0)
      error ("Initial frame selected; you cannot go up.");
    select_frame (fi);
+   selected_frame_level_changed_event (frame_relative_level (selected_frame));
  }
  
  static void
*************** down_silently_base (char *count_exp)
*** 1719,1724 ****
--- 1731,1737 ----
      }
  
    select_frame (frame);
+   selected_frame_level_changed_event (frame_relative_level (selected_frame));
  }
  
  /* ARGSUSED */


      reply	other threads:[~2002-08-28 17:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-27 13:43 Keith Seitz
2002-08-27 14:20 ` Andrew Cagney
2002-08-27 14:40   ` Keith Seitz
2002-08-27 15:16     ` Andrew Cagney
2002-08-28  8:41       ` Keith Seitz
2002-08-28  8:51         ` Keith Seitz
2002-08-28 10:23         ` Andrew Cagney
2002-08-28 10:33           ` Keith Seitz [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=Pine.LNX.4.44.0208281026020.1407-100000@valrhona.uglyboxes.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sources.redhat.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