[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112333: * lisp/progmodes/gud.el (gud
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112333: * lisp/progmodes/gud.el (gud-perldb-marker-filter): Understand position info |
Date: |
Fri, 19 Apr 2013 11:58:07 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112333
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14182
author: Dima Kogan <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2013-04-19 11:58:07 -0400
message:
* lisp/progmodes/gud.el (gud-perldb-marker-filter): Understand position info
for subroutines defined in an eval.
modified:
lisp/ChangeLog
lisp/progmodes/gud.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-04-19 05:11:16 +0000
+++ b/lisp/ChangeLog 2013-04-19 15:58:07 +0000
@@ -1,3 +1,8 @@
+2013-04-19 Dima Kogan <address@hidden> (tiny change)
+
+ * progmodes/gud.el (gud-perldb-marker-filter): Understand position info
+ for subroutines defined in an eval (bug#14182).
+
2013-04-19 Thierry Volpiatto <address@hidden>
* bookmark.el (bookmark-completing-read): Improve handling of empty
=== modified file 'lisp/progmodes/gud.el'
--- a/lisp/progmodes/gud.el 2013-01-01 09:11:05 +0000
+++ b/lisp/progmodes/gud.el 2013-04-19 15:58:07 +0000
@@ -1487,14 +1487,38 @@
(let ((output ""))
;; Process all the complete markers in this chunk.
- (while (string-match
"\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n"
- gud-marker-acc)
+ ;;
+ ;; Here I match the string coming out of perldb.
+ ;; The strings can look like any of
+ ;;
+ ;; "\032\032/tmp/tst.pl:6:0\n"
+ ;; "\032\032(eval 5)[/tmp/tst.pl:6]:3:0\n"
+ ;; "\032\032(eval 17)[Basic/Core/Core.pm.PL (i.e.
PDL::Core.pm):2931]:1:0\n"
+ ;;
+ ;; From those I want the filename and the line number. First I look for
+ ;; the eval case. If that doesn't match, I look for the "normal" case.
+ (while
+ (string-match
+ (eval-when-compile
+ (let ((file-re "\\(?:[a-zA-Z]:\\)?[^:\n]*"))
+ (concat "\032\032\\(?:"
+ (concat
+ "(eval [0-9]+)\\["
+ "\\(" file-re "\\)" ; Filename.
+ "\\(?: (i\\.e\\. [^)]*)\\)?"
+ ":\\([0-9]*\\)\\]") ; Line number.
+ "\\|"
+ (concat
+ "\\(?1:" file-re "\\)" ; Filename.
+ ":\\(?2:[0-9]*\\)") ; Line number.
+ "\\):.*\n")))
+ gud-marker-acc)
(setq
;; Extract the frame position from the marker.
gud-last-frame
(cons (match-string 1 gud-marker-acc)
- (string-to-number (match-string 3 gud-marker-acc)))
+ (string-to-number (match-string 2 gud-marker-acc)))
;; Append any text before the marker to the output we're going
;; to return - we don't include the marker in this text.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112333: * lisp/progmodes/gud.el (gud-perldb-marker-filter): Understand position info,
Stefan Monnier <=