diff options
author | Kevin Buettner <kevinb@redhat.com> | 2010-04-06 00:14:43 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2010-04-06 00:14:43 +0000 |
commit | bd333fb734d266b02c6c1b8a94f2bcdcef6fc9ec (patch) | |
tree | 4ab73f4d0af70cff11d6a9e7f5b25ba35a58c086 /gdb/m32c-tdep.c | |
parent | 3df4642a737140c71a0bd9306a546baba32062ed (diff) | |
download | gdb-bd333fb734d266b02c6c1b8a94f2bcdcef6fc9ec.zip gdb-bd333fb734d266b02c6c1b8a94f2bcdcef6fc9ec.tar.gz gdb-bd333fb734d266b02c6c1b8a94f2bcdcef6fc9ec.tar.bz2 |
* m32c-tdep.c (make_types): When calling `arch_type', pass size of
type in bytes, not bits.
Diffstat (limited to 'gdb/m32c-tdep.c')
-rw-r--r-- | gdb/m32c-tdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 49163af..e776cb1 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -194,7 +194,8 @@ make_types (struct gdbarch *arch) this is called, so we avoid using them. */ tdep->voyd = arch_type (arch, TYPE_CODE_VOID, 1, "void"); tdep->ptr_voyd - = arch_type (arch, TYPE_CODE_PTR, gdbarch_ptr_bit (arch), NULL); + = arch_type (arch, TYPE_CODE_PTR, gdbarch_ptr_bit (arch) / TARGET_CHAR_BIT, + NULL); TYPE_TARGET_TYPE (tdep->ptr_voyd) = tdep->voyd; TYPE_UNSIGNED (tdep->ptr_voyd) = 1; tdep->func_voyd = lookup_function_type (tdep->voyd); @@ -202,14 +203,16 @@ make_types (struct gdbarch *arch) sprintf (type_name, "%s_data_addr_t", gdbarch_bfd_arch_info (arch)->printable_name); tdep->data_addr_reg_type - = arch_type (arch, TYPE_CODE_PTR, data_addr_reg_bits, xstrdup (type_name)); + = arch_type (arch, TYPE_CODE_PTR, data_addr_reg_bits / TARGET_CHAR_BIT, + xstrdup (type_name)); TYPE_TARGET_TYPE (tdep->data_addr_reg_type) = tdep->voyd; TYPE_UNSIGNED (tdep->data_addr_reg_type) = 1; sprintf (type_name, "%s_code_addr_t", gdbarch_bfd_arch_info (arch)->printable_name); tdep->code_addr_reg_type - = arch_type (arch, TYPE_CODE_PTR, code_addr_reg_bits, xstrdup (type_name)); + = arch_type (arch, TYPE_CODE_PTR, code_addr_reg_bits / TARGET_CHAR_BIT, + xstrdup (type_name)); TYPE_TARGET_TYPE (tdep->code_addr_reg_type) = tdep->func_voyd; TYPE_UNSIGNED (tdep->code_addr_reg_type) = 1; |