From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5344 invoked by alias); 29 May 2007 12:13:03 -0000 Received: (qmail 5332 invoked by uid 22791); 29 May 2007 12:13:02 -0000 X-Spam-Check-By: sourceware.org Received: from bay0-omc2-s2.bay0.hotmail.com (HELO bay0-omc2-s2.bay0.hotmail.com) (65.54.246.138) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 May 2007 12:12:55 +0000 Received: from hotmail.com ([65.55.155.114]) by bay0-omc2-s2.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 29 May 2007 05:12:53 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 29 May 2007 05:12:53 -0700 Message-ID: Received: from 65.55.155.123 by by144fd.bay144.hotmail.msn.com with HTTP; Tue, 29 May 2007 12:12:50 GMT X-Sender: kal_pana@hotmail.com From: "Kalpana Ramamurthy" To: gdb-patches@sources.redhat.com Cc: kal_pana@hotmail.com Bcc: Subject: Why is the state of cache being changed by regcache_observer_notify_target() ? Date: Tue, 29 May 2007 12:13:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00420.txt.bz2 I am changing a register like this : $sp = (long long *)$pa When value_assign() is called in valops.c, it goes to put_frame_register() to set the modified contents of register SP. While doing this, it sets the registers_valip_p to 1 in register_raw_write() after copying over the modified values in the buffer to the regcache. memcpy (register_buffer (regcache, regnum), buf, regcache->descr->sizeof_register[regnum]) ; regcache->register_valid_p[regnum] = 1 ; But soon after in value_assign(), it calls for observer_notify_target_changed() which in turn calls regcache_observer_target_changed(). This calls for register_changed() that immediately resets the value of register_valid_p to 0. And when register_valid_p is set to 0, it indicates that it is not cached but is fetchable and hence tries to fetch the target registers again. Something which I cannot understand gets messed up after that. But if I comment out the call to observer_notify_target_changed() in value_assign(), everything works fine and the value of $sp is changed as per what I want. Why is the regcache_observer_target_changed() changing the values of register_valid_p as soon as its set earlier ? Kalpana === _________________________________________________________________ Catch all the cricketing action right here. Live score, match reports, photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx