more long long problems "objdump --debugging"

Greg McGary greg@mcgary.org
Fri Jan 11 01:20:00 GMT 2008


stabs.c uses bfd_vma to hold enum members.  That doesn't work when 
bfd_vma is 32-bits but the enum member needs 64.  This is a general 
problem that applies to debug readers of all formats.  Debug info needs 
to express integer values sized according to the source language, but 
binutils ties the internal representation to bfd_vma, which is 
determined by target machine arch.

dwarf.h makes an effort by defining dwarf_vma:

#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
/* We can't use any bfd types here since readelf may define BFD64 and
   objdump may not.  */
typedef unsigned long long dwarf_vma;
typedef unsigned long long dwarf_size_type;
#else
typedef unsigned long dwarf_vma;
typedef unsigned long dwarf_size_type;
#endif

I'd like to make invent a universal longest-int type used by all 
debug-info readers, and standardize on a conditional.  Is there any 
reason we shouldn't replace the test above with "#if 
BFD_HOST_64BIT_LONG_LONG" ??

G




More information about the Binutils mailing list