about summary refs log tree commit diff
path: root/src/test/debug-info
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@gmail>2013-06-27 19:27:06 +0200
committerMichael Woerister <michaelwoerister@gmail>2013-06-27 19:28:37 +0200
commit2f5e33d02f0103a40de2493f824627effaedc6e0 (patch)
tree3303a443ce7e1e328011c7b8f4bf5be00ee2f369 /src/test/debug-info
parent42dbae7f2a7dbdc414646e706eeffacdf7d4b338 (diff)
debuginfo: Some corrections after review.
Diffstat (limited to 'src/test/debug-info')
-rw-r--r--src/test/debug-info/reference-to-managed-basic.rs3
-rw-r--r--src/test/debug-info/struct-with-destructor.rs17
2 files changed, 16 insertions, 4 deletions
diff --git a/src/test/debug-info/reference-to-managed-basic.rs b/src/test/debug-info/reference-to-managed-basic.rs
index b93b2cee2d2..e3951c94b6f 100644
--- a/src/test/debug-info/reference-to-managed-basic.rs
+++ b/src/test/debug-info/reference-to-managed-basic.rs
@@ -10,8 +10,7 @@
 
 // xfail-win32 Broken because of LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=16249
 
-// Gdb doesn't know
-// about UTF-32 character encoding and will print a rust char as only
+// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
 // its numerical value.
 
 // compile-flags:-Z extra-debug-info
diff --git a/src/test/debug-info/struct-with-destructor.rs b/src/test/debug-info/struct-with-destructor.rs
index c023e3c2ccb..f8281bba49e 100644
--- a/src/test/debug-info/struct-with-destructor.rs
+++ b/src/test/debug-info/struct-with-destructor.rs
@@ -49,7 +49,7 @@ struct WithDestructorGuarded {
 
 
 // The compiler adds a 'destructed' boolean field to structs implementing Drop. This field is used
-// at runtime to prevent finalize() to be executed more than once (see middle::trans::adt).
+// at runtime to prevent drop() to be executed more than once (see middle::trans::adt).
 // This field must be incorporated by the debug info generation. Otherwise the debugger assumes a
 // wrong size/layout for the struct.
 fn main() {
@@ -63,7 +63,20 @@ fn main() {
 
     // If the destructor flag field is not incorporated into the debug info for 'WithDestructor'
     // then the debugger will have an invalid offset for the field 'guard' and thus should not be
-    // able to read its value correctly.
+    // able to read its value correctly (dots are padding bytes, D is the boolean destructor flag):
+    //
+    // NoDestructorGuarded = 0000....00000000FFFFFFFF
+    //                       <--------------><------>
+    //                         NoDestructor   guard
+    //
+    //
+    // withDestructorGuarded = 0000....00000000D.......FFFFFFFF
+    //                         <--------------><------>          // How debug info says it is
+    //                          WithDestructor  guard
+    //
+    //                         <----------------------><------>  // How it actually is
+    //                              WithDestructor      guard
+    //
     let withDestructor = WithDestructorGuarded {
         a: WithDestructor { x: 10, y: 20 },
         guard: -1