ChangeLog:
[deliverable/binutils-gdb.git] / gdb / rs6000-tdep.c
index 295c6b2779c6eb83501fa8bfcb0e6a18567f14fd..cd9611582445a51f5046757060de61c8a847abb8 100644 (file)
@@ -3360,6 +3360,16 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   int num_pseudoregs = 0;
   int cur_reg;
 
+  /* INFO may refer to a binary that is not of the PowerPC architecture,
+     e.g. when debugging a stand-alone SPE executable on a Cell/B.E. system.
+     In this case, we must not attempt to infer properties of the (PowerPC
+     side) of the target system from properties of that executable.  Trust
+     the target description instead.  */
+  if (info.abfd
+      && bfd_get_arch (info.abfd) != bfd_arch_powerpc
+      && bfd_get_arch (info.abfd) != bfd_arch_rs6000)
+    info.abfd = NULL;
+
   from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
     bfd_get_flavour (info.abfd) == bfd_target_xcoff_flavour;
 
This page took 0.025943 seconds and 4 git commands to generate.