Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andreas Tobler <andreast-list@fgznet.ch>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: powerpc port question
Date: Wed, 09 Sep 2009 18:26:00 -0000	[thread overview]
Message-ID: <4AA7F35A.8080705@fgznet.ch> (raw)

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




             reply	other threads:[~2009-09-09 18:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 18:26 Andreas Tobler [this message]
2009-09-09 18:50 ` Mark Kettenis
2009-09-09 19:14   ` Andreas Tobler
2009-09-09 19:30     ` Mark Kettenis
2009-09-09 19:55       ` Andreas Tobler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AA7F35A.8080705@fgznet.ch \
    --to=andreast-list@fgznet.ch \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox