This is the mail archive of the gdb@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]

gdbarch: ABFD no longer available at gdbarch_update_p time


I'm trying to add a ``set mips abi'' as we discussed earlier.  I can't find
a way to do it.  The way CRIS does this sort of thing is patently wrong (for
MIPS at least, if not for CRIS also):

      /* Update the current architecture, if needed.  */
      gdbarch_info_init (&info);
      if (!gdbarch_update_p (info))
        internal_error (__FILE__, __LINE__, "cris_gdbarch_update: failed to update architecture.");

That builds a new architecture based entirely on the defaults.  info.abfd is
gone at that point, and that's how MIPS makes lots of its decisions.  OSABI
support makes this even more pronounced.  I'd like to do:
	gdbarch_info_init_current (&info);
but since architectures have an independent lifetime from BFD objects it's
not clear how I can implement that.  Thoughts?



-- 
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]