aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-04-12 07:37:18 +0000
committerKevin Buettner <kevinb@redhat.com>2002-04-12 07:37:18 +0000
commit27b1578512b8f5594a84e588a19a6aa49704ffe5 (patch)
tree3b4ebca25485066393b7fc8ee4d29cd823a6f84f /gdb/rs6000-tdep.c
parent5d57ee30b32f18261ff10f664e5b5f8c9e5052e9 (diff)
downloadgdb-27b1578512b8f5594a84e588a19a6aa49704ffe5.zip
gdb-27b1578512b8f5594a84e588a19a6aa49704ffe5.tar.gz
gdb-27b1578512b8f5594a84e588a19a6aa49704ffe5.tar.bz2
From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (rs6000_gdbarch_init): Compute ``wordsize'' from bfd info.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 72e1fbd..70683af 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -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. */