From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13705 invoked by alias); 29 Apr 2002 19:18:47 -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 13684 invoked from network); 29 Apr 2002 19:18:44 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 29 Apr 2002 19:18:44 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 4FC145EA11; Mon, 29 Apr 2002 14:18:42 -0500 (EST) To: Michal Ludvig Cc: gdb@sources.redhat.com Subject: Re: Adding dwarf2 regnum mapping References: <3CCD899D.3020903@suse.cz> From: Jim Blandy Date: Mon, 29 Apr 2002 12:18:00 -0000 In-Reply-To: <3CCD899D.3020903@suse.cz> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00492.txt.bz2 Michal Ludvig writes: > 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. Why not do the right thing in x86-64-tdep.c:i386_gdbarch_init?