On Thu, Jun 13, 2013 at 9:35 AM, Franck Jullien <[email protected]>wrote:

>
> 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]>
>>>
>>>>
>>>> Why change reg_group from enum to string? According to gdb docs it can
>>>> only take one of those three values.
>>>>
>>>> Because in the openrisc port of GDB, we add the possibility to use
>>> arbitrary strings.
>>>
>>
>>
> Although I wonder if you're not misusing what register groups was intended
>> for. Why do you need arbitrary groups?
>>
>>
> 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
>
>
Nice. But I thought that was what "features" was for. I mean that I'd
expect timer to be a feature ("some logical portion of the target system"),
not a register group (which seems to be more connected to the *type* of the
register). But I'm no GDB expert at all so that's just my guess. How does
info registers handle registers from different features? Can you list
registers by feature, not by group?

I think the following looks more intuitive compared to creating arbitrary
groups to hold the different register sets:

  <feature name="org.gnu.gdb.or1k.timer">
    <reg name="ttmr"  bitsize="32" regnum="2216"/>
    <reg name="ttcr"  bitsize="32" regnum="2217"/>
  </feature>


Remote debugging using :50001

...

Found    2 registers in feature org.gnu.gdb.or1k.timer
Found 2218 registers in the tdesc file


/Andreas
------------------------------------------------------------------------------
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

Reply via email to