diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 10a32fd..9bd83cc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,12 @@ 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>: * rs6000-tdep.c (powerpc64, 630, rs64ii, rs64iii): Define register sets for these processor variants. 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. */ |