2013/6/13 Andreas Fritiofson <[email protected]>
> On Thu, Jun 13, 2013 at 9:18 AM, Franck Jullien
> <[email protected]>wrote:
>
>>
>>
>>
>> 2013/6/13 Andreas Fritiofson <[email protected]>
>>
>>>
>>>
>>>
>>> On Sun, Jun 9, 2013 at 7:21 PM, <[email protected]> wrote:
>>>
>>>>
>>>> -enum reg_group {
>>>> - REG_GROUP_GENERAL,
>>>> - REG_GROUP_FLOAT,
>>>> - REG_GROUP_VECTOR,
>>>> -};
>>>> -
>>>> struct reg_feature {
>>>> const char *name;
>>>> };
>>>> @@ -129,7 +123,7 @@ struct reg {
>>>> bool valid;
>>>> uint32_t size;
>>>> struct reg_data_type *reg_data_type;
>>>> - enum reg_group group;
>>>> + const char *group;
>>>>
>>>
>>> Why change reg_group from enum to string? According to gdb docs it can
>>> only take one of those three values.
>>>
>>> /Andreas
>>>
>>
>> Because in the openrisc port of GDB, we add the possibility to use
>> arbitrary strings.
>>
>
> The reason I favor an enum is that you shouldn't need to read GDB docs to
> find out the valid strings when you write a target implementation. But, OK,
> if you allow any string there I can see the point.
>
> Although I wonder if you're not misusing what register groups was intended
> for. Why do you need arbitrary groups?
>
> /Andreas
>
>
We create registers group based on tdesc registers group name. Then we
can use "info regisrers timer" for example. See:
https://github.com/openrisc/or1k-src/commit/943c7d500654a312bf64c90935d2d1b93f2a9e90#L1R1873
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel