X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FSourceLevelDebugging.html;h=2bbe18118e122bd8825b7b558beeedb58b6c70b2;hb=170f06ebe2e80ce8bda87425081541493056fb10;hp=f92a1656a901433a48825a62580ee77792e65103;hpb=d98ec5fe5bbbfbb60af2eb512440875540cef064;p=oota-llvm.git diff --git a/docs/SourceLevelDebugging.html b/docs/SourceLevelDebugging.html index f92a1656a90..2bbe18118e1 100644 --- a/docs/SourceLevelDebugging.html +++ b/docs/SourceLevelDebugging.html @@ -144,7 +144,7 @@ height="369"> an LLVM user a relationship between generated code and the original program source code.

-

Currently, debug information is consumed by the DwarfWriter to produce dwarf +

Currently, debug information is consumed by DwarfDebug to produce dwarf information used by the gdb debugger. Other targets could use the same information to produce stabs or other debug forms.

@@ -289,26 +289,25 @@ height="369"> 0x1000.)

The fields of debug descriptors used internally by LLVM - are restricted to only the simple data types int, uint, - bool, float, double, mdstring and - mdnode.

+ are restricted to only the simple data types i32, i1, + float, double, mdstring and mdnode.

 !1 = metadata !{
-  uint,   ;; A tag
+  i32,   ;; A tag
   ...
 }
 

The first field of a descriptor is always an - uint containing a tag value identifying the content of the + 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. To facilitate versioning of debug information, the tag is augmented - with the current debug version (LLVMDebugVersion = 8 << 16 or 0x80000 or + with the current debug version (LLVMDebugVersion = 8 << 16 or 0x80000 or 524288.)

The details of the various descriptors follow.

@@ -402,7 +401,7 @@ height="369"> 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 + {}* ;; Reference to the global variable } @@ -434,6 +433,13 @@ provide details such as name, type and where the variable is 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 + i1 ;; isArtificial + i1 ;; isOptimized + Function *;; Pointer to LLVM function } @@ -783,11 +789,11 @@ DW_TAG_return_variable = 258
-  void %llvm.dbg.declare( { } *, metadata )
+  void %llvm.dbg.declare({}*, metadata)
 

This intrinsic provides information about a local element (ex. variable.) The - first argument is the alloca for the variable, cast to a { }*. The + first argument is the alloca for the variable, cast to a {}*. The second argument is the %llvm.dbg.variable containing the description of the variable.

@@ -801,7 +807,7 @@ DW_TAG_return_variable = 258
-  void %llvm.dbg.value( metadata, i64, metadata )
+  void %llvm.dbg.value(metadata, i64, metadata)
 

This intrinsic provides information when a user source variable is set to a @@ -829,8 +835,8 @@ DW_TAG_return_variable = 258 rules.

In order to handle this, the LLVM debug format uses the metadata attached to - llvm instructions to encode line nuber and scoping information. Consider the - following C fragment, for example:

+ llvm instructions to encode line number and scoping information. Consider + the following C fragment, for example:

@@ -855,14 +861,14 @@ entry:
   %X = alloca i32, align 4                        ; <i32*> [#uses=4]
   %Y = alloca i32, align 4                        ; <i32*> [#uses=4]
   %Z = alloca i32, align 4                        ; <i32*> [#uses=3]
-  %0 = bitcast i32* %X to { }*                    ; <{ }*> [#uses=1]
-  call void @llvm.dbg.declare({ }* %0, metadata !0), !dbg !7
+  %0 = bitcast i32* %X to {}*                     ; <{}*> [#uses=1]
+  call void @llvm.dbg.declare({}* %0, metadata !0), !dbg !7
   store i32 21, i32* %X, !dbg !8
-  %1 = bitcast i32* %Y to { }*                    ; <{ }*> [#uses=1]
-  call void @llvm.dbg.declare({ }* %1, metadata !9), !dbg !10
+  %1 = bitcast i32* %Y to {}*                     ; <{}*> [#uses=1]
+  call void @llvm.dbg.declare({}* %1, metadata !9), !dbg !10
   store i32 22, i32* %Y, !dbg !11
-  %2 = bitcast i32* %Z to { }*                    ; <{ }*> [#uses=1]
-  call void @llvm.dbg.declare({ }* %2, metadata !12), !dbg !14
+  %2 = bitcast i32* %Z to {}*                     ; <{}*> [#uses=1]
+  call void @llvm.dbg.declare({}* %2, metadata !12), !dbg !14
   store i32 23, i32* %Z, !dbg !15
   %tmp = load i32* %X, !dbg !16                   ; <i32> [#uses=1]
   %tmp1 = load i32* %Y, !dbg !16                  ; <i32> [#uses=1]
@@ -873,7 +879,7 @@ entry:
   ret void, !dbg !18
 }
 
-declare void @llvm.dbg.declare({ }*, metadata) nounwind readnone
+declare void @llvm.dbg.declare({}*, metadata) nounwind readnone
 
 !0 = metadata !{i32 459008, metadata !1, metadata !"X", 
                 metadata !3, i32 2, metadata !6}; [ DW_TAG_auto_variable ]
@@ -915,7 +921,7 @@ declare void @llvm.dbg.declare({ }*, metadata) nounwind readnone
 
 
-call void @llvm.dbg.declare({ }* %0, metadata !0), !dbg !7   
+call void @llvm.dbg.declare({}* %0, metadata !0), !dbg !7   
 
@@ -950,7 +956,7 @@ call void @llvm.dbg.declare({ }* %0, metadata !0), !dbg !7
-call void @llvm.dbg.declare({ }* %2, metadata !12), !dbg !14
+call void @llvm.dbg.declare({}* %2, metadata !12), !dbg !14