This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 5/8] Use tdesc types in gdbserver tdesc
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: Omair Javaid <omair dot javaid at linaro dot org>
- Cc: Philipp Rudo <prudo at linux dot vnet dot ibm dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Mon, 29 Jan 2018 11:01:25 +0000
- Subject: Re: [PATCH v2 5/8] Use tdesc types in gdbserver tdesc
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan dot Hayward at arm dot com;
- Nodisclaimer: True
- References: <7C97CC6A-92CB-4702-820D-206022F07102@arm.com> <771B81D3-D1C8-4D94-9713-3AD466DBA5F8@arm.com> <20180125141259.544597d6@ThinkPad> <CANW4E-2DAFQqCC5sjRteWraiwLfjrVRb7hQ2QThioqW-1v1+2w@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
>
> With tdesc_features, tdesc_type_with_fields etc. being no longer opaque and
> so many functions shared many of them could be made class methods. However
> that exceeds the scope of this patch set, but should be kept in mind for the
> future.
The "[PATCH] Use visitors for make_gdb_type” patch should take care of a large set of them.
>
> Apparently, it may seem better to move the whole target description code to a common location and share it between gdb and gdbserver.
>
> Target descriptions are architecture specific but at the same time target description class code is architecture independent. So as highlighted by Phillip this code should be moved out of arc/ folder and placed elsewhere.
>
Agreed.
Is common/ the best place? I can’t see any other directory that looks right.
> It may seem a clean approach to create the division now and also refactor code now than doing it in a later patch. Only gotcha here is that this code is used by multiple targets so need to be tested aggressively.
That’s why I didn’t want to refactor too much in one set.
Thanks,
Alan.