This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [WIP] Bare-metal register browsing
- From: Vladimir Prus <vladimir dot prus at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 03 Jun 2015 22:48:54 +0300
- Subject: Re: [WIP] Bare-metal register browsing
- Authentication-results: sourceware.org; auth=none
- References: <55349CDB dot 8010100 at codesourcery dot com> <864mo5yi1x dot fsf at gmail dot com> <553E7F2D dot 6000707 at gmail dot com> <86lhg2nu3x dot fsf at gmail dot com>
On 6/2/2015 4:00 PM, Yao Qi wrote:
Vladimir Prus <vladimir.prus@gmail.com> writes:
<space annex="memory" name="io">
<group name="UART2">
<reg bitsize="32" name="UART2CTL" offset="0x4000e030" read-sensitive="no" save-restore="yes" type="UART0_UART0CTL"/>
<reg bitsize="32" name="UART2LTIM" offset="0x4000e098" read-sensitive="no" save-restore="yes" type="UART0_UART0LTIM"/>
</group>
<group name="UART3">
size="32" name="UART3CTL" offset="0x4000f030" read-sensitive="no" save-restore="yes" type="UART0_UART0CTL"/>
<reg bitsize="32" name="UART3LTIM" offset="0x4000f098" read-sensitive="no" save-restore="yes" type="UART0_UART0LTIM"/>
</group>
It is good to have a "group" element, so that we can easily define a
group of registers. However, what is the usefulness of element "space"?
to define a group of "group" elements?
The original motivation was to indicate that particular set of registers are not usual registers, and must
be accessed in a different way. It's not strictly necessary, we can rewrite the above as:
<group name="io" target-object="spaces" annex="memory">
<group name="UART2">
<reg offset="0x4000e030" .../>
</group>
</group>
Maybe my patch can be modified to not introduce a new target object, after all. We can use:
<group name="io" target-object="memory">
<group name="UART2">
<reg offset="0x4000e030" .../>
</group>
</group>
to describe memory-mapped io registers.
It sounds like this should be possible to implement. What do you think?
Two questions:
- Is 'group' ok, or 'register-group' would be more clear? We found that the size of these XML
files can be sometimes a problem
- I'd propose that 'target-object' and 'annex' attribute are only allowed for top-level 'group' element,
and not for top-level 'reg' or nested 'group' element, to make implementation simpler. Is that fine?
Thanks,
Volodya