This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

Re: [PATCH] mips n64 support, part 1


On Thu, Aug 01, 2002 at 12:13:36PM -0700, Kevin Buettner wrote:
> On Aug 1,  3:06pm, Daniel Jacobowitz wrote:
> 
> > On Thu, Aug 01, 2002 at 03:02:18PM -0400, Andrew Cagney wrote:
> > > >@@ -4352,7 +4354,11 @@ mips_gdbarch_init (struct gdbarch_info i
> > > > 	  break;
> > > > 	case bfd_mach_mips8000:
> > > > 	case bfd_mach_mips10000:
> > > >-	  mips_abi = MIPS_ABI_N32;
> > > >+	  if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
> > > >+	      && elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS64)
> > > >+	    mips_abi = MIPS_ABI_N64;
> > > >+	  else
> > > >+	    mips_abi = MIPS_ABI_N32;
> > > > 	  break;
> > > > 	}
> > > >     }
> > > 
> > > This bit should at least have a comment explaining the assumptions 
> > > behind it -- have you actually seen this code being triggered?  I don't 
> > > think the code is ever reached (unless the executable is very old) as 
> > > the earlier:
> > > 
> > >   /* GCC creates a pseudo-section whose name describes the ABI.  */
> > >   if (mips_abi == MIPS_ABI_UNKNOWN && info.abfd != NULL)
> > >     bfd_map_over_sections (info.abfd, mips_find_abi_section, &mips_abi);
> > > 
> > > should catch most modern cases.
> > 
> > Kevin is using IRIX CC, I believe.
> 
> Yes.
> 
> > The marker sections are GCC-specific.
> 
> Actually, I think they're platform specific.  In the tests I did yesterday,
> I didn't see the marker sections in binaries created by gcc either.
> 
> I'll add a comment though.

Blah.  They appear to be conditioned on TARGET_GAS, for whatever
reason; Eric added that in Sept. 2001, not long after they were
originally added.

Hmm...
        (mips_asm_file_start): Add new section to pass abi to gdb.

Just curious - did Red Hat's internal tree have code in GDB to read
this, before I added it to the community tree?  There was about nine
months worth of lag there.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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