From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28443 invoked by alias); 19 Aug 2002 22:17:40 -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 28436 invoked from network); 19 Aug 2002 22:17:39 -0000 Received: from unknown (HELO valrhona.uglyboxes.com) (64.1.192.220) by sources.redhat.com with SMTP; 19 Aug 2002 22:17:39 -0000 Received: from localhost.localdomain (IDENT:NkeNLu8G8Fg34LziTkXyUg3Ad3Cmnba+@localhost.localdomain [127.0.0.1]) by valrhona.uglyboxes.com (8.11.6/8.11.6) with ESMTP id g7JMKIM32594 for ; Mon, 19 Aug 2002 15:20:21 -0700 Date: Mon, 19 Aug 2002 15:17:00 -0000 From: Keith Seitz X-X-Sender: keiths@valrhona.uglyboxes.com To: gdb-patches@sources.redhat.com Subject: [RFA] register_modified_event Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-08/txt/msg00560.txt.bz2 Hi, Here's another event fallout from Apple's MI work. This defines a new event (and adds two notifications for it), register_modified_event, which is sent whenever a register is modified (usually by a user in the command line, but could be via MI or varobj, etc). As expected, this causes no regressions in the testsuite. I have tests for this, but I can't commit any of them until all my MI stuff is complete, since event notifications in MI are quite new (and still in approval process). Keith PS. FYI, I would have named it register_changed_event, just like the hook, but there is a name conflict with register_changed in regcache.c. ChangeLog 2002-08-18 Keith Seitz * gdb-events.sh: Add selected_frame_level_changed event. * gdb-events.c: Regenerated. * gdb-events.c: Regenerated. * valops.c (value_assign): Add register_update event notification for lval_register and lval_reg_frame_relative. Patch Index: gdb-events.sh =================================================================== RCS file: /cvs/src/src/gdb/gdb-events.sh,v retrieving revision 1.13 diff -p -r1.13 gdb-events.sh *** gdb-events.sh 16 Aug 2002 16:09:07 -0000 1.13 --- gdb-events.sh 19 Aug 2002 22:11:13 -0000 *************** f:void:tracepoint_create:int number:numb *** 65,70 **** --- 65,71 ---- f:void:tracepoint_delete:int number:number f:void:tracepoint_modify:int number:number f:void:architecture_changed:void + f:void:register_modified:int regno:regno #*:void:annotate_starting_hook:void #*:void:annotate_stopped_hook:void #*:void:annotate_signalled_hook:void *************** f:void:architecture_changed:void *** 87,93 **** #*:void:readline_begin_hook:char *format, ...:format #*:char *:readline_hook:char *prompt:prompt #*:void:readline_end_hook:void - #*:void:register_changed_hook:int regno:regno #*:void:memory_changed_hook:CORE_ADDR addr, int len:addr, len #*:void:context_hook:int num:num #*:int:target_wait_hook:int pid, struct target_waitstatus *status:pid, status --- 88,93 ---- Index: valops.c =================================================================== RCS file: /cvs/src/src/gdb/valops.c,v retrieving revision 1.66 diff -p -r1.66 valops.c *** valops.c 1 Aug 2002 17:18:33 -0000 1.66 --- valops.c 19 Aug 2002 22:11:41 -0000 *************** value_assign (struct value *toval, struc *** 678,683 **** --- 678,686 ---- VALUE_CONTENTS (fromval), TYPE_LENGTH (type)); #endif } + + register_modified_event (VALUE_REGNO (toval)); + /* Assigning to the stack pointer, frame pointer, and other (architecture and calling convention specific) registers may cause the frame cache to be out of date. We just do this *************** value_assign (struct value *toval, struc *** 765,770 **** --- 768,774 ---- if (register_changed_hook) register_changed_hook (-1); + register_modified_event (regno); } break;