This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Check solib bfd arch
On Friday 18 September 2009 15:39:09, Daniel Jacobowitz wrote:
> I suspect the check is going to be problematic whether we do this or
> not, though.
Could we compare the solib's target arch with
tdesc_architecture(target_read_description()) directly --- but only
if available ---, instead of comparing it with target_gdbarch?
In pseudo-patch:
- b = gdbarch_bfd_arch_info (target_gdbarch);
- if (b->compatible (b, bfd_get_arch_info (abfd)) != b)
+ tdesc = target_read_description ();
+ b = (tdesc != NULL) ? gdbarch_bfd_arch_info (tdesc_architecture (tdesc)) : NULL;
+ if (b != NULL && b->compatible (b, bfd_get_arch_info (abfd)) != b)
warning (_("`%s': Shared library architecture %s is not compatible "
"with target architecture %s."), found_pathname,
bfd_get_arch_info (abfd)->printable_name, b->printable_name);
--
Pedro Alves