From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29683 invoked by alias); 7 May 2004 22:53:46 -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 29666 invoked from network); 7 May 2004 22:53:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 7 May 2004 22:53:46 -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 i47Mrk0m002570 for ; Fri, 7 May 2004 18:53:46 -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 i47Mriv19513; Fri, 7 May 2004 18:53:45 -0400 To: gdb-patches@sources.redhat.com Subject: PATCH: fix off-by-one error in ppc_collect_gregset From: Jim Blandy Date: Fri, 07 May 2004 22:53:00 -0000 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-05/txt/msg00223.txt.bz2 Committed as obvious. This also ought to be using tdep->ppc_gp0_regnum, but that's a separate patch, on its way. 2004-05-07 Jim Blandy * rs6000-tdep.c (ppc_collect_gregset): Correct off-by-one error in loop collecting gprs. *** gdb/rs6000-tdep.c 2004-05-07 15:54:04.000000000 -0500 --- gdb/rs6000-tdep.c 2004-05-07 17:40:48.000000000 -0500 *************** ppc_collect_gregset (const struct regset *** 259,265 **** int i; offset = offsets->r0_offset; ! for (i = 0; i <= 32; i++, offset += 4) { if (regnum == -1 || regnum == i) ppc_collect_reg (regcache, regnum, gregs, offset); --- 259,265 ---- int i; offset = offsets->r0_offset; ! for (i = 0; i < 32; i++, offset += 4) { if (regnum == -1 || regnum == i) ppc_collect_reg (regcache, regnum, gregs, offset);