From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3478 invoked by alias); 9 Sep 2009 18:26:49 -0000 Received: (qmail 3392 invoked by uid 22791); 9 Sep 2009 18:26:47 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Sep 2009 18:26:38 +0000 Received: from deuterium.andreas.nets ([91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id n89IQYr1082935 for ; Wed, 9 Sep 2009 20:26:35 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <4AA7F35A.8080705@fgznet.ch> Date: Wed, 09 Sep 2009 18:26:00 -0000 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: "gdb@sourceware.org" Subject: powerpc port question Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00147.txt.bz2 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 , scan = 0x1972a18 , 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 , scan = 0x1972a18 , 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