[pypy-svn] r65957 - pypy/trunk/pypy/translator/goal

benjamin at codespeak.net benjamin at codespeak.net
Thu Jun 25 03:00:43 CEST 2009


Author: benjamin
Date: Thu Jun 25 03:00:39 2009
New Revision: 65957

Modified:
   pypy/trunk/pypy/translator/goal/translate.py
Log:
only start pdb on successful translation if it is requested

Modified: pypy/trunk/pypy/translator/goal/translate.py
==============================================================================
--- pypy/trunk/pypy/translator/goal/translate.py	(original)
+++ pypy/trunk/pypy/translator/goal/translate.py	Thu Jun 25 03:00:39 2009
@@ -54,6 +54,10 @@
                "cProfile (to debug the speed of the translation process)",
                default=False,
                cmdline="--profile"),
+    BoolOption("pdb",
+               "Always run pdb even if the translation succeeds",
+               default=False,
+               cmdline="--pdb"),
     BoolOption("batch", "Don't run interactive helpers", default=False,
                cmdline="--batch", negation=False),
     IntOption("huge", "Threshold in the number of functions after which "
@@ -279,7 +283,8 @@
         debug(True)
         raise SystemExit(1)
     else:
-        debug(False)
+        if translateconfig.pdb:
+            debug(False)
 
 
 if __name__ == '__main__':



More information about the Pypy-commit mailing list