This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Check solib bfd arch
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: teawater at gmail dot com (Hui Zhu)
- Cc: gdb-patches at sourceware dot org (gdb-patches ml), msnyder at vmware dot com (Michael Snyder)
- Date: Sun, 5 Jul 2009 23:35:45 +0200 (CEST)
- Subject: Re: [RFA] Check solib bfd arch
Hui Zhu wrote:
> + /* Check bfd arch. */
> + if (bfd_get_arch (abfd) != gdbarch_bfd_arch_info (target_gdbarch)->arch)
This test seems to strict; there are cases where code of a different
architecture *can* actually run on the current architecture (e.g.
bfd_arch_rs6000 vs. bfd_arch_powerpc).
The correct check would be something alone the lines of
osabi.c:can_run_code_for.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com