From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7283 invoked by alias); 4 Aug 2004 17:51:50 -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 7269 invoked from network); 4 Aug 2004 17:51:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Aug 2004 17:51:49 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74Hpne1031699 for ; Wed, 4 Aug 2004 13:51:49 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i74Hpma32445; Wed, 4 Aug 2004 13:51:49 -0400 To: gdb-patches@sources.redhat.com Subject: Re: RFA: assert that target_fetch_registers did its job References: <20040724004433.GA15591@nevyn.them.org> From: Jim Blandy Date: Wed, 04 Aug 2004 17:51:00 -0000 In-Reply-To: <20040724004433.GA15591@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-08/txt/msg00088.txt.bz2 I've committed the following: 2004-07-21 Jim Blandy * regcache.c (regcache_raw_read): Assert that, after calling target_fetch_registers, the register we're reading is cached. Index: gdb/regcache.c =================================================================== RCS file: /cvs/src/src/gdb/regcache.c,v retrieving revision 1.121 diff -c -p -r1.121 regcache.c *** gdb/regcache.c 2 Aug 2004 21:58:44 -0000 1.121 --- gdb/regcache.c 2 Aug 2004 23:18:56 -0000 *************** regcache_raw_read (struct regcache *regc *** 614,619 **** --- 614,620 ---- } if (!register_cached (regnum)) target_fetch_registers (regnum); + gdb_assert (register_cached (regnum)); } /* Copy the value directly into the register cache. */ memcpy (buf, register_buffer (regcache, regnum),