[FT32] Implement pointer to address conversion method.
authorjamesbowman <jamesb@excamera.com>
Thu, 24 Sep 2015 23:07:35 +0000 (16:07 -0700)
committerjamesbowman <jamesb@excamera.com>
Thu, 24 Sep 2015 23:08:58 +0000 (16:08 -0700)
commit623fb77545da1272c7602cd51a4c187b66c366c8
tree951af84780653264c5d85ba91fba77c074593d4a
parent3074964fcfff45aef4584b84550eeef84f902fc4
[FT32] Implement pointer to address conversion method.

FT32 is a Harvard architecture with two address spaces -- RAM and flash.
The patch properly implements the pointer to address conversion method.
There are some other small fixes to handle address spaces.

gdb/
* ft32-tdep.c (ft32_register_type): Return gdbarch_tdep
(gdbarch)->pc_type instead of builtin_func_ptr.
(ft32_pointer_to_address): New function.
(ft32_address_class_type_flags): New function.
(ft32_address_class_type_flags_to_name): New function.
(ft32_address_class_name_to_type_flags): New function.
(ft32_gdbarch_init): Set tdep->pc_type.  Call
set_gdbarch_pointer_to_address,
set_gdbarch_address_class_type_flags
set_gdbarch_address_class_name_to_type_flags,
and set_gdbarch_address_class_type_flags_to_name.
* ft32-tdep.h (struct gdbarch_tdep) <pc_type>: New field.
gdb/ChangeLog
gdb/ft32-tdep.c
gdb/ft32-tdep.h