This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, FT32] Proper support for address <-> pointer conversions


James Bowman <james.bowman@ftdichip.com> writes:

> 2015-09-22  James Bowman  <james.bowman@ftdichip.com>
>
> 	* ft32-tdep.c: Add "pointer_to_address" gdbarch method.
> 	Add "address_class_type_flags" gdbarch method.
> 	Add "address_class_name_to_type" gdbarch method.
> 	Add "address_class_type_flags_to_name" gdbarch method.
> 	* ft32-tdep.h (struct gdbarch_tdep): Add pc_type.
>

The ChangeLog is still wrong to me.  You need also read GNU coding
standard, https://www.gnu.org/prep/standards/standards.html

	* 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.

Otherwise, the patch looks good to me.

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]