From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11300 invoked by alias); 23 May 2003 17:36:04 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 11195 invoked from network); 23 May 2003 17:36:03 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 23 May 2003 17:36:03 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3p2/8.9.3) with ESMTP id NAA05683; Fri, 23 May 2003 13:31:31 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id NAA15015; Fri, 23 May 2003 13:35:48 -0400 Message-ID: <11d801c32151$c37bbd80$0202040a@catdog> From: "Kris Warkentin" To: "Elena Zannoni" Cc: , "Gdb@Sources.Redhat.Com" References: <0cd101c31fc1$b589c500$0202040a@catdog><3ECCED6E.9060906@redhat.com><0fb801c32095$785e5590$0202040a@catdog><3ECD2378.1040704@redhat.com> <16077.19191.135513.118401@localhost.redhat.com> Subject: Re: assertion failure in regcache.c Date: Fri, 23 May 2003 17:36:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-05/txt/msg00316.txt.bz2 > > I'd start with the obvious thing - a simple tipo in the SH4 register > > byte function. The code was written long before these sanity checks > > were added and ``the old way'' makes it very hard to notice that the > > values are skewed. > > > > Andrew > > > > > yes, look at sh_sh4_register_byte. Maybe FV0_REGNUM or FV_LAST_REGNUM > are not set correctly or fv_reg_base_num does something wrong. These > registers with (*1) are pseudo registers, so it's easy that the > calculations could have been screwed up. Well, I found the disagreement. It looks to me like regcache->descr->register_offset[] is pointing to an upwardly growing list of registers including the pseudo-registers. So you get something like dr5 being 260 in the register_offset array but sh4_register_byte will return 124 which would be the offset of fr10 (taking into account that dr0 is overlaid on top of the fr regs). I'm inclined to think that the regcache way is wrong since someone who updates dr0 and then reads fr0 will get conflicting values. We shouldn't be storing extra copies of the same register. Where do I go from here? cheers, Kris