From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6985 invoked by alias); 26 Mar 2007 20:26:21 -0000 Received: (qmail 6929 invoked by uid 22791); 26 Mar 2007 20:26:20 -0000 X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 26 Mar 2007 21:26:14 +0100 Received: (qmail invoked by alias); 26 Mar 2007 20:26:10 -0000 Received: from dialin-212-144-167-139.pools.arcor-ip.net (EHLO [192.168.2.193]) [212.144.167.139] by mail.gmx.net (mp025) with SMTP; 26 Mar 2007 22:26:10 +0200 X-Authenticated: #989139 Message-ID: <46082CD9.6080002@gmx.de> Date: Mon, 26 Mar 2007 20:26:00 -0000 From: Ignaz Forster User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Support for PPC405 / PPC440 registers Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00317.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I recently tried to debug an embedded IBM PowerPC 405 and 440 over JTAG. The necessary GDB stub was written by myself (unfortunately using confidential information, so I won't be able to publish it). When trying to display the contents of the processor's registers I noticed only the PPC403 register layout was included in the standard GDB distribution. As the registers of the different processors in the 4xx-series differ, I tried to modify GDB and BFD to handle the registers of the additional processors. The following files were changed: - - bfd/cpu-powerpc: Added definitions for the additional processors in the struct 'bfd_powerpc_archs' - - bfd/archures.c: Added processors in 'bfd_architecture' - - gdb/ppc-tdep.h: Added SPR numbers for new registers - - gdb/rs6000-tdep.c: Added processors to the struct 'variants' and created appropriate 'static const struct reg registers_...' entries with the available registers After that the registers showed up and could be used after setting the new processors with "set architecture". Question 1: What did I destroy by doing this? Question 2: Would a patch to add support for these processors be useful? What else should be done before even thinking about doing so? Thanks, - -- Ignaz Forster -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFGCCzZ/2+SjQTlQJkRArxWAJ4qrRKwQkaD/0qIuPMaYrAT4TxjSwCgkt7i W99pT7iGjJ49m3BUO76LeRk= =xvW9 -----END PGP SIGNATURE-----