manual copyright year range of various GDB files to add 2023
[binutils-gdb.git] / gdb / features / gdbserver-regs.xsl
bloba1e86073edf9ce0509f2ecad70b5c1549ad1bf55
1 <xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:output method="text"/>
5 <xsl:variable name="total" select="count(//reg)"/>
7 <xsl:template name="pad">
8 <xsl:param name="count" select="0"/>
9 <xsl:text>0:
10 </xsl:text>
11 <xsl:if test="$count > 1">
12 <xsl:call-template name="pad">
13 <xsl:with-param name="count" select="$count - 1"/>
14 </xsl:call-template>
15 </xsl:if>
16 </xsl:template>
18 <xsl:template name="reg">
19 <xsl:param name="which" select="1"/>
20 <xsl:param name="nextnum" select="0"/>
21 <xsl:variable name="thisnum" select="@regnum"/>
22 <xsl:if test="$nextnum &lt; number(@regnum)">
23 <xsl:call-template name="pad">
24 <xsl:with-param name="count" select="@regnum - $nextnum"/>
25 </xsl:call-template>
26 </xsl:if>
27 <xsl:value-of select="@bitsize"/>
28 <xsl:text>:</xsl:text>
29 <xsl:value-of select="@name"/>
30 <xsl:text>
31 </xsl:text>
32 <xsl:if test="$which &lt; $total">
33 <xsl:for-each select="/descendant::reg[$which + 1]">
34 <xsl:call-template name="reg">
35 <xsl:with-param name="which" select="$which + 1"/>
36 <xsl:with-param name="nextnum" select="$thisnum + 1"/>
37 </xsl:call-template>
38 </xsl:for-each>
39 </xsl:if>
40 </xsl:template>
42 <xsl:template match="/">
43 <xsl:for-each select="/descendant::reg[1]">
44 <xsl:call-template name="reg"/>
45 </xsl:for-each>
46 </xsl:template>
47 </xsl:stylesheet>