diff options
author | Devang Patel <dpatel@apple.com> | 2009-01-30 18:20:31 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-01-30 18:20:31 +0000 |
commit | dd9db6688283639a0c95f8ed67beb1bd54b5fff4 (patch) | |
tree | 0e3a5493726e5026018aff4f08a6986d4a3a480e /docs/SourceLevelDebugging.html | |
parent | c0425b646f726de9b2422bc48ec316c4be9f6d7f (diff) |
Each input file is encoded as a separate compile unit in LLVM debugging
information output. However, many target specific tool chains prefer to encode
only one compile unit in an object file. In this situation, the LLVM code
generator will include debugging information entities in the compile unit
that is marked as main compile unit. The code generator accepts maximum one main
compile unit per module. If a module does not contain any main compile unit
then the code generator will emit multiple compile units in the output object
file.
[Part 1]
Update DebugInfo APIs to accept optional boolean value while creating DICompileUnit to mark the unit as "main" unit. By defaults all units are considered non-main. Update SourceLevelDebugging.html to document "main" compile unit.
Update DebugInfo APIs to not accept and encode separate source file/directory entries while creating various llvm.dbg.* entities. There was a recent, yet to be documented, change to include this additional information so no documentation changes are required here.
Update DwarfDebug to handle "main" compile unit. If "main" compile unit is seen then all DIEs are inserted into "main" compile unit. All other compile units are used to find source location for llvm.dbg.* values. If there is not any "main" compile unit then create unique compile unit DIEs for each llvm.dbg.compile_unit.
[Part 2]
Create separate llvm.dbg.compile_unit for each input file. Mark compile unit create for main_input_filename as "main" compile unit. Use appropriate compile unit, based on source location information collected from the tree node, while creating llvm.dbg.* values using DebugInfo APIs.
---
This is Part 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/SourceLevelDebugging.html')
-rw-r--r-- | docs/SourceLevelDebugging.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/SourceLevelDebugging.html b/docs/SourceLevelDebugging.html index 4a55a1c1a2..263f40c6eb 100644 --- a/docs/SourceLevelDebugging.html +++ b/docs/SourceLevelDebugging.html @@ -378,6 +378,7 @@ deleted.</p> sbyte*, ;; Source file name sbyte*, ;; Source file directory (includes trailing slash) sbyte* ;; Producer (ex. "4.0.1 LLVM (LLVM research group)") + bool ;; True if this is a main compile unit. } </pre> @@ -392,6 +393,14 @@ specific source file. Global variables and top level functions would be defined using this context. Compile unit descriptors also provide context for source line correspondence.</p> +<p> Each input file is encoded as a separate compile unit in LLVM debugging +information output. However, many target specific tool chains prefer to encode +only one compile unit in an object file. In this situation, the LLVM code +generator will include debugging information entities in the compile unit +that is marked as main compile unit. The code generator accepts maximum one main +compile unit per module. If a module does not contain any main compile unit +then the code generator will emit multiple compile units in the output object +file. </div> <!-- ======================================================================= --> |