diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-04-12 07:37:18 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-04-12 07:37:18 +0000 |
commit | 27b1578512b8f5594a84e588a19a6aa49704ffe5 (patch) | |
tree | 3b4ebca25485066393b7fc8ee4d29cd823a6f84f /gdb/rs6000-tdep.c | |
parent | 5d57ee30b32f18261ff10f664e5b5f8c9e5052e9 (diff) | |
download | gdb-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.c | 6 |
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. */ |