Re: [PATCH v2 5/8] Use tdesc types in gdbserver tdesc

Alan Hayward
2018-01-29T11:01:37Z

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