This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [Fwd: Re: gas (or maybe gdb/gcc) problem with o64 Mips andDWARF]
- From: Eric Christopher <echristo at redhat dot com>
- To: "Martin M. Hunt" <hunt at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 25 Mar 2003 14:58:49 -0800
- Subject: Re: [Fwd: Re: gas (or maybe gdb/gcc) problem with o64 Mips andDWARF]
- References: <1048632554.1136.0.camel@Dragon>
> The problem appears to be in gas/dwarf2dbg.c in function dwarf2_finish()
> which has the following:
>
> /* Calculate the size of an address for the target machine. */
> sizeof_address = bfd_arch_bits_per_address (stdoutput) / 8;
>
> So gas is not getting address size from the compilation unit header, but
> from the architecture, which for mips64-elf is "mips:4000". So how
> should this work? I cannot see how to grab info from the CU header. And
> I don't know how else to find out from GCC what size a pointer is.
>
> (What happens if I add "-mlong64" to the compile line? Now gcc
> generates CUs with 64-bit addresses and gas agrees and all works well.)
>
Right. This is a known bug in the mips port right now where we have two
different possible pointer sizes, however, bfd's static tables only have
one entry. I/someone will need to construct duplicate tables for 32 and
64-bit pointers.
-eric
--
o/~ got caught stealing fire from the sky o/~