[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python(pdb) & gud: "stop" causes uncaught exception
From: |
David Reitter |
Subject: |
Re: python(pdb) & gud: "stop" causes uncaught exception |
Date: |
Tue, 1 May 2007 18:32:57 +0100 |
On 26 Apr 2007, at 07:36, Nick Roberts wrote on emacs-devel:
Yes, I've seen this too. I couold make the "stop" button invisible
for pdb but
the underlying is with comint-stop-subjob which is on the menubar
of the GUD
buffer and C-c C-z.
I see you've done that.
We still need a way to interrupt a running python program...
All comint-stop-subjob does is send SIGINT to the process. When a
program runs
under GDB, SIGINT is intercepted by GDB and not normally passed on
to the
program, but pdb doesn't seem to do this. If you run a pythons
script under pdb
from the command line and type ^C then you should get the same
result that you
see in Emacs.
There is a project called "pydb" which seems to improve upon PDB:
http://bashdb.sourceforge.net/pydb/
They claim to have "gdb-style signal handling".
It comes with an Emacs mode:
http://wiki.showmedo.com/index.php/PythonBernsteinPydbIntro
Unfortunately, comint-stop-subjob doesn't do much - pydb just prints
"program received SIGINT", but doesn't interrupt the program.
It seems like it is set up to handle the signal:
(Pydb) handle SIGINT
Signal Stop Print Stack Pass Description
SIGINT Yes Yes No No Interrupt
... but it doesn't do this. I don't understand why. I'm cc'ing the
appropriate mailing list - maybe they can shed some light on this.
- Re: python(pdb) & gud: "stop" causes uncaught exception,
David Reitter <=