From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2320 invoked by alias); 28 May 2003 19:08:35 -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 2282 invoked from network); 28 May 2003 19:08:34 -0000 Received: from unknown (HELO zenia.red-bean.com) (12.223.225.216) by sources.redhat.com with SMTP; 28 May 2003 19:08:34 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id h4SJHNFq004005; Wed, 28 May 2003 14:17:23 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id h4SJHMCA004001; Wed, 28 May 2003 14:17:22 -0500 To: gdb-patches@sources.redhat.com Subject: [ppc64-linux] Cope with non-existent MQ register From: Jim Blandy Date: Wed, 28 May 2003 19:08: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: 2003-05/txt/msg00510.txt.bz2 2003-05-14 James Blandy * ppc-linux-nat.c (ppc_register_u_addr, fill_gregset): If PT_MQ isn't #defined, assume the register doesn't exist: act as if tdep->ppc_mq_regnum were -1. Index: gdb/ppc-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v retrieving revision 1.21 retrieving revision 1.21.6.1 diff -c -r1.21 -r1.21.6.1 *** gdb/ppc-linux-nat.c 8 May 2003 20:52:48 -0000 1.21 --- gdb/ppc-linux-nat.c 28 May 2003 16:51:21 -0000 1.21.6.1 *************** *** 147,154 **** --- 147,156 ---- u_addr = PT_XER * 4; if (regno == tdep->ppc_ctr_regnum) u_addr = PT_CTR * 4; + #ifdef PT_MQ if (regno == tdep->ppc_mq_regnum) u_addr = PT_MQ * 4; + #endif if (regno == tdep->ppc_ps_regnum) u_addr = PT_MSR * 4; if (regno == tdep->ppc_fpscr_regnum) *************** *** 503,511 **** --- 505,515 ---- regcache_collect (tdep->ppc_xer_regnum, regp + PT_XER); if ((regno == -1) || regno == tdep->ppc_ctr_regnum) regcache_collect (tdep->ppc_ctr_regnum, regp + PT_CTR); + #ifdef PT_MQ if (((regno == -1) || regno == tdep->ppc_mq_regnum) && (tdep->ppc_mq_regnum != -1)) regcache_collect (tdep->ppc_mq_regnum, regp + PT_MQ); + #endif if ((regno == -1) || regno == tdep->ppc_ps_regnum) regcache_collect (tdep->ppc_ps_regnum, regp + PT_MSR); }