Author: Lars Wassermann <lars.wasserm...@gmail.com>
Branch: 
Changeset: r504:8f27fbc5ff8c
Date: 2013-07-16 17:36 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/8f27fbc5ff8c/

Log:    added printing to blockContextShadows to improve the exit print on
        debugger-spawn in old images

diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -366,6 +366,12 @@
 def func(interp, s_frame, argcount):
     from spyvm.error import Exit
     if s_frame.w_method()._likely_methodname == 'doesNotUnderstand:':
+        print ''
+        print s_frame.print_stack()
+        w_message = s_frame.peek(0)
+        print w_message.as_repr_string()
+        if isinstance(w_message, model.W_PointersObject):
+            print w_message._vars
         raise Exit('Probably Debugger called...')
     raise PrimitiveFailedError()
 
diff --git a/spyvm/shadow.py b/spyvm/shadow.py
--- a/spyvm/shadow.py
+++ b/spyvm/shadow.py
@@ -839,6 +839,9 @@
             self.pc() + 1
         )
 
+    def method_str(self):
+        return '[] of %s' % self.w_method().get_identifier_string()
+
 class MethodContextShadow(ContextPartShadow):
     _attrs_ = ['w_closure_or_nil', '_w_receiver', '_w_method']
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to