From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Eli Zaretskii Cc: davea@quasar.engr.sgi.com, gdb@sources.redhat.com Subject: Re: GDB on SGI Irix 6.5 Date: Wed, 13 Jun 2001 13:05:00 -0000 Message-id: <3B27C78A.8090205@cygnus.com> References: <200106131650.JAA27856@quasar.engr.sgi.com> <3405-Wed13Jun2001213809+0300-eliz@is.elta.co.il> X-SW-Source: 2001-06/msg00105.html > So you are saying that there's nothing in the file--not a single > thing--that would allow GDB to find out if the debug info is for 64 or > n32 ABI? > > Would it be reasonable then to try one format, and if that fails, try > the other? (I know that it fails somewhere, because when I try to > debug a 64-bit executable with GDB built from current CVS, it > complains about something like ``wrong version'' (IIRC).) There must be something. What does `file foo` do? Have a peak at the magic numbers. See: mips-tdep.c:mips_gdbarch_init(): /* Extract the elf_flags if available */ if (info.abfd != NULL && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour) elf_flags = elf_elfheader (info.abfd)->e_flags; else elf_flags = 0; /* Check ELF_FLAGS to see if it specifies the ABI being used. */ switch ((elf_flags & EF_MIPS_ABI)) { Andrew