[Python-Dev] Enhancement to pdb in gud.el

Kevin J. Butler public-kbutler at sabaydi.com
Sat Sep 20 12:06:33 EDT 2003


Nick Roberts wrote:
> I've just noticed that you can enable/disable breakpoints in python. In my
> mode for gdb, the breakpoints are greyed out when the breakpoints become
> disabled. I could do this for python too if these commands were changed to
> emit a message.

Two additional lines will add that - see below.

> If your patches are accepted (by SF?) then I will integrate my changes into
> gud.el in the Emacs CVS repository.

OK, I'll go ahead and submit them...

However, what is the fallback behavior when emacs with the new gud.el 
encounters a pdb.py that doesn't have the patch?  That is, will users of 
existing versions of python lose any functionality?

kb

*** pdb.py.p1	Sat Sep 20 09:54:20 2003
--- pdb.py	Sat Sep 20 09:58:22 2003
***************
*** 388,393 ****
--- 388,394 ----
               bp = bdb.Breakpoint.bpbynumber[i]
               if bp:
                   bp.enable()
+                 print 'Enabled breakpoint %s at %s:%s' % (i, bp.file, 
bp.line)

       def do_disable(self, arg):
           args = arg.split()
***************
*** 405,410 ****
--- 406,412 ----
               bp = bdb.Breakpoint.bpbynumber[i]
               if bp:
                   bp.disable()
+                 print 'Disabled breakpoint %s at %s:%s' % (i, bp.file, 
bp.line)

       def do_condition(self, arg):
           # arg is breakpoint number and condition




More information about the Python-Dev mailing list