This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: multiarch x86_64 target
- To: Jiri Smid <smid at suse dot cz>
- Subject: Re: multiarch x86_64 target
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 29 Aug 2001 11:04:32 -0400
- Cc: gdb at sources dot redhat dot com
- References: <s8vbskzf6pa.fsf@naga.suse.cz>
> Hello,
>
> I am converting x86_64 target to multiarch as you wanted. The bfd
> architecture for both i386 and x86_64 is bfd_arch_i386. And these
> targets are diferentiated by machine type.
> Due to the i386 target is not yet multiarched I have a problem how to register
> x86_64 in gdb.
> I have created function i386_gdbarch_init which behaves that if target
> vector for machine type differs from bfd_mach_x86_64 should be created
> then internal_error(Not yet implemented) is invoked.
> But when the gdb starts up then there is created target vector for default
> machine type - bfd_mach_i386_i386. Thus gdb can't run.
In x86-64-tdep.c?
> Do you have any ideas how to solve it?
Ulgh! For the short term, I'd just ignore it - return the x86-64 vector
regardless. The one thing I wouldn't be trying to do is trying to
multi-arch the x86.
I should also note a known bug related to this (it won't affect your
code). The architecture selection mechanism currently doesn't handle
multiple registrants for the same architecture (eg raw x86 vs
x86-linux). x86 vs x86_64 is going to be another example of this. Once
the x86 is multi-arched a solution will be needed.
Andrew