This is the mail archive of the gdb-patches@sourceware.cygnus.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]

Re: RFA: print addresses that are longer than pointers, take two


Jim Blandy wrote:
> 
> > Now consider a mips32 program (in elf32) running on a mips64 target
> > (another would be sparc32/sparc64).  ADDRESS_TO_POINTER et.al. would
> > handle the translation required by ``void* <=> CORE_ADDR''.  However,
> > what about the address information contained in the symtab and debug
> > sections. Wouldn't that also need to be converted to a cannonical form?
> 
> Those addresses should be in canonical form already, as provided by
> BFD.  As I said in the paragraph after the one you quoted:

> > Symbol addresses are always byte addresses, so CORE_ADDRs and symbol
> > addresses are the same thing.
> 
> So, Dwarf 2 info should hold byte addresses, BFD should provide byte
> addresses, and so on.

In the case I noted above, the Dwarf 2 info would contain a 32 bit
address yet the target can potentially access 64 bits of address.  That
abbreviated 32 bit address needs to be either sign or zero extended into
a canonical 64 bit value.

Is that correct?

> Can you find a specific instance where the wrong thing happens?

The first problem, with the symbol table, was fixed in BFD.  It now sign
or zero extends its addresses depending on the target.  I'm now running
through testsuites and checking for other cases.

I'm just trying to be clear on the behavour I should see so, if further
problems occure, I know which way to fix them.

	Andrew

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