This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: powerpc port question
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: andreast-list at fgznet dot ch
- Cc: gdb at sourceware dot org
- Date: Wed, 9 Sep 2009 20:49:48 +0200 (CEST)
- Subject: Re: powerpc port question
- References: <4AA7F35A.8080705@fgznet.ch>
> Date: Wed, 09 Sep 2009 20:26:34 +0200
> From: Andreas Tobler <andreast-list@fgznet.ch>
>
> My attempt bases on gdb-6.6 source, GPL-2 based. The structure of the
> source is more or less equal as the NetBSD port for powerpc.
In general you want to look at the OpenBSD support instead of NetBSD. It's in a much better shape ;).
> I digged through the source and I do not get the point.
>
> In my _initialize_ppcfbsd_tdep I call
>
> gdbarch_register_osabi(bfd_arch_powerpc, bfd_mach_ppc,
> GDB_OSABI_FREEBSD_ELF,
> ppcfbsd_init_abi);
You'll need to add something like:
gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_FREEBSD_ELF,
ppcfbsd_init_abi);
gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_FREEBSD_ELF,
ppcfbsd_init_abi);
(both lines seem to be necessary given the way BFD makes a distinction
between rs6000 and powerpc, but ELF doesn't).