[issue14788] Pdb debugs itself after ^C and a breakpoint is set anywhere

2019-04-19 Thread daniel hahler


daniel hahler  added the comment:

I think this issue itself might be fixed already / changed since 3.5.

I've came up with something similar in this area though, which is only 
triggered when using Ctrl-C while pdb is waiting for the next statement: 
https://github.com/python/cpython/pull/12880

--
nosy: +blueyed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14788] Pdb debugs itself after ^C and a breakpoint is set anywhere

2019-03-15 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14788] Pdb debugs itself after ^C and a breakpoint is set anywhere

2014-07-04 Thread Mark Lawrence

Mark Lawrence added the comment:

A quick glance tells me the patch is okay, apart from the name 
test_issue_XXX, so can we have a formal patch review please.  See also #14743.

--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14788
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14788] Pdb debugs itself after ^C and a breakpoint is set anywhere

2012-05-18 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14788
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14788] Pdb debugs itself after ^C and a breakpoint is set anywhere

2012-05-12 Thread Xavier de Gaye

New submission from Xavier de Gaye xdeg...@gmail.com:

When a breakpoint is set anywhere (in which case the global system's
trace function is set), interrupting the debuggee causes Pdb to stop
into its own code. See the following pdb session run with python on
the current head of the default branch from the repo.

===   main.py   =
import time
def bar():
i = 1
while i:
time.sleep(.100)

bar()
=
$ python -m pdb main.py
 /path_to/main.py(1)module()
- import time
(Pdb) import sys; print(sys.version)
3.3.0a3+ (default:4e9680570be8, May 11 2012, 12:09:15) 
[GCC 4.3.2]
(Pdb) break bar
Breakpoint 1 at /path_to/main.py:2
(Pdb) continue
 /path_to/main.py(3)bar()
- i = 1
(Pdb) continue
^C
Program interrupted. (Use 'cont' to resume).
--Call--
 /home/xavier/src/cpython/cpython-hg-default/Lib/bdb.py(212)set_trace()
- def set_trace(self, frame=None):
(Pdb) where
  /home/xavier/src/cpython/cpython-hg-default/Lib/bdb.py(405)run()
- exec(cmd, globals, locals)
  string(1)module()
  /path_to/main.py(7)module()
- bar()
  /path_to/main.py(5)bar()
- time.sleep(.100)
  /home/xavier/src/cpython/cpython-hg-default/Lib/pdb.py(196)sigint_handler()
- self.set_trace(frame)
 /home/xavier/src/cpython/cpython-hg-default/Lib/bdb.py(212)set_trace()
- def set_trace(self, frame=None):
(Pdb) quit
=


The attached patch fixes the problem and includes a test case. This
fix is the same as the one proposed at issue 14743 to fix another
problem, except that the set_step call is moved at the end of the
sigint_handler method for the sake of robustness.

--
components: Library (Lib)
files: pdb_default.patch
keywords: patch
messages: 160467
nosy: xdegaye
priority: normal
severity: normal
status: open
title: Pdb debugs itself after ^C and a breakpoint is set anywhere
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file25547/pdb_default.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14788
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com