* solib.c (solib_bfd_open): Output a warning if solib's
architecture is not compatible with inferior's architecture.
+2009-07-09 Hui Zhu <teawater@gmail.com>
+
+ * solib.c (solib_bfd_open): Output a warning if solib's
+ architecture is not compatible with inferior's architecture.
+
2009-07-09 Ulrich Weigand <uweigand@de.ibm.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
char *found_pathname;
int found_file;
bfd *abfd;
+ const struct bfd_arch_info *b;
/* Use target-specific override if present. */
if (ops->bfd_open)
found_pathname, bfd_errmsg (bfd_get_error ()));
}
+ /* Check bfd arch. */
+ b = gdbarch_bfd_arch_info (target_gdbarch);
+ if (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);
+
return abfd;
}