Hi, Franck,

I merged your modification to http://openocd.zylin.com/#/c/1382/
Please help me to review it.

Thanks.


2013/6/13 Franck Jullien <franck.jull...@gmail.com>

>
>
>
> 2013/6/13 Andreas Fritiofson <andreas.fritiof...@gmail.com>
>
>>
>> On Thu, Jun 13, 2013 at 9:35 AM, Franck Jullien <franck.jull...@gmail.com
>> > wrote:
>>
>>>
>>> 2013/6/13 Andreas Fritiofson <andreas.fritiof...@gmail.com>
>>>
>>>> On Thu, Jun 13, 2013 at 9:18 AM, Franck Jullien <
>>>> franck.jull...@gmail.com> wrote:
>>>>
>>>>>
>>>>> 2013/6/13 Andreas Fritiofson <andreas.fritiof...@gmail.com>
>>>>>
>>>>>>
>>>>>> 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'm not a GDB expert too, just a hacker ;)
>
>
>
>> 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 is what I did first but it needed to much changes in the tdesc common
> code. So I hardcoded the features names in or1k-tdep and choose to get
> registers group from the tdesc reg groups.
>
> I can't remember if we can list registers by features...I told you, I'm
> not an expert and I did this some times ago...
>
> Franck.
>
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to