This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/6] : Commonise various target-descriptions.c functions
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Alan Hayward <Alan dot Hayward at arm dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 19 Jan 2018 23:05:49 +0000
- Subject: Re: [PATCH 1/6] : Commonise various target-descriptions.c functions
- Authentication-results: sourceware.org; auth=none
- References: <EAA396DF-9E34-45B9-A3B1-EC7FB294ADDE@arm.com> <CFD4D062-238A-456A-97B1-892FF8D32DF1@arm.com>
On Tue, Jan 16, 2018 at 9:50 AM, Alan Hayward <Alan.Hayward@arm.com> wrote:
> This patch simply moves functionality from target-descriptions.c
> to the common files arch/tdesc.c and arch/tdesc.h.
> No functionality is changed.
> This will allow usage by gdbserver.
> The "#ifndef GDBSERVER" around the functions in arch/tdesc.h will be removed
> in the next patch.
>
It is not right to move everything to arch/ and remove unused bits. GDB now
is able to visit different tdesc_element, you want to do the same in
GDBserver, and share the code in arch/. However, tdesc stuff in GDB and
GDBserver are quite different, so the 1st step, IMO, is to make GDBserver
more similar to GDB. You can change each tdesc-related struct in each
patch, and refactor GDBserver bits. Then, only move *needed* structures
to arch/, and move one structure in one patch each, if possible.
--
Yao (齐尧)