This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, FT32] Proper support for address <-> pointer conversions
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: James Bowman <james dot bowman at ftdichip dot com>
- Cc: Doug Evans <dje at google dot com>, Yao Qi <qiyaoltc at gmail dot com>, "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 23 Sep 2015 08:46:03 +0100
- Subject: Re: [PATCH, FT32] Proper support for address <-> pointer conversions
- Authentication-results: sourceware.org; auth=none
- References: <CA9BBF0458F83C4F9051448B941B57D119614F72 at glaexch1> <86wpvi9zst dot fsf at gmail dot com> <CA9BBF0458F83C4F9051448B941B57D119614FCF at glaexch1> <CADPb22SwEhFcgaKyJJqnFm_T1XuhB8xuLzwC-VjncnNbgfmkFA at mail dot gmail dot com> <CA9BBF0458F83C4F9051448B941B57D119615004 at glaexch1>
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 (éå)