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 | |
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')
-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. */ |