This is the mail archive of the
mailing list for the GDB project.
Re: Adding dwarf2 regnum mapping
- From: Jim Blandy <jimb at redhat dot com>
- To: Michal Ludvig <mludvig at suse dot cz>
- Cc: gdb at sources dot redhat dot com
- Date: 29 Apr 2002 14:18:41 -0500
- Subject: Re: Adding dwarf2 regnum mapping
- References: <3CCD899D.firstname.lastname@example.org>
Michal Ludvig <email@example.com> 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?