This is the mail archive of the gdb@sources.redhat.com 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]

Re: DWARF2 line number problem


On Tuesday 20 August 2002 10:13 pm, you wrote:
> "Martin M. Hunt" <hunt@redhat.com> writes:
> > I have a problem and I'm not sure what the correct solution would be.
> >
> > I'm looking at gcc mips output.  The compilation unit says pointer
> > size is 4, but the DWARF line section is setting the address to a
> > sign-extended 8-byte value.  GDB cleverly ignores the actual size of
> > the extended opcode and reads a 4-byte value then starts parsing the
> > rest of the bytes as line opcodes!
>
> Could you compile your program with -save-temps -dA, and post the
> assembly code?

I'll send it to you if you want, but the problem  is not there.

The problem appears to be either GAS or GDB depending on how we interpret the 
DWARF spec. 

GAS calculates the size of addresses to put in the line table from  
bfd_arch_bits_per_address() which returns 64 even though in the case of o32 
we are using a 32-bit ABI.  gas is passed "-32" on its command line, so 
perhaps it should be using this?

I am wondering why no one else has run into this problem?  Maybe I am missing 
something?  


-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.


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