about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-18 08:36:36 -0800
committerbors <bors@rust-lang.org>2013-12-18 08:36:36 -0800
commit5ece09277387acf8895f89d439a6cbce4bb55adf (patch)
tree0524903237225f4ec4a1c54ad7a17c2169777c3d /src
parentc33573440b61acf154a1cee55413d02f9835c9aa (diff)
parent01fae5fb2a0425af2830b2525c49d27bfba68899 (diff)
downloadrust-5ece09277387acf8895f89d439a6cbce4bb55adf.tar.gz
rust-5ece09277387acf8895f89d439a6cbce4bb55adf.zip
auto merge of #11033 : michaelwoerister/rust/byvalself, r=pcwalton
As the title says. The trans changes will lead to an auxiliary alloca being created that allows debug info to track the `self` argument. This alloca is only created in debug builds however. Otherwise very little had to be done after I managed to navigate to some degree the jungle that is self-argument handling `:P` 

Closes #10549
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/trans/debuginfo.rs27
-rw-r--r--src/test/debug-info/by-value-self-argument-in-trait-impl.rs1
-rw-r--r--src/test/debug-info/generic-method-on-generic-struct.rs48
-rw-r--r--src/test/debug-info/method-on-enum.rs48
-rw-r--r--src/test/debug-info/method-on-generic-struct.rs48
-rw-r--r--src/test/debug-info/method-on-struct.rs48
-rw-r--r--src/test/debug-info/method-on-trait.rs48
-rw-r--r--src/test/debug-info/method-on-tuple-struct.rs48
-rw-r--r--src/test/debug-info/self-in-default-method.rs48
-rw-r--r--src/test/debug-info/self-in-generic-default-method.rs48
10 files changed, 215 insertions, 197 deletions
diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs
index 0783d5b418f..a77e8f764f3 100644
--- a/src/librustc/middle/trans/debuginfo.rs
+++ b/src/librustc/middle/trans/debuginfo.rs
@@ -129,11 +129,13 @@ use driver::session;
 use lib::llvm::llvm;
 use lib::llvm::{ModuleRef, ContextRef, ValueRef};
 use lib::llvm::debuginfo::*;
+use middle::trans::adt;
+use middle::trans::base;
+use middle::trans::build;
 use middle::trans::common::*;
 use middle::trans::machine;
 use middle::trans::type_of;
 use middle::trans::type_::Type;
-use middle::trans::adt;
 use middle::trans;
 use middle::ty;
 use middle::pat_util;
