From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4056 invoked by alias); 27 Aug 2002 20:37:17 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4019 invoked from network); 27 Aug 2002 20:37:16 -0000 Received: from unknown (HELO valrhona.uglyboxes.com) (64.1.192.220) by sources.redhat.com with SMTP; 27 Aug 2002 20:37:16 -0000 Received: from localhost.localdomain (IDENT:F/dnhM/kNkg4Vk1qw5JhZyHTOKoBPJWo@localhost.localdomain [127.0.0.1]) by valrhona.uglyboxes.com (8.11.6/8.11.6) with ESMTP id g7RKdrv23694 for ; Tue, 27 Aug 2002 13:39:54 -0700 Date: Tue, 27 Aug 2002 13:43:00 -0000 From: Keith Seitz X-X-Sender: keiths@valrhona.uglyboxes.com To: gdb-patches@sources.redhat.com Subject: [RFA] add selected-frame-level-changed events Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-08/txt/msg00907.txt.bz2 Hi, Here's the follow-up to the gdb-event.sh change which added the "selected-frame-level-changed" event, which adds notifications for this event in the right places. It would have been nice to just put one notification in select_frame, but as we all know (or should), that function is called WAY to many times internally to be of any use for this purpose. Maybe a fixme is needed? Keith ChangeLog 2002-08-27 Keith Seitz * stack.c (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 27 Aug 2002 20:33:38 -0000 *************** 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."); --- 1620,1627 ---- 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 **** --- 1629,1636 ---- 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 **** --- 1676,1682 ---- 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 **** --- 1722,1728 ---- } select_frame (frame); + selected_frame_level_changed_event (frame_relative_level (selected_frame)); } /* ARGSUSED */