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
Hi Alan,
On Mon, 29 Jan 2018 11:01:25 +0000
Alan Hayward <Alan.Hayward@arm.com> wrote:
> >
> > 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.
I was more thinking of functions like tdesc_add_* and tdesc_create_* (including
tdesc_create_reg). They are not covered by your make_gdb_type patch. The way
I see it the changes needed to be made are quite small. Unfortunately they
require to regenerate the cfiles making the resulting patches large and hard
to read.
Philipp
> >
> > 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.