From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8105 invoked by alias); 31 Oct 2005 21:54:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7989 invoked by uid 22791); 31 Oct 2005 21:54:30 -0000 Received: from e31.co.us.ibm.com (HELO e31.co.us.ibm.com) (32.97.110.149) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 31 Oct 2005 21:54:30 +0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e31.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id j9VLsS08008770 for ; Mon, 31 Oct 2005 16:54:28 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j9VLsSfJ505978 for ; Mon, 31 Oct 2005 14:54:28 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j9VLsRbw031314 for ; Mon, 31 Oct 2005 14:54:27 -0700 Received: from dyn9047022123-009047022095.beaverton.ibm.com (dyn9047022123-009047022095.beaverton.ibm.com [9.47.22.95]) by d03av03.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j9VLsRvH031287; Mon, 31 Oct 2005 14:54:27 -0700 From: Paul Gilliam Reply-To: pgilliam@us.ibm.com To: gdb-patches@sources.redhat.com Subject: [PATCH] allow gdb to access altivec registers - OK to commit? Date: Mon, 31 Oct 2005 22:51:00 -0000 User-Agent: KMail/1.6.2 Cc: Kevin Buettner References: <200510171332.13857.pgilliam@us.ibm.com> <200510211547.23990.pgilliam@us.ibm.com> <20051026152933.01ee4fa4@ironwood.lan> In-Reply-To: <20051026152933.01ee4fa4@ironwood.lan> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200510311356.44832.pgilliam@us.ibm.com> X-SW-Source: 2005-10/txt/msg00236.txt.bz2 I revised the ChangeLog entry to note that this change affects GNU/Linux only. OK to commit? (was the previous posting by Kevin an OK to commit?) -=# Paul #=- PS: I realy want this to go int 6.4! 2005-10-31 Paul Gilliam * rs6000-tdep.c (rs6000_gdbarch_init): On GNU/Linux only, assume that bfd_mach_ppc64 has altivec unit, just like bfd_mach_ppc. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.246 diff -a -u -p -r1.246 rs6000-tdep.c --- rs6000-tdep.c 14 Oct 2005 20:17:11 -0000 1.246 +++ rs6000-tdep.c 21 Oct 2005 22:44:15 -0000 @@ -3376,10 +3376,21 @@ rs6000_gdbarch_init (struct gdbarch_info switch (info.osabi) { + case GDB_OSABI_LINUX: + /* FIXME: pgilliam/2005-10-21: Assume all PowerPC 64-bit linux systems + have altivec registers. If not, ptrace will fail the first time it's + called to access one and will not be called again. This wart will + be removed when Daniel Jacobowitz's proposal for autodetecting target + registers is implimented. */ + if ((v->arch == bfd_arch_powerpc) && ((v->mach)== bfd_mach_ppc64)) + { + tdep->ppc_vr0_regnum = 71; + tdep->ppc_vrsave_regnum = 104; + } + /* Fall Thru */ case GDB_OSABI_NETBSD_AOUT: case GDB_OSABI_NETBSD_ELF: case GDB_OSABI_UNKNOWN: - case GDB_OSABI_LINUX: set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc); frame_unwind_append_sniffer (gdbarch, rs6000_frame_sniffer); set_gdbarch_unwind_dummy_id (gdbarch, rs6000_unwind_dummy_id);