From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32683 invoked by alias); 16 Jun 2003 13:22:43 -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 32645 invoked from network); 16 Jun 2003 13:22:41 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 16 Jun 2003 13:22:41 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 93AE72B5F for ; Mon, 16 Jun 2003 09:22:33 -0400 (EDT) Message-ID: <3EEDC499.4010209@redhat.com> Date: Mon, 16 Jun 2003 13:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit] Allow cached cooked reads Content-Type: multipart/mixed; boundary="------------080104090801000506030803" X-SW-Source: 2003-06/txt/msg00527.txt.bz2 This is a multi-part message in MIME format. --------------080104090801000506030803 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 172 Just stumbled across this. When trying to save cooked registers the regcache was triggering an assertion failure instead of ignoring a bogus request. committed, Andrew --------------080104090801000506030803 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 826 2003-06-16 Andrew Cagney * regcache.c (do_cooked_read): Do not use register_valid_p. Index: regcache.c =================================================================== RCS file: /cvs/src/src/gdb/regcache.c,v retrieving revision 1.87 diff -u -r1.87 regcache.c --- regcache.c 9 Jun 2003 01:02:06 -0000 1.87 +++ regcache.c 16 Jun 2003 13:18:46 -0000 @@ -423,8 +423,7 @@ do_cooked_read (void *src, int regnum, void *buf) { struct regcache *regcache = src; - if (!regcache_valid_p (regcache, regnum) - && regcache->readonly_p) + if (!regcache->register_valid_p[regnum] && regcache->readonly_p) /* Don't even think about fetching a register from a read-only cache when the register isn't yet valid. There isn't a target from which the register value can be fetched. */ --------------080104090801000506030803--