Skip to content

Commit

Permalink
Revert "DI: Fold constant arguments into a single MDString"
Browse files Browse the repository at this point in the history
This reverts commit r218914 while I investigate some bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218918 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dexonsmith committed Oct 2, 2014
1 parent 7bd81ba commit 32e192a
Show file tree
Hide file tree
Showing 354 changed files with 6,705 additions and 6,804 deletions.
201 changes: 90 additions & 111 deletions docs/SourceLevelDebugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,11 @@ the simple data types ``i32``, ``i1``, ``float``, ``double``, ``mdstring`` and
...
}
Most of the string and integer fields in descriptors are packed into a single,
null-separated ``mdstring``. The first field of the header is always an
``i32`` containing the DWARF tag value identifying the content of the
descriptor.

For clarity of definition in this document, these header fields are described
below split inside an imaginary ``DIHeader`` construct. This is invalid
assembly syntax. In valid IR, these fields are stringified and concatenated,
separated by ``\00``.
<a name="LLVMDebugVersion">The first field of a descriptor is always an
``i32`` containing a tag value identifying the content of the descriptor.
The remaining fields are specific to the descriptor. The values of tags are
loosely bound to the tag values of DWARF information entries. However, that
does not restrict the use of the information supplied to DWARF targets.

The details of the various descriptors follow.

Expand All @@ -204,22 +200,20 @@ Compile unit descriptors
.. code-block:: llvm
!0 = metadata !{
DIHeader(
i32, ;; Tag = 17 (DW_TAG_compile_unit)
i32, ;; DWARF language identifier (ex. DW_LANG_C89)
mdstring, ;; Producer (ex. "4.0.1 LLVM (LLVM research group)")
i1, ;; True if this is optimized.
mdstring, ;; Flags
i32, ;; Runtime version
mdstring, ;; Split debug filename
i32 ;; Debug info emission kind (1 = Full Debug Info, 2 = Line Tables Only)
),
i32, ;; Tag = 17 (DW_TAG_compile_unit)
metadata, ;; Source directory (including trailing slash) & file pair
metadata, ;; List of enums types
metadata, ;; List of retained types
metadata, ;; List of subprograms
metadata, ;; List of global variables
i32, ;; DWARF language identifier (ex. DW_LANG_C89)
metadata ;; Producer (ex. "4.0.1 LLVM (LLVM research group)")
i1, ;; True if this is optimized.
metadata, ;; Flags
i32 ;; Runtime version
metadata ;; List of enums types
metadata ;; List of retained types
metadata ;; List of subprograms
metadata ;; List of global variables
metadata ;; List of imported entities
metadata ;; Split debug filename
i32 ;; Debug info emission kind (1 = Full Debug Info, 2 = Line Tables Only)
}
These descriptors contain a source language ID for the file (we use the DWARF
Expand All @@ -242,10 +236,8 @@ File descriptors
.. code-block:: llvm
!0 = metadata !{
DIHeader(
i32 ;; Tag = 41 (DW_TAG_file_type)
),
metadata ;; Source directory (including trailing slash) & file pair
i32, ;; Tag = 41 (DW_TAG_file_type)
metadata, ;; Source directory (including trailing slash) & file pair
}
These descriptors contain information for a file. Global variables and top
Expand All @@ -263,18 +255,17 @@ Global variable descriptors
.. code-block:: llvm
!1 = metadata !{
DIHeader(
i32, ;; Tag = 52 (DW_TAG_variable)
mdstring, ;; Name
mdstring, ;; Display name (fully qualified C++ name)
mdstring, ;; MIPS linkage name (for C++)
i32, ;; Line number where defined
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, ;; Tag = 52 (DW_TAG_variable)
i32, ;; Unused field.
metadata, ;; Reference to context descriptor
metadata, ;; Name
metadata, ;; Display name (fully qualified C++ name)
metadata, ;; MIPS linkage name (for C++)
metadata, ;; Reference to file where defined
i32, ;; Line number where defined
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)
{}*, ;; Reference to the global variable
metadata, ;; The static member declaration, if any
}
Expand All @@ -291,29 +282,27 @@ Subprogram descriptors
.. code-block:: llvm
!2 = metadata !{
DIHeader(
i32, ;; Tag = 46 (DW_TAG_subprogram)
mdstring, ;; Name
mdstring, ;; Display name (fully qualified C++ name)
mdstring, ;; MIPS linkage name (for C++)
i32, ;; Line number where defined
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, ;; Virtuality, e.g. dwarf::DW_VIRTUALITY__virtual
i32, ;; Index into a virtual function
i32, ;; Flags - Artificial, Private, Protected, Explicit, Prototyped.
i1, ;; isOptimized
i32 ;; Line number where the scope of the subprogram begins
),
i32, ;; Tag = 46 (DW_TAG_subprogram)
metadata, ;; Source directory (including trailing slash) & file pair
metadata, ;; Reference to context descriptor
metadata, ;; Name
metadata, ;; Display name (fully qualified C++ name)
metadata, ;; MIPS linkage name (for C++)
i32, ;; Line number where defined
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, ;; Virtuality, e.g. dwarf::DW_VIRTUALITY__virtual
i32, ;; Index into a virtual function
metadata, ;; indicates which base type contains the vtable pointer for the
;; derived class
i32, ;; Flags - Artificial, Private, Protected, Explicit, Prototyped.
i1, ;; isOptimized
{}*, ;; Reference to the LLVM function
metadata, ;; Lists function template parameters
metadata, ;; Function declaration descriptor
metadata ;; List of function variables
metadata, ;; List of function variables
i32 ;; Line number where the scope of the subprogram begins
}
These descriptors provide debug information about functions, methods and
Expand All @@ -326,14 +315,12 @@ Block descriptors
.. code-block:: llvm
!3 = metadata !{
DIHeader(
i32, ;; Tag = 11 (DW_TAG_lexical_block)
i32, ;; Line number
i32, ;; Column number
i32 ;; Unique ID to identify blocks from a template function
),
i32, ;; Tag = 11 (DW_TAG_lexical_block)
metadata, ;; Source directory (including trailing slash) & file pair
metadata ;; Reference to context descriptor
metadata, ;; Reference to context descriptor
i32, ;; Line number
i32, ;; Column number
i32 ;; Unique ID to identify blocks from a template function
}
This descriptor provides debug information about nested blocks within a
Expand All @@ -343,12 +330,10 @@ lexical blocks at same depth.
.. code-block:: llvm
!3 = metadata !{
DIHeader(
i32, ;; Tag = 11 (DW_TAG_lexical_block)
i32 ;; DWARF path discriminator value
),
i32, ;; Tag = 11 (DW_TAG_lexical_block)
metadata, ;; Source directory (including trailing slash) & file pair
metadata ;; Reference to the scope we're annotating with a file change
i32, ;; DWARF path discriminator value
}
This descriptor provides a wrapper around a lexical scope to handle file
Expand All @@ -362,18 +347,16 @@ Basic type descriptors
.. code-block:: llvm
!4 = metadata !{
DIHeader(
i32, ;; Tag = 36 (DW_TAG_base_type)
mdstring, ;; Name (may be "" for anonymous types)
i32, ;; Line number where defined (may be 0)
i64, ;; Size in bits
i64, ;; Alignment in bits
i64, ;; Offset in bits
i32, ;; Flags
i32 ;; DWARF type encoding
),
i32, ;; Tag = 36 (DW_TAG_base_type)
metadata, ;; Source directory (including trailing slash) & file pair (may be null)
metadata ;; Reference to context
metadata, ;; Reference to context
metadata, ;; Name (may be "" for anonymous types)
i32, ;; Line number where defined (may be 0)
i64, ;; Size in bits
i64, ;; Alignment in bits
i64, ;; Offset in bits
i32, ;; Flags
i32 ;; DWARF type encoding
}
These descriptors define primitive types used in the code. Example ``int``,
Expand Down Expand Up @@ -407,19 +390,22 @@ Derived type descriptors
.. code-block:: llvm
!5 = metadata !{
DIHeader(
i32, ;; Tag (see below)
mdstring, ;; Name (may be "" for anonymous types)
i32, ;; Line number where defined (may be 0)
i64, ;; Size in bits
i64, ;; Alignment in bits
i64, ;; Offset in bits
i32 ;; Flags to encode attributes, e.g. private
),
i32, ;; Tag (see below)
metadata, ;; Source directory (including trailing slash) & file pair (may be null)
metadata, ;; Reference to context
metadata, ;; Name (may be "" for anonymous types)
i32, ;; Line number where defined (may be 0)
i64, ;; Size in bits
i64, ;; Alignment in bits
i64, ;; Offset in bits
i32, ;; Flags to encode attributes, e.g. private
metadata, ;; Reference to type derived from
metadata ;; (optional) Objective C property node
metadata, ;; (optional) Name of the Objective C property associated with
;; Objective-C an ivar, or the type of which this
;; pointer-to-member is pointing to members of.
metadata, ;; (optional) Name of the Objective C property getter selector.
metadata, ;; (optional) Name of the Objective C property setter selector.
i32 ;; (optional) Objective C property attributes.
}
These descriptors are used to define types derived from other types. The value
Expand Down Expand Up @@ -467,23 +453,21 @@ Composite type descriptors
.. code-block:: llvm
!6 = metadata !{
DIHeader(
i32, ;; Tag (see below)
mdstring, ;; Name (may be "" for anonymous types)
i32, ;; Line number where defined (may be 0)
i64, ;; Size in bits
i64, ;; Alignment in bits
i64, ;; Offset in bits
i32, ;; Flags
i32 ;; Runtime languages
),
i32, ;; Tag (see below)
metadata, ;; Source directory (including trailing slash) & file pair (may be null)
metadata, ;; Reference to context
metadata, ;; Name (may be "" for anonymous types)
i32, ;; Line number where defined (may be 0)
i64, ;; Size in bits
i64, ;; Alignment in bits
i64, ;; Offset in bits
i32, ;; Flags
metadata, ;; Reference to type derived from
metadata, ;; Reference to array of member descriptors
i32, ;; Runtime languages
metadata, ;; Base type containing the vtable pointer for this type
metadata, ;; Template parameters
mdstring ;; A unique identifier for type uniquing purpose (may be null)
metadata ;; A unique identifier for type uniquing purpose (may be null)
}
These descriptors are used to define types that are composed of 0 or more
Expand Down Expand Up @@ -545,11 +529,9 @@ Subrange descriptors
.. code-block:: llvm
!42 = metadata !{
DIHeader(
i32, ;; Tag = 33 (DW_TAG_subrange_type)
i64, ;; Low value
i64 ;; High value
)
i32, ;; Tag = 33 (DW_TAG_subrange_type)
i64, ;; Low value
i64 ;; High value
}
These descriptors are used to define ranges of array subscripts for an array
Expand All @@ -566,11 +548,9 @@ Enumerator descriptors
.. code-block:: llvm
!6 = metadata !{
DIHeader(
i32, ;; Tag = 40 (DW_TAG_enumerator)
mdstring, ;; Name
i64 ;; Value
)
i32, ;; Tag = 40 (DW_TAG_enumerator)
metadata, ;; Name
i64 ;; Value
}
These descriptors are used to define members of an enumeration :ref:`composite
Expand All @@ -582,17 +562,16 @@ Local variables
.. code-block:: llvm
!7 = metadata !{
DIHeader(
i32, ;; Tag (see below)
mdstring, ;; Name
i32, ;; 24 bit - Line number where defined
;; 8 bit - Argument number. 1 indicates 1st argument.
i32 ;; flags
),
i32, ;; Tag (see below)
metadata, ;; Context
metadata, ;; Name
metadata, ;; Reference to file where defined
i32, ;; 24 bit - Line number where defined
;; 8 bit - Argument number. 1 indicates 1st argument.
metadata, ;; Reference to the type descriptor
i32, ;; flags
metadata ;; (optional) Reference to inline location
metadata ;; (optional) Reference to a complex expression.
}
These descriptors are used to define variables local to a sub program. The
Expand Down
Loading

0 comments on commit 32e192a

Please sign in to comment.