From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27613 invoked by alias); 29 Apr 2002 18:44:26 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26910 invoked from network); 29 Apr 2002 18:43:10 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 29 Apr 2002 18:43:10 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 172G7C-0000xY-00 for ; Mon, 29 Apr 2002 14:43:10 -0400 Date: Mon, 29 Apr 2002 11:44:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: Adding dwarf2 regnum mapping Message-ID: <20020429144310.A3651@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <3CCD899D.3020903@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CCD899D.3020903@suse.cz> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-04/txt/msg00490.txt.bz2 On Mon, Apr 29, 2002 at 07:57:49PM +0200, Michal Ludvig wrote: > Hi, > I'm adding x86_64_dwarf2_reg_to_regno() function but don't know how to > let gdb know it's there. I got inspired by i386 and put > > #define DWARF2_REG_TO_REGNUM(reg) x86_64_dwarf2_reg_to_regnum ((reg)) > > into nm-x86-64.h. Unfortunately then the compilation fails with: > > gdbarch.h:664:2: #error "Non multi-arch definition of DWARF2_REG_TO_REGNUM" > > If I don't put this define into nm.h, the new function isn't used at > all. Can someone please tell me how do I tell gdb about this function > while retaining the target multiarch_pure? If I change the target to > multiarch_partial, everything works just fine, but I don't think it's > the right way to go. mn10300-tdep.c: set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum); s390-tdep.c: set_gdbarch_dwarf2_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum); Do it just like either of those; set it in i386_gdbarch_init. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer