Bug #1055168: calling pdb.set_trace() calls Bdb.set_trace, which made
the debugger enter inside pdb.set_trace.

Patch #1061767: make pdb.set_trace enter enter at the stack frame
calling pdb.set_trace().
diff --git a/Lib/pdb.py b/Lib/pdb.py
index b608adf..7b5dffa 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -997,7 +997,7 @@
     return Pdb().runcall(*args, **kwds)
 
 def set_trace():
-    Pdb().set_trace()
+    Pdb().set_trace(sys._getframe().f_back)
 
 # Post-Mortem interface