[pypy-commit] stmgc default: Fix for gdb not printing the traceback

arigo noreply at buildbot.pypy.org
Mon Apr 20 11:12:11 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1756:12b2b35a4fb5
Date: 2015-04-20 11:12 +0200
http://bitbucket.org/pypy/stmgc/changeset/12b2b35a4fb5/

Log:	Fix for gdb not printing the traceback

diff --git a/c7/gdb/gdb_stm.py b/c7/gdb/gdb_stm.py
--- a/c7/gdb/gdb_stm.py
+++ b/c7/gdb/gdb_stm.py
@@ -25,7 +25,12 @@
 def gdb_function(func):
     class Func(gdb.Function):
         __doc__ = func.__doc__
-        invoke = staticmethod(func)
+        def invoke(self, *args, **kwds):
+            try:
+                func(*args, **kwds)
+            except:
+                import traceback
+                traceback.print_exc()
     Func(func.__name__)
 
 # -------------------------------------------------------


More information about the pypy-commit mailing list