From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18525 invoked by alias); 7 May 2004 01:19: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 18331 invoked from network); 7 May 2004 01:19:39 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 7 May 2004 01:19:39 -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 i471Jc0q021416 for ; Thu, 6 May 2004 21:19:39 -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 i46JZiv06366; Thu, 6 May 2004 15:35:45 -0400 To: gdb-patches@sources.redhat.com Subject: RFA: use ppc_gp0_regnum when appropriate From: Jim Blandy Date: Fri, 07 May 2004 01:19: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/msg00173.txt.bz2 2004-05-06 Jim Blandy * aix-thread.c (fetch_regs_kernel_thread, fill_gprs64, fill_gprs32, store_regs_kernel_thread): Use tdep->ppc_gp0_regnum to recognize gpr regnums, instead of assuming that tdep->ppc_fp0_regnum marks the end of the general-purpose registers. *** gdb/aix-thread.c 2004-05-06 14:18:00.000000000 -0500 --- gdb/aix-thread.c 2004-05-06 14:25:58.000000000 -0500 *************** fetch_regs_kernel_thread (int regno, pth *** 1157,1163 **** (long) tid, regno, arch64); /* General-purpose registers. */ ! if (regno == -1 || regno < tdep->ppc_fp0_regnum) { if (arch64) { --- 1157,1165 ---- (long) tid, regno, arch64); /* General-purpose registers. */ ! if (regno == -1 ! || (tdep->ppc_gp0_regnum <= regno ! && regno < tdep->ppc_gp0_regnum + ppc_num_gprs)) { if (arch64) { *************** fill_gprs64 (uint64_t *vals) *** 1246,1254 **** struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int regno; ! for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++) ! if (register_cached (regno)) ! regcache_collect (regno, vals + regno); } static void --- 1248,1256 ---- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int regno; ! for (regno = 0; regno < ppc_num_gprs; regno++) ! if (register_cached (tdep->ppc_gp0_regnum + regno)) ! regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno); } static void *************** fill_gprs32 (uint32_t *vals) *** 1257,1265 **** struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int regno; ! for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++) ! if (register_cached (regno)) ! regcache_collect (regno, vals + regno); } /* Store the floating point registers into a double array. */ --- 1259,1267 ---- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); int regno; ! for (regno = 0; regno < ppc_num_gprs; regno++) ! if (register_cached (tdep->ppc_gp0_regnum + regno)) ! regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno); } /* Store the floating point registers into a double array. */ *************** store_regs_kernel_thread (int regno, pth *** 1456,1462 **** (long) tid, regno); /* General-purpose registers. */ ! if (regno == -1 || regno < tdep->ppc_fp0_regnum) { if (arch64) { --- 1458,1466 ---- (long) tid, regno); /* General-purpose registers. */ ! if (regno == -1 ! || (tdep->ppc_gp0_regnum <= regno ! && regno < tdep->ppc_gp0_regnum + ppc_num_fprs)) { if (arch64) {