This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
more long long problems "objdump --debugging"
- From: Greg McGary <greg at mcgary dot org>
- To: binutils at sourceware dot org
- Cc: amodra at bigpond dot net dot au
- Date: Wed, 09 Jan 2008 19:12:41 -0800
- Subject: more long long problems "objdump --debugging"
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