Introduce \newdwfnamecommands command that defines multiple
[dwarf-doc.git] / dwarf5 / latexdoc / dwarfnamecmds.tex
1 % Definitions for each of the DWARF names
2 % These eliminate the need to use escapes for the underscores or
3 % add entries for indexing
4 %
5
6 % A command to define multiple helpful DWARF name commands
7 %
8 \newcommand{\newdwfnamecommands}[2]{
9         \expandafter\def\csname #1LINK\endcsname{\index{#2}\hyperlink{chap:#1}{#2}}
10         \expandafter\def\csname #1TARG\endcsname{\index{#2}\hypertarget{chap:#1}{#2}}
11         \expandafter\def\csname #1INDX\endcsname{\index{#2}#2}
12         \expandafter\def\csname #1NAME\endcsname{#2}
13         % The normal, most common use in running text...
14         \expandafter\def\csname #1\endcsname{\csname #1LINK\endcsname}
15         }
16
17 % DW_AT
18 %
19 \newdwfnamecommands{DWATbitsize}{DW\_AT\_bit\_size}
20 \newdwfnamecommands{DWATbytesize}{DW\_AT\_byte\_size}
21 \newdwfnamecommands{DWATbytestride}{DW\_AT\_byte\_stride}
22 \newdwfnamecommands{DWATdatalocation}{DW\_AT\_data\_location}
23 \newdwfnamecommands{DWATlocation}{DW\_AT\_location}
24 \newdwfnamecommands{DWATlowerbound}{DW\_AT\_lower\_bound}
25 \newdwfnamecommands{DWATmacroinfo}{DW\_AT\_macro\_info}
26 \newdwfnamecommands{DWATname}{DW\_AT\_name}
27 \newdwfnamecommands{DWATordering}{DW\_AT\_ordering}
28 \newdwfnamecommands{DWATranges}{DW\_AT\_ranges}
29 \newdwfnamecommands{DWATrank}{DW\_AT\_rank}
30 \newdwfnamecommands{DWATsibling}{DW\_AT\_sibling}
31 \newdwfnamecommands{DWATstmtlist}{DW\_AT\_stmt\_list}
32 \newdwfnamecommands{DWATstringlength}{DW\_AT\_string\_length}
33 \newdwfnamecommands{DWATstringlengthbitsize}{DW\_AT\_string\_length\_bit\_size}
34 \newdwfnamecommands{DWATstringlengthbytesize}{DW\_AT\_string\_length\_byte\_size}
35 \newdwfnamecommands{DWATtype}{DW\_AT\_type}
36 \newdwfnamecommands{DWATupperbound}{DW\_AT\_upper\_bound}
37 %
38 % DW_FORM
39 %
40 \newdwfnamecommands{DWFORMrefsigeight}{DW\_FORM\_ref\_sig8}
41 \newdwfnamecommands{DWFORMstrp}{DW\_FORM\_strp}
42 %
43 % DW_LANG
44 %
45 \newdwfnamecommands{DWLANGGo}{DW\_LANG\_Go}
46 \newdwfnamecommands{DWLANGHaskell}{DW\_LANG\_Haskell}
47 \newdwfnamecommands{DWLANGModulaThree}{DW\_LANG\_Modula3}
48 \newdwfnamecommands{DWLANGOpenCL}{DW\_LANG\_OpenCL}
49 %
50 % DW_OP
51 %
52 \newdwfnamecommands{DWOPcallref}{DW\_OP\_call\_ref}
53 \newdwfnamecommands{DWOPconst}{DW\_OP\_const}
54 \newdwfnamecommands{DWOPderef}{DW\_OP\_deref}
55 \newdwfnamecommands{DWOPformtlsaddress}{DW\_OP\_form\_tls\_address}
56 \newdwfnamecommands{DWOPlit}{DW\_OP\_lit}
57 \newdwfnamecommands{DWOPmult}{DW\_OP\_mult}
58 \newdwfnamecommands{DWOPplus}{DW\_OP\_plus}
59 \newdwfnamecommands{DWOPpushobjectaddress}{DW\_OP\_push\_object\_address}
60 %
61 % DW_ORD
62 %
63 \newdwfnamecommands{DWORDcolmajor}{DW\_ORD\_col\_major}
64 \newdwfnamecommands{DWORDrowmajor}{DW\_ORD\_row\_major}
65 %
66 % DW_TAG
67 %
68 \newdwfnamecommands{DWTAGarraytype}{DW\_TAG\_array\_type}
69 \newdwfnamecommands{DWTAGcoarraytype}{DW\_TAG\_coarray\_type}
70 \newdwfnamecommands{DWTAGgenericsubrange}{DW\_TAG\_generic\_subrange}
71 \newdwfnamecommands{DWTAGmember}{DW\_TAG\_member}
72 \newdwfnamecommands{DWTAGsubrangetype}{DW\_TAG\_subrange\_type}
73 \newdwfnamecommands{DWTAGvariable}{DW\_TAG\_variable}
74 %
75 % .debug, et al
76 %
77 \newcommand{\dotdebugabbrev}[1][]{\addtoindex{\texttt{.debug\_abbrev}}}
78 \newcommand{\dotdebugaranges}[1][]{\addtoindex{\texttt{.debug\_aranges}}}
79 \newcommand{\dotdebugframe}[1][]{\addtoindex{\texttt{.debug\_frame}}}
80 \newcommand{\dotdebuginfo}[1][]{\addtoindex{\texttt{.debug\_info}}}
81 \newcommand{\dotdebugline}[1][]{\addtoindex{\texttt{.debug\_line}}}
82 \newcommand{\dotdebugloc}[1][]{\addtoindex{\texttt{.debug\_loc}}}
83 \newcommand{\dotdebugmacinfo}[1][]{\addtoindex{\texttt{.debug\_mac\_info}}}
84 \newcommand{\dotdebugpubnames}[1][]{\addtoindex{\texttt{.debug\_pubnames}}}
85 \newcommand{\dotdebugpubtypes}[1][]{\addtoindex{\texttt{.debug\_pubtypes}}}
86 \newcommand{\dotdebugranges}[1][]{\addtoindex{\texttt{.debug\_ranges}}}
87 \newcommand{\dotdebugstr}[1][]{\addtoindex{\texttt{.debug\_str}}}
88 \newcommand{\dotdebugtypes}[1][]{\addtoindex{\texttt{.debug\_types}}}
89 %
90 \newcommand{\dotdata}[1][]{\addtoindex{\texttt{.data}}}
91 \newcommand{\dottext}[1][]{\addtoindex{\texttt{.text}}}
92 %
93 % Current section version numbers
94 %
95 \newcommand{\versiondotdebugabbrev}  {5}
96 \newcommand{\versiondotdebugaranges} {2}
97 \newcommand{\versiondotdebugframe}   {4}
98 \newcommand{\versiondotdebuginfo}    {5}
99 \newcommand{\versiondotdebugline}    {4}
100 \newcommand{\versiondotdebugloc}     {5}
101 \newcommand{\versiondotdebugmacinfo} {5}
102 \newcommand{\versiondotdebugpubnames}{2}
103 \newcommand{\versiondotdebugpubtypes}{2}
104 \newcommand{\versiondotdebugranges}  {5}
105 \newcommand{\versiondotdebugstr}     {5}
106 \newcommand{\versiondotdebugtypes}   {\versiondotdebuginfo}
107