\subsubsection{Type signature computation 1: DWARF representation}
\label{app:typesignaturecomputation1dwarfrepresentation}
-
+% We keep the : (colon) away from the attribute so tokenizing in the python tools
+% does not result in adding : into the attribute name.
\begin{alltt}
\livelink{chap:DWTAGtypeunit}{DW\-\_TAG\-\_type\-\_unit}
DW\-\_AT\-\_language: DW\-\_LANG\-\_C\-\_plus\-\_plus (4)
\livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
- DW\-\_AT\-\_name: "N"
+ DW\-\_AT\-\_name : "N"
L1:
\livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
- DW\-\_AT\-\_name: "C"
- DW\-\_AT\-\_byte\-\_size: 8
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 5
+ DW\-\_AT\-\_name : "C"
+ DW\-\_AT\-\_byte\-\_size : 8
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 5
\livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
- DW\-\_AT\-\_name: "x"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 6
- DW\-\_AT\-\_type: reference to L2
- DW\-\_AT\-\_data\-\_member\-\_location: 0
+ DW\-\_AT\-\_name : "x"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 6
+ DW\-\_AT\-\_type : reference to L2
+ DW\-\_AT\-\_data\-\_member\-\_location : 0
\livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
- DW\-\_AT\-\_name: "y"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 7
- DW\-\_AT\-\_type: reference to L2
- DW\-\_AT\-\_data\-\_member\-\_location: 4
+ DW\-\_AT\-\_name : "y"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 7
+ DW\-\_AT\-\_type : reference to L2
+ DW\-\_AT\-\_data\-\_member\-\_location : 4
L2:
\livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
- DW\-\_AT\-\_byte\-\_size: 4
- DW\-\_AT\-\_encoding: DW\-\_ATE\-\_signed
- DW\-\_AT\-\_name: "int"
+ DW\-\_AT\-\_byte\-\_size : 4
+ DW\-\_AT\-\_encoding : DW\-\_ATE\-\_signed
+ DW\-\_AT\-\_name : "int"
\end{alltt}
In computing a signature for the type N::C, flatten the type
\livelink{chap:DWTAGtypeunit}{DW\-\_TAG\-\_type\-\_unit}
DW\-\_AT\-\_language: DW\-\_LANG\-\_C\-\_plus\-\_plus (4)
\livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
- DW\-\_AT\-\_name: "N"
+ DW\-\_AT\-\_name : "N"
L1:
\livelink{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type}
- DW\-\_AT\-\_name: "A"
- DW\-\_AT\-\_byte\-\_size: 20
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 10
+ DW\-\_AT\-\_name : "A"
+ DW\-\_AT\-\_byte\-\_size : 20
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 10
\livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
- DW\-\_AT\-\_name: "v\_"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 15
- DW\-\_AT\-\_type: reference to L2
- DW\-\_AT\-\_data\-\_member\-\_location: 0
- DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+ DW\-\_AT\-\_name : "v\_"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 15
+ DW\-\_AT\-\_type : reference to L2
+ DW\-\_AT\-\_data\-\_member\-\_location : 0
+ DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
\livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
- DW\-\_AT\-\_name: "next"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 16
- DW\-\_AT\-\_type: reference to L3
- DW\-\_AT\-\_data\-\_member\-\_location: 4
- DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+ DW\-\_AT\-\_name : "next"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 16
+ DW\-\_AT\-\_type : reference to L3
+ DW\-\_AT\-\_data\-\_member\-\_location : 4
+ DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
\livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
- DW\-\_AT\-\_name: "bp"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 17
- DW\-\_AT\-\_type: reference to L4
- DW\-\_AT\-\_data\-\_member\-\_location: 8
- DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+ DW\-\_AT\-\_name : "bp"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 17
+ DW\-\_AT\-\_type : reference to L4
+ DW\-\_AT\-\_data\-\_member\-\_location : 8
+ DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
\livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
- DW\-\_AT\-\_name: "c"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 18
- DW\-\_AT\-\_type: 0xd28081e8 dcf5070a (signature for struct C)
- DW\-\_AT\-\_data\-\_member\-\_location: 12
- DW\-\_AT\-\_accessibility: DW\-\_ACCESS\-\_private
+ DW\-\_AT\-\_name : "c"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 18
+ DW\-\_AT\-\_type : 0xd28081e8 dcf5070a (signature for struct C)
+ DW\-\_AT\-\_data\-\_member\-\_location : 12
+ DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
\livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
- DW\-\_AT\-\_external: 1
- DW\-\_AT\-\_name: "A"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 12
- DW\-\_AT\-\_declaration: 1
+ DW\-\_AT\-\_external : 1
+ DW\-\_AT\-\_name : "A"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 12
+ DW\-\_AT\-\_declaration : 1
\livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
- DW\-\_AT\-\_type: reference to L3
- DW\-\_AT\-\_artificial: 1
+ DW\-\_AT\-\_type : reference to L3
+ DW\-\_AT\-\_artificial : 1
\livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
- DW\-\_AT\-\_type: reference to L2
+ DW\-\_AT\-\_type : reference to L2
\livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
- DW\-\_AT\-\_external: 1
- DW\-\_AT\-\_name: "v"
- DW\-\_AT\-\_decl\-\_file: 1
- DW\-\_AT\-\_decl\-\_line: 13
- DW\-\_AT\-\_type: reference to L2
- DW\-\_AT\-\_declaration: 1
+ DW\-\_AT\-\_external : 1
+ DW\-\_AT\-\_name : "v"
+ DW\-\_AT\-\_decl\-\_file : 1
+ DW\-\_AT\-\_decl\-\_line : 13
+ DW\-\_AT\-\_type : reference to L2
+ DW\-\_AT\-\_declaration : 1
\livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
- DW\-\_AT\-\_type: reference to L3
- DW\-\_AT\-\_artificial: 1
+ DW\-\_AT\-\_type : reference to L3
+ DW\-\_AT\-\_artificial : 1
L2:
\livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
- DW\-\_AT\-\_byte\-\_size: 4
- DW\-\_AT\-\_encoding: DW\-\_ATE\-\_signed
- DW\-\_AT\-\_name: "int"
+ DW\-\_AT\-\_byte\-\_size : 4
+ DW\-\_AT\-\_encoding : DW\-\_ATE\-\_signed
+ DW\-\_AT\-\_name : "int"
L3:
\livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
- DW\-\_AT\-\_type: reference to L1
+ DW\-\_AT\-\_type : reference to L1
L4:
\livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
- DW\-\_AT\-\_type: reference to L5
+ DW\-\_AT\-\_type : reference to L5
\livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
- DW\-\_AT\-\_name: "N"
+ DW\-\_AT\-\_name : "N"
L5:
\livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
- DW\-\_AT\-\_name: "B"
- DW\-\_AT\-\_declaration: 1
+ DW\-\_AT\-\_name : "B"
+ DW\-\_AT\-\_declaration : 1
\end{alltt}
In this example, the structure types N::A and N::C have each
\livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
...
\livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}
- DW\-\_AT\-\_name: "a"
- DW\-\_AT\-\_type: (signature) 0xd6d160f5 5589f6e9
- DW\-\_AT\-\_location: ...
+ DW\-\_AT\-\_name : "a"
+ DW\-\_AT\-\_type : (signature) 0xd6d160f5 5589f6e9
+ DW\-\_AT\-\_location : ...
...
\end{alltt}