From Jimi X <jimix@watson.ibm.com>:
authorKevin Buettner <kevinb@redhat.com>
Fri, 12 Apr 2002 07:37:18 +0000 (07:37 +0000)
committerKevin Buettner <kevinb@redhat.com>
Fri, 12 Apr 2002 07:37:18 +0000 (07:37 +0000)
* rs6000-tdep.c (rs6000_gdbarch_init): Compute ``wordsize'' from
bfd info.

gdb/ChangeLog
gdb/rs6000-tdep.c

index 10a32fd96533e9316f52f31a10b01d10cd9d2735..9bd83cc1fc69a039d9cc48bbf54215ef918b76b0 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-12  Kevin Buettner  <kevinb@redhat.com>
+
+       From Jimi X <jimix@watson.ibm.com>:
+       * rs6000-tdep.c (rs6000_gdbarch_init): Compute ``wordsize'' from
+       bfd info.
+
 2002-04-12  Kevin Buettner  <kevinb@redhat.com>
 
        From Jimi X <jimix@watson.ibm.com>:
index 72e1fbd3c7852f19df8510478ab1ca66c3740a6c..70683af25c63e17e88f41a81d0490913e42fbb4c 100644 (file)
@@ -2499,7 +2499,11 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     }
   else
     {
-      wordsize = 4;
+      if (info.bfd_arch_info != NULL && info.bfd_arch_info->bits_per_word != 0)
+       wordsize = info.bfd_arch_info->bits_per_word /
+         info.bfd_arch_info->bits_per_byte;
+      else
+       wordsize = 4;
     }
 
   /* Find a candidate among extant architectures. */