This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

powerpc port question


Hi all,

I try to port gdb to powerpc FreeBSD. So far it looks promising.

=== gdb Summary ===

# of expected passes            10627
# of unexpected failures        202
# of expected failures          41
# of known failures             62
# of unresolved testcases       1
# of untested testcases         9
# of unsupported tests          14


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.


Running the testsuite showed me something I do not understand.

When I start up gdb I get this warning:

[wolfram:~/gdb-6.6-build/gdb] andreast% ./gdb -version

warning: A handler for the OS ABI "FreeBSD ELF" is not built into this configuration
of GDB. Attempting to continue with the default rs6000:6000 settings.
....


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);


Jumping into this function I see the expected arch_info:


*arch_info = {bits_per_word = 32, bits_per_address = 32, bits_per_byte = 8,
arch = bfd_arch_powerpc, mach = 32, arch_name = 0x19ef9e8 "powerpc",
printable_name = 0x1a69608 "powerpc:common", section_align_power = 3,
the_default = 1, compatible = 0x19c3fa8 <powerpc_compatible>,
scan = 0x1972a18 <bfd_default_scan>, next = 0x1a6930c}


Then in initialize_current_architecture (arch-utils.c)

my arch_info gets set to:

 = {bits_per_word = 32, bits_per_address = 32, bits_per_byte = 8,
  arch = bfd_arch_rs6000, mach = 6000, arch_name = 0x1a68624 "rs6000",
  printable_name = 0x1a692ac "rs6000:6000", section_align_power = 3,
  the_default = 1, compatible = 0x19c3ee8 <rs6000_compatible>,
  scan = 0x1972a18 <bfd_default_scan>, next = 0x1a691f4}


I can not find out why it gets overwritten with rs6000 stuff. Is there a hidden feature I missed to implement? Or how could I continue to track this down?
Also:
(gdb) show endian
The target is assumed to be big endian


Hm, doing the same on the ppclinux box tells me something about "The target endianness is set automatically..."

Looking at this part of the code I wonder where target_byte_order_user is set to BFD_BIG_ENDIAN?

Any hints appreciated.

TIA,
Andreas




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]