GNU bug report logs - #6098
23.1; gud-break doesn't deal with Python modules

Previous Next

Package: emacs;

Reported by: David Abrahams <dave <at> boostpro.com>

Date: Tue, 4 May 2010 15:11:01 UTC

Severity: normal

Tags: patch

Found in version 23.1

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6098 in the body.
You can then email your comments to 6098 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6098; Package emacs. (Tue, 04 May 2010 15:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Abrahams <dave <at> boostpro.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 04 May 2010 15:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Abrahams <dave <at> boostpro.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; gud-break doesn't deal with Python modules
Date: Tue, 04 May 2010 11:10:32 -0400
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

1. Create the following directory hierarchy:

       /tmp/fu

       /tmp/fu/probe (executable)
           #!/bin/sh
           python -m pdb /tmp/fu/tst.py

       /tmp/fu/bar/__init__.py
           import bar.baz

       /tmp/fu/bar/baz.py
           print 'hello'

2. `M-x pdb RET /tmp/fu/probe RET'

3. `import sys RET'

4. `p sys.path'

5. Note that /tmp/fu is the first directory in sys.path

6. `C-x C-f /tmp/fu/bar/baz.py'

7. `M-x gud-break'

You'll see “pdbtrack: Traceback cue not found” in *Messages* and
“***  'bar.py' not found from sys.path” in *gud*.  No breakpoint is
set.  However, the module is available on sys.path as bar.baz

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/Applications/Emacs.app/Contents/Resources/etc/DEBUG for instructions.


In GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2009-08-16 on black.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--with-ns''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  diff-auto-refine-mode: t
  show-paren-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x C-f / t m p / x <return> M-x M-p C-g M-x p d b 
<return> C-a C-k . / p r o b e 2 <return> i m p o r 
t SPC s y s <return> p r i n t SPC s y s . p a t h 
<return> C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-x C-p C-x C-b C-x C-b C-x C-b C-x C-b 
C-x C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-x C-f f u / _ _ <tab> <return> C-x 
C-f C-g C-x SPC C-x C-p C-x C-b C-x C-b C-x C-b C-x 
C-n C-x C-f b a r <tab> <return> C-x SPC C-x C-p C-p 
C-p C-p C-p M-x r e p o r t - e m a <tab> <return> 
C-g C-g C-x C-n C-h k C-x SPC C-x C-p C-x C-k C-n C-n 
C-n C-n C-n M-x M-p <return>

Recent messages:
Quit [2 times]
Mark set
pdbtrack: Traceback cue not found [2 times]
Quit
Command: break __init__.py:1
pdbtrack: Traceback cue not found
Command: break bar.py:1
pdbtrack: Traceback cue not found
Quit [2 times]
Type C-x 4 C-o RET to restore the other window.

-- 
Dave Abrahams           Meet me at BoostCon: http://www.boostcon.com
BoostPro Computing
http://www.boostpro.com






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6098; Package emacs. (Fri, 18 Mar 2011 17:42:02 GMT) Full text and rfc822 format available.

Message #8 received at 6098 <at> debbugs.gnu.org (full text, mbox):

From: Syver Enstad <syver.enstad <at> cisco.com>
To: 6098 <at> debbugs.gnu.org
Subject: Fix for broken breakpoint handling in gud pdb
Date: Fri, 18 Mar 2011 18:03:07 +0100
Patch for gud.el version 23.1 line 1636

The point of this patch is to give pdb full paths so that one can set 
breakpoints
in files outside the current directory.

This is acheived by addding the %d specification to the command.


--- /tmp/original.el    2011-03-18 17:55:30.131681523 +0100
+++ /tmp/improved.el    2011-03-18 17:55:14.870401366 +0100
@@ -1633,8 +1633,8 @@
   (gud-common-init command-line nil 'gud-pdb-marker-filter)
   (set (make-local-variable 'gud-minor-mode) 'pdb)

-  (gud-def gud-break  "break %f:%l"  "\C-b" "Set breakpoint at current 
line.")
-  (gud-def gud-remove "clear %f:%l"  "\C-d" "Remove breakpoint at 
current line")
+  (gud-def gud-break  "break %d%f:%l"  "\C-b" "Set breakpoint at 
current line.")
+  (gud-def gud-remove "clear %d%f:%l"  "\C-d" "Remove breakpoint at 
current line")
   (gud-def gud-step   "step"         "\C-s" "Step one source line with 
display.")
   (gud-def gud-next   "next"         "\C-n" "Step one line (skip 
functions).")
   (gud-def gud-cont   "continue"     "\C-r" "Continue with display.")





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6098; Package emacs. (Sun, 29 Jan 2012 07:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 6098 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Syver Enstad <syver.enstad <at> cisco.com>
Cc: 6098 <at> debbugs.gnu.org
Subject: Re: bug#6098: Fix for broken breakpoint handling in gud pdb
Date: Sun, 29 Jan 2012 15:07:33 +0800
Syver Enstad <syver.enstad <at> cisco.com> writes:

> Patch for gud.el version 23.1 line 1636
>
> The point of this patch is to give pdb full paths so that one can set
> breakpoints
> in files outside the current directory.
>
> This is acheived by addding the %d specification to the command.

Your patch has been committed to trunk.  Thanks.




bug closed, send any further explanations to 6098 <at> debbugs.gnu.org and David Abrahams <dave <at> boostpro.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 29 Jan 2012 07:09:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 26 Feb 2012 12:24:06 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Dave Abrahams <dave <at> boostpro.com> to control <at> debbugs.gnu.org. (Wed, 14 Mar 2012 19:16:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6098; Package emacs. (Wed, 14 Mar 2012 19:20:01 GMT) Full text and rfc822 format available.

Message #20 received at 6098 <at> debbugs.gnu.org (full text, mbox):

From: Dave Abrahams <dave <at> boostpro.com>
To: 6098 <at> debbugs.gnu.org
Subject: Someone obviously tried to fix this upstream...
Date: Wed, 14 Mar 2012 14:49:38 -0400
Currently the code reads as follows:

    (gud-def gud-break  "break %d%f:%l"  "\C-b" "Set breakpoint at current line.")
    (gud-def gud-remove "clear %d%f:%l"  "\C-d" "Remove breakpoint at current line")

However, tests show that it doesn't work without the directory separator
"/" after "%d" on both lines.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6098; Package emacs. (Wed, 14 Mar 2012 21:13:01 GMT) Full text and rfc822 format available.

Message #23 received at 6098 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: 6098 <at> debbugs.gnu.org
Subject: Re: bug#6098: Someone obviously tried to fix this upstream...
Date: Wed, 14 Mar 2012 21:41:57 +0100
Dave Abrahams <dave <at> boostpro.com> writes:

> Currently the code reads as follows:
>
>     (gud-def gud-break  "break %d%f:%l"  "\C-b" "Set breakpoint at current line.")
>     (gud-def gud-remove "clear %d%f:%l"  "\C-d" "Remove breakpoint at current line")
>
> However, tests show that it doesn't work without the directory separator
> "/" after "%d" on both lines.

%d always expands to a string with a trailing slash.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 Apr 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.