From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4555 invoked by alias); 13 Sep 2008 23:44:03 -0000 Received: (qmail 4544 invoked by uid 22791); 13 Sep 2008 23:44:03 -0000 X-Spam-Check-By: sourceware.org Received: from hiauly1.hia.nrc.ca (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 13 Sep 2008 23:43:28 +0000 Received: by hiauly1.hia.nrc.ca (Postfix, from userid 1000) id 572F34E6A; Sat, 13 Sep 2008 19:43:26 -0400 (EDT) Subject: [PATCH] Fix reading floating point registers from core files on hppa-linux To: gdb-patches@sourceware.org Date: Sat, 13 Sep 2008 23:44:00 -0000 From: "John David Anglin" Cc: randolph@tausq.org X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20080913234326.572F34E6A@hiauly1.hia.nrc.ca> 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: 2008-09/txt/msg00305.txt.bz2 I noticed the failure of gcore.exp in testing the previous patch. This change fixes the problem. regcache_raw_supply only copies four bytes on hppa--unknown-linux-gnu. Ok? Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602) 2008-09-13 John David Anglin * hppa-linux-tdep.c (hppa_linux_supply_fpregset): Correct iteration. Index: hppa-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-linux-tdep.c,v retrieving revision 1.31 diff -u -3 -p -r1.31 hppa-linux-tdep.c --- hppa-linux-tdep.c 21 Aug 2008 13:19:18 -0000 1.31 +++ hppa-linux-tdep.c 13 Sep 2008 22:51:35 -0000 @@ -474,12 +477,12 @@ hppa_linux_supply_fpregset (const struct int i, offset; offset = 0; - for (i = 0; i < 31; i++) + for (i = 0; i < 64; i++) { if (regnum == HPPA_FP0_REGNUM + i || regnum == -1) regcache_raw_supply (regcache, HPPA_FP0_REGNUM + i, buf + offset); - offset += 8; + offset += 4; } }