<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Source Level Debugging with LLVM</title>
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
</head>
<body>
<li><a href="#llvmdwarfextension">LLVM Dwarf Extensions</a>
<ol>
<li><a href="#objcproperty">Debugging Information Extension
- for Objective C Properties</a></li>
- <ul>
- <li><a href="#objcpropertyintroduction">Introduction</a></li>
- <li><a href="#objcpropertyproposal">Proposal</a></li>
- <li><a href="#objcpropertynewattributes">New DWARF Attributes</a></li>
- <li><a href="#objcpropertynewconstants">New DWARF Constants</a></li>
- </ul>
- <li><a href="#acceltable">Name Accelerator Tables</a></li>
- <ul>
- <li><a href="#acceltableintroduction">Introduction</a></li>
- <li><a href="#acceltablehashes">Hash Tables</a></li>
- <li><a href="#acceltabledetails">Details</a></li>
- <li><a href="#acceltablecontents">Contents</a></li>
- <li><a href="#acceltableextensions">Language Extensions and File Format Changes</a></li>
- </ul>
+ for Objective C Properties</a>
+ <ul>
+ <li><a href="#objcpropertyintroduction">Introduction</a></li>
+ <li><a href="#objcpropertyproposal">Proposal</a></li>
+ <li><a href="#objcpropertynewattributes">New DWARF Attributes</a></li>
+ <li><a href="#objcpropertynewconstants">New DWARF Constants</a></li>
+ </ul>
+ </li>
+ <li><a href="#acceltable">Name Accelerator Tables</a>
+ <ul>
+ <li><a href="#acceltableintroduction">Introduction</a></li>
+ <li><a href="#acceltablehashes">Hash Tables</a></li>
+ <li><a href="#acceltabledetails">Details</a></li>
+ <li><a href="#acceltablecontents">Contents</a></li>
+ <li><a href="#acceltableextensions">Language Extensions and File Format Changes</a></li>
+ </ul>
+ </li>
</ol>
</li>
</ul>
</td>
-<td class="right">
-<img src="img/venusflytrap.jpg" alt="A leafy and green bug eater" width="247"
-height="369">
-</td>
</tr></table>
<div class="doc_author">
<p>These descriptors provide debug information about globals variables. The
provide details such as name, type and where the variable is defined. All
-global variables are collected by named metadata <tt>!llvm.dbg.gv</tt>.</p>
+global variables are collected inside the named metadata
+<tt>!llvm.dbg.cu</tt>.</p>
</div>
metadata, ;; Reference to type descriptor
i1, ;; True if the global is local to compile unit (static)
i1, ;; True if the global is defined in the compile unit (not extern)
+ i32, ;; Line number where the scope of the subprogram begins
i32, ;; Virtuality, e.g. dwarf::DW_VIRTUALITY__virtual
i32, ;; Index into a virtual function
metadata, ;; indicates which base type contains the vtable pointer for the
<p>The members of enumeration types (tag = <tt>DW_TAG_enumeration_type</tt>) are
<a href="#format_enumeration">enumerator descriptors</a>, each representing
the definition of enumeration value for the set. All enumeration type
- descriptors are collected by named metadata <tt>!llvm.dbg.enum</tt>.</p>
+ descriptors are collected inside the named metadata
+ <tt>!llvm.dbg.cu</tt>.</p>
<p>The members of structure (tag = <tt>DW_TAG_structure_type</tt>) or union (tag
= <tt>DW_TAG_union_type</tt>) types are any one of
;;
;; List of debug info of globals
;;
-!llvm.dbg.gv = !{!0}
+!llvm.dbg.cu = !{!0}
-;;
-;; Define the global variable descriptor. Note the reference to the global
-;; variable anchor and the global variable itself.
-;;
+;; Define the compile unit.
!0 = metadata !{
- i32 524340, ;; Tag
- i32 0, ;; Unused
- metadata !1, ;; Context
- metadata !"MyGlobal", ;; Name
- metadata !"MyGlobal", ;; Display Name
- metadata !"MyGlobal", ;; Linkage Name
- metadata !3, ;; Compile Unit
- i32 1, ;; Line Number
- metadata !4, ;; Type
- i1 false, ;; Is a local variable
- i1 true, ;; Is this a definition
- i32* @MyGlobal ;; The global variable
+ i32 786449, ;; Tag
+ i32 0, ;; Context
+ i32 4, ;; Language
+ metadata !"foo.cpp", ;; File
+ metadata !"/Volumes/Data/tmp", ;; Directory
+ metadata !"clang version 3.1 ", ;; Producer
+ i1 true, ;; Deprecated field
+ i1 false, ;; "isOptimized"?
+ metadata !"", ;; Flags
+ i32 0, ;; Runtime Version
+ metadata !1, ;; Enum Types
+ metadata !1, ;; Retained Types
+ metadata !1, ;; Subprograms
+ metadata !3 ;; Global Variables
+} ; [ DW_TAG_compile_unit ]
+
+;; The Array of Global Variables
+!3 = metadata !{
+ metadata !4
}
-;;
-;; Define the basic type of 32 bit signed integer. Note that since int is an
-;; intrinsic type the source file is NULL and line 0.
-;;
!4 = metadata !{
- i32 524324, ;; Tag
- metadata !1, ;; Context
- metadata !"int", ;; Name
- metadata !1, ;; File
- i32 0, ;; Line number
- i64 32, ;; Size in Bits
- i64 32, ;; Align in Bits
- i64 0, ;; Offset in Bits
- i32 0, ;; Flags
- i32 5 ;; Encoding
+ metadata !5
}
+;;
+;; Define the global variable itself.
+;;
+!5 = metadata !{
+ i32 786484, ;; Tag
+ i32 0, ;; Unused
+ null, ;; Unused
+ metadata !"MyGlobal", ;; Name
+ metadata !"MyGlobal", ;; Display Name
+ metadata !"", ;; Linkage Name
+ metadata !6, ;; File
+ i32 1, ;; Line
+ metadata !7, ;; Type
+ i32 0, ;; IsLocalToUnit
+ i32 1, ;; IsDefinition
+ i32* @MyGlobal ;; LLVM-IR Value
+} ; [ DW_TAG_variable ]
+
+;;
+;; Define the file
+;;
+!6 = metadata !{
+ i32 786473, ;; Tag
+ metadata !"foo.cpp", ;; File
+ metadata !"/Volumes/Data/tmp", ;; Directory
+ null ;; Unused
+} ; [ DW_TAG_file_type ]
+
+;;
+;; Define the type
+;;
+!7 = metadata !{
+ i32 786468, ;; Tag
+ null, ;; Unused
+ metadata !"int", ;; Name
+ null, ;; Unused
+ i32 0, ;; Line
+ i64 32, ;; Size in Bits
+ i64 32, ;; Align in Bits
+ i64 0, ;; Offset
+ i32 0, ;; Flags
+ i32 5 ;; Encoding
+} ; [ DW_TAG_base_type ]
+
</pre>
</div>
<div>
<!-- ======================================================================= -->
<h3>
- <a name="objcproperty">Debugging Information Extension for Objective C
-Properties</a></li>
+ <a name="objcproperty">Debugging Information Extension for Objective C Properties</a>
</h3>
<div>
<!-- *********************************************************************** -->
<div>
<table border="1" cellspacing="0">
+ <col width="200">
+ <col width="200">
<tr>
- <th width=200 >TAG</th>
- <th width=200 >Value</th>
+ <th>TAG</th>
+ <th>Value</th>
</tr>
<tr>
- <td width=200 >DW_TAG_APPLE_property</td>
- <td width=200 >0x4200</td>
+ <td>DW_TAG_APPLE_property</td>
+ <td>0x4200</td>
</tr>
</table>
<div>
<table border="1" cellspacing="0">
+ <col width="200">
+ <col width="200">
+ <col width="200">
<tr>
- <th width=200 >Attribute</th>
- <th width=200 >Value</th>
- <th width=200 >Classes</th>
+ <th>Attribute</th>
+ <th>Value</th>
+ <th>Classes</th>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_property</td>
- <td width=200 >0x3fed</td>
- <td width=200 >Reference</td>
+ <td>DW_AT_APPLE_property</td>
+ <td>0x3fed</td>
+ <td>Reference</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_property_getter</td>
- <td width=200 >0x3fe9</td>
- <td width=200 >String</td>
+ <td>DW_AT_APPLE_property_getter</td>
+ <td>0x3fe9</td>
+ <td>String</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_property_setter</td>
- <td width=200 >0x3fea</td>
- <td width=200 >String</td>
+ <td>DW_AT_APPLE_property_setter</td>
+ <td>0x3fea</td>
+ <td>String</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_property_attribute</td>
- <td width=200 >0x3feb</td>
- <td width=200 >Constant</td>
+ <td>DW_AT_APPLE_property_attribute</td>
+ <td>0x3feb</td>
+ <td>Constant</td>
</tr>
</table>
<div>
<table border="1" cellspacing="0">
+ <col width="200">
+ <col width="200">
<tr>
- <th width=200 >Name</th>
- <th width=200 >Value</th>
+ <th>Name</th>
+ <th>Value</th>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_PROPERTY_readonly</td>
- <td width=200 >0x1</td>
+ <td>DW_AT_APPLE_PROPERTY_readonly</td>
+ <td>0x1</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_PROPERTY_readwrite</td>
- <td width=200 >0x2</td>
+ <td>DW_AT_APPLE_PROPERTY_readwrite</td>
+ <td>0x2</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_PROPERTY_assign</td>
- <td width=200 >0x4</td>
+ <td>DW_AT_APPLE_PROPERTY_assign</td>
+ <td>0x4</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_PROPERTY_retain</td>
- <td width=200 >0x8</td>
+ <td>DW_AT_APPLE_PROPERTY_retain</td>
+ <td>0x8</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_PROPERTY_copy</td>
- <td width=200 >0x10</td>
+ <td>DW_AT_APPLE_PROPERTY_copy</td>
+ <td>0x10</td>
</tr>
<tr>
- <td width=200 >DW_AT_APPLE_PROPERTY_nonatomic</td>
- <td width=200 >0x20</td>
+ <td>DW_AT_APPLE_PROPERTY_nonatomic</td>
+ <td>0x20</td>
</tr>
</table>
-</div>
</div>
</div>
-<div>
<!-- ======================================================================= -->
<h3>
<a name="acceltable">Name Accelerator Tables</a>
</h3>
<!-- ======================================================================= -->
+<div>
<!-- ======================================================================= -->
<h4>
<a name="acceltableintroduction">Introduction</a>
</ul>
</div>
</div>
+</div>
<!-- *********************************************************************** -->