@@ -453,12 +455,29 @@ pub fn create_self_argument_metadata(bcx: @mut Block,
 
     let address_operations = &[unsafe { llvm::LLVMDIBuilderCreateOpDeref(Type::i64().to_ref()) }];
 
+    // The self argument comes in one of two forms:
+    // (1) For `&self`, `~self`, and `@self` it is an alloca containing a pointer to the data. That
+    //     is the `{&~@}self` pointer is contained by value in the alloca, and `type_of_self` will
+    //     be `{&~@}Self`
+    // (2) For by-value `self`, `llptr` will not be an alloca, but a pointer to the self-value. That
+    //     is by-value `self` is always implicitly passed by reference (sic!). So we have a couple
+    //     of problems here:
+    //     (a) There is no alloca to give to `llvm.dbg.declare` and
+    //     (b) `type_of_self` is `Self`, but `llptr` is of type `*Self`
+    //     In order to solve this problem, the else branch below creates a helper alloca which
+    //     contains a copy of `llptr`. We then describe the `self` parameter by pointing
+    //     `llvm.dbg.declare` to this helper alloca and tell it that the pointer there needs to be
+    //     dereferenced once to get to the actual data (similar to non-immediate by-value args).
     let variable_access = if unsafe { llvm::LLVMIsAAllocaInst(llptr) } != ptr::null() {
         DirectVariable { alloca: llptr }
     } else {
-        // This is not stable and may break with future LLVM versions. llptr should really always
-        // be an alloca. Anything else is not supported and just works by chance.
-        IndirectVariable { alloca: llptr, address_operations: address_operations }
+        // Create a helper alloca that allows us to track the self-argument properly. The alloca
+        // contains a pointer to the self-value.
+        let ptr_type = ty::mk_mut_ptr(bcx.tcx(), type_of_self);
+        let helper_alloca = base::alloc_ty(bcx, ptr_type, "__self");
+        build::Store(bcx, llptr, helper_alloca);
+
+        IndirectVariable { alloca: helper_alloca, address_operations: address_operations }
     };
 
     declare_local(bcx,
diff --git a/src/test/debug-info/by-value-self-argument-in-trait-impl.rs b/src/test/debug-info/by-value-self-argument-in-trait-impl.rs
index 4f14837471a..d051ab9db93 100644
--- a/src/test/debug-info/by-value-self-argument-in-trait-impl.rs
+++ b/src/test/debug-info/by-value-self-argument-in-trait-impl.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-win32: FIXME (#10474)
 // xfail-android: FIXME(#10381)
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/generic-method-on-generic-struct.rs b/src/test/debug-info/generic-method-on-generic-struct.rs
index 80f2031b92e..767293c3dc8 100644
--- a/src/test/debug-info/generic-method-on-generic-struct.rs
+++ b/src/test/debug-info/generic-method-on-generic-struct.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = {8888, -8888}}
+// debugger:print self
+// check:$4 = {x = {8888, -8888}}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {x = 1234.5}
+// check:$7 = {x = 1234.5}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 1234.5}
+// debugger:print self
+// check:$10 = {x = 1234.5}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {x = 1234.5}
+// check:$13 = {x = 1234.5}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10.5
+// check:$15 = -10.5
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {x = -1}
+// check:$16 = {x = -1}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12.5
+// check:$18 = -12.5
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = -1}
+// debugger:print self
+// check:$19 = {x = -1}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print *arg2
-// check:$18 = {-14, 14}
+// check:$21 = {-14, 14}
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {x = -1}
+// check:$22 = {x = -1}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print *arg2
-// check:$21 = {-16, 16.5}
+// check:$24 = {-16, 16.5}
 // debugger:continue
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/method-on-enum.rs b/src/test/debug-info/method-on-enum.rs
index 622786fcb53..272da1690fd 100644
--- a/src/test/debug-info/method-on-enum.rs
+++ b/src/test/debug-info/method-on-enum.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {{Variant2, [...]}, {Variant2, 117901063}}
+// debugger:print self
+// check:$4 = {{Variant2, [...]}, {Variant2, 117901063}}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
+// check:$7 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
+// debugger:print self
+// check:$10 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
+// check:$13 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10
+// check:$15 = -10
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {{Variant2, [...]}, {Variant2, 117901063}}
+// check:$16 = {{Variant2, [...]}, {Variant2, 117901063}}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12
+// check:$18 = -12
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {{Variant2, [...]}, {Variant2, 117901063}}
+// debugger:print self
+// check:$19 = {{Variant2, [...]}, {Variant2, 117901063}}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print arg2
-// check:$18 = -14
+// check:$21 = -14
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {{Variant2, [...]}, {Variant2, 117901063}}
+// check:$22 = {{Variant2, [...]}, {Variant2, 117901063}}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print arg2
-// check:$21 = -16
+// check:$24 = -16
 // debugger:continue
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/method-on-generic-struct.rs b/src/test/debug-info/method-on-generic-struct.rs
index 99ed66cc03b..ebfdea04377 100644
--- a/src/test/debug-info/method-on-generic-struct.rs
+++ b/src/test/debug-info/method-on-generic-struct.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = {8888, -8888}}
+// debugger:print self
+// check:$4 = {x = {8888, -8888}}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {x = 1234.5}
+// check:$7 = {x = 1234.5}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 1234.5}
+// debugger:print self
+// check:$10 = {x = 1234.5}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {x = 1234.5}
+// check:$13 = {x = 1234.5}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10
+// check:$15 = -10
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {x = -1}
+// check:$16 = {x = -1}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12
+// check:$18 = -12
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = -1}
+// debugger:print self
+// check:$19 = {x = -1}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print arg2
-// check:$18 = -14
+// check:$21 = -14
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {x = -1}
+// check:$22 = {x = -1}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print arg2
-// check:$21 = -16
+// check:$24 = -16
 // debugger:continue
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/method-on-struct.rs b/src/test/debug-info/method-on-struct.rs
index 9c2afadaef3..e88e5a5ca63 100644
--- a/src/test/debug-info/method-on-struct.rs
+++ b/src/test/debug-info/method-on-struct.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 100}
+// debugger:print self
+// check:$4 = {x = 100}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {x = 200}
+// check:$7 = {x = 200}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 200}
+// debugger:print self
+// check:$10 = {x = 200}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {x = 200}
+// check:$13 = {x = 200}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10
+// check:$15 = -10
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {x = 300}
+// check:$16 = {x = 300}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12
+// check:$18 = -12
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 300}
+// debugger:print self
+// check:$19 = {x = 300}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print arg2
-// check:$18 = -14
+// check:$21 = -14
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {x = 300}
+// check:$22 = {x = 300}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print arg2
-// check:$21 = -16
+// check:$24 = -16
 // debugger:continue
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/method-on-trait.rs b/src/test/debug-info/method-on-trait.rs
index 6b67dcc18a9..fd58cc1a7d3 100644
--- a/src/test/debug-info/method-on-trait.rs
+++ b/src/test/debug-info/method-on-trait.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 100}
+// debugger:print self
+// check:$4 = {x = 100}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {x = 200}
+// check:$7 = {x = 200}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 200}
+// debugger:print self
+// check:$10 = {x = 200}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {x = 200}
+// check:$13 = {x = 200}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10
+// check:$15 = -10
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {x = 300}
+// check:$16 = {x = 300}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12
+// check:$18 = -12
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 300}
+// debugger:print self
+// check:$19 = {x = 300}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print arg2
-// check:$18 = -14
+// check:$21 = -14
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {x = 300}
+// check:$22 = {x = 300}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print arg2
-// check:$21 = -16
+// check:$24 = -16
 // debugger:continue
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/method-on-tuple-struct.rs b/src/test/debug-info/method-on-tuple-struct.rs
index 46177664a11..98dbff988e7 100644
--- a/src/test/debug-info/method-on-tuple-struct.rs
+++ b/src/test/debug-info/method-on-tuple-struct.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {100, -100.5}
+// debugger:print self
+// check:$4 = {100, -100.5}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {200, -200.5}
+// check:$7 = {200, -200.5}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {200, -200.5}
+// debugger:print self
+// check:$10 = {200, -200.5}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {200, -200.5}
+// check:$13 = {200, -200.5}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10
+// check:$15 = -10
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {300, -300.5}
+// check:$16 = {300, -300.5}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12
+// check:$18 = -12
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {300, -300.5}
+// debugger:print self
+// check:$19 = {300, -300.5}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print arg2
-// check:$18 = -14
+// check:$21 = -14
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {300, -300.5}
+// check:$22 = {300, -300.5}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print arg2
-// check:$21 = -16
+// check:$24 = -16
 // debugger:continue
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/self-in-default-method.rs b/src/test/debug-info/self-in-default-method.rs
index f9726c5329b..d5f735e77f4 100644
--- a/src/test/debug-info/self-in-default-method.rs
+++ b/src/test/debug-info/self-in-default-method.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 100}
+// debugger:print self
+// check:$4 = {x = 100}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {x = 200}
+// check:$7 = {x = 200}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 200}
+// debugger:print self
+// check:$10 = {x = 200}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {x = 200}
+// check:$13 = {x = 200}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10
+// check:$15 = -10
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {x = 300}
+// check:$16 = {x = 300}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12
+// check:$18 = -12
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 300}
+// debugger:print self
+// check:$19 = {x = 300}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print arg2
-// check:$18 = -14
+// check:$21 = -14
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {x = 300}
+// check:$22 = {x = 300}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print arg2
-// check:$21 = -16
+// check:$24 = -16
 // debugger:continue
 
 #[feature(managed_boxes)];
diff --git a/src/test/debug-info/self-in-generic-default-method.rs b/src/test/debug-info/self-in-generic-default-method.rs
index 1b1e0ccf652..e7a6ee77610 100644
--- a/src/test/debug-info/self-in-generic-default-method.rs
+++ b/src/test/debug-info/self-in-generic-default-method.rs
@@ -26,72 +26,72 @@
 
 // STACK BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 987}
+// debugger:print self
+// check:$4 = {x = 987}
 // debugger:print arg1
-// check:$4 = -3
+// check:$5 = -3
 // debugger:print arg2
-// check:$5 = -4
+// check:$6 = -4
 // debugger:continue
 
 // OWNED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$6 = {x = 879}
+// check:$7 = {x = 879}
 // debugger:print arg1
-// check:$7 = -5
+// check:$8 = -5
 // debugger:print arg2
-// check:$8 = -6
+// check:$9 = -6
 // debugger:continue
 
 // OWNED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 879}
+// debugger:print self
+// check:$10 = {x = 879}
 // debugger:print arg1
-// check:$9 = -7
+// check:$11 = -7
 // debugger:print arg2
-// check:$10 = -8
+// check:$12 = -8
 // debugger:continue
 
 // OWNED MOVED
 // debugger:finish
 // debugger:print *self
-// check:$11 = {x = 879}
+// check:$13 = {x = 879}
 // debugger:print arg1
-// check:$12 = -9
+// check:$14 = -9
 // debugger:print arg2
-// check:$13 = -10.5
+// check:$15 = -10.5
 // debugger:continue
 
 // MANAGED BY REF
 // debugger:finish
 // debugger:print *self
-// check:$14 = {x = 897}
+// check:$16 = {x = 897}
 // debugger:print arg1
-// check:$15 = -11
+// check:$17 = -11
 // debugger:print arg2
-// check:$16 = -12.5
+// check:$18 = -12.5
 // debugger:continue
 
 // MANAGED BY VAL
 // debugger:finish
-// d ebugger:print self -- ignored for now because of issue #8512
-// c heck:$X = {x = 897}
+// debugger:print self
+// check:$19 = {x = 897}
 // debugger:print arg1
-// check:$17 = -13
+// check:$20 = -13
 // debugger:print *arg2
-// check:$18 = {-14, 14}
+// check:$21 = {-14, 14}
 // debugger:continue
 
 // MANAGED SELF
 // debugger:finish
 // debugger:print self->val
-// check:$19 = {x = 897}
+// check:$22 = {x = 897}
 // debugger:print arg1
-// check:$20 = -15
+// check:$23 = -15
 // debugger:print *arg2
-// check:$21 = {-16, 16.5}
+// check:$24 = {-16, 16.5}
 // debugger:continue
 
 #[feature(managed_boxes)];