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: Test for 32/64 bit object file?


   Date: Wed, 17 Nov 1999 07:20:16 +1100
   From: Andrew Cagney <ac131313@cygnus.com>

   Is there a way of determining if an object file is 32 or 64 bit?  (eg
   elf32/elf64, aout32 vs aout64).

Why do you want to know?  I don't mean to be snide; it's just that
that distinction usually isn't interesting.

   Perhaphs bfd_arch_bits_per_address(ABFD) is correct?

That will tell you whether the CPU uses 32 bits in an address or 64
bits in an address.  It's not the same as elf32 vs. elf64, but it may
be what you need to know.

Ian

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