X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FSourceLevelDebugging.html;h=166ce0790c1113333101ad9ba7c79f196c6b9e1e;hb=a75ce9f5d2236d93c117e861e60e6f3f748c9555;hp=ed2211f2cf3a30c7cae1b7390ed0f6ea56f74939;hpb=655fd03360e6400c94c9525abebecdd19a9a6841;p=oota-llvm.git diff --git a/docs/SourceLevelDebugging.html b/docs/SourceLevelDebugging.html index ed2211f2cf3..166ce0790c1 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.

@@ -401,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 } @@ -433,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 } @@ -453,15 +460,17 @@ provide details such as name, type and where the variable is defined.

 !3 = metadata !{
-  i32,     ;; Tag = 13 + LLVMDebugVersion (DW_TAG_lexical_block)
-  metadata ;; Reference to context descriptor
+  i32,     ;; Tag = 11 + LLVMDebugVersion (DW_TAG_lexical_block)
+  metadata,;; Reference to context descriptor
+  i32,     ;; Line number
+  i32      ;; Column number
 }
 

These descriptors provide debug information about nested blocks within a - subprogram. The array of member descriptors is used to define local - variables and deeper nested blocks.

+ subprogram. The line number and column numbers are used to dinstinguish + two lexical blocks at same depth.

@@ -532,9 +541,9 @@ DW_ATE_unsigned_char = 8 metadata, ;; Name (may be "" for anonymous types) metadata, ;; Reference to file where defined (may be NULL) i32, ;; Line number where defined (may be 0) - i32, ;; Size in bits - i32, ;; Alignment in bits - i32, ;; Offset in bits + i64, ;; Size in bits + i64, ;; Alignment in bits + i64, ;; Offset in bits metadata ;; Reference to type derived from } @@ -782,11 +791,11 @@ DW_TAG_return_variable = 258
-  void %llvm.dbg.declare( { } *, metadata )
+  void %llvm.dbg.declare(metadata, 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 metadata holding alloca for the variable.. The second argument is the %llvm.dbg.variable containing the description of the variable.

@@ -800,7 +809,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 @@ -854,14 +863,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] @@ -872,7 +881,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 ] @@ -914,7 +923,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   
 
@@ -949,7 +958,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
 
@@ -1051,7 +1060,7 @@ int main(int argc, char *argv[]) { i32 524329, ;; Tag metadata !"MySource.cpp", metadata !"/Users/mine/sources", - metadata !3 ;; Compile unit + metadata !2 ;; Compile unit } ;; @@ -1061,7 +1070,7 @@ int main(int argc, char *argv[]) { i32 524329, ;; Tag metadata !"Myheader.h" metadata !"/Users/mine/sources", - metadata !3 ;; Compile unit + metadata !2 ;; Compile unit } ...