From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31632 invoked by alias); 2 Jan 2004 16:46:40 -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 31625 invoked from network); 2 Jan 2004 16:46:40 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 2 Jan 2004 16:46:40 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4ED0B2B8F; Fri, 2 Jan 2004 11:46:33 -0500 (EST) Message-ID: <3FF5A069.1040306@gnu.org> Date: Fri, 02 Jan 2004 16:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Mark Kettenis , dje@watson.ibm.com Cc: gcc@gcc.gnu.org, gdb-patches@sources.redhat.com, Ulrich.Weigand@de.ibm.com, geoffk@geoffk.org Subject: Re: Incorrect DWARF-2 register numbers on PPC64? References: <200312182258.hBIMwgT25422@makai.watson.ibm.com> <200312201527.hBKFRHgI000712@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00025.txt.bz2 > Date: Thu, 18 Dec 2003 17:58:42 -0500 > From: David Edelsohn > > >>>>> Andrew Cagney writes: > > > Argh! Someone teach GCC about the PPC64 DWARF register numbering > > please! Before it is too late! Now it is using the PPC32 LR register > > number, which just happens to be the PPC64 FPSCR register. > > The 32-bit PowerPC System V ABI defines DWARF Register Number > Mapping that does not appear to be implemented in GCC or GDB. This issue > probably requires more thought and discussion about whether PPC64 should > be compatible with PPC32 or PPC64 should be compliant with the ABI or both > PPC32 and PPC64 should be compliant with the ABI. > Ah, You're right. I should have looked a little better. So currently > GCC uses the same mapping for DWARF as it does for stabs. Seems like > there is a problem with GDB; we do some remapping for stabs (see > rs6000-tdep.c:rs6000_stab_reg_to_regnum), but don't remap for DWARF. > We probably should at least fix that until things are cleared up. I'd ignore GDB here. I think GCC, for the 64-bit SvR4 PPC ABI, should use the correct numbers. If that means GDB tweaks, so be it. > Personally I find it a bit awkward to use a non-standard register > mapping if there is a mapping defined in the ABI, so I'm in favour of > using the mapping defined in the System V ABI. I don't know if this > is possible though, since changing the mapping might break exception > handling[1]. > > Mark > > [1] From casual inspection this doesn't seem to be the case. The > general purpose registers will still be mapped in the same way, and > the return address column is encoded in the debug info itself. >