Commit 863beb27 authored by Dima Kogan's avatar Dima Kogan Committed by Stefan Monnier

* lisp/progmodes/gud.el (gud-perldb-marker-filter): Understand position info

for subroutines defined in an eval.

Fixes: debbugs:14182
parent 6bd1a072
2013-04-19 Dima Kogan <> (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 <>
* bookmark.el (bookmark-completing-read): Improve handling of empty
......@@ -1487,14 +1487,38 @@ into one that invokes an Emacs-enabled debugging session.
(let ((output ""))
;; Process all the complete markers in this chunk.
(while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n"
;; Here I match the string coming out of perldb.
;; The strings can look like any of
;; "\032\032/tmp/\n"
;; "\032\032(eval 5)[/tmp/]:3:0\n"
;; "\032\032(eval 17)[Basic/Core/ (i.e.]: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.
(let ((file-re "\\(?:[a-zA-Z]:\\)?[^:\n]*"))
(concat "\032\032\\(?:"
"(eval [0-9]+)\\["
"\\(" file-re "\\)" ; Filename.
"\\(?: (i\\.e\\. [^)]*)\\)?"
":\\([0-9]*\\)\\]") ; Line number.
"\\(?1:" file-re "\\)" ; Filename.
":\\(?2:[0-9]*\\)") ; Line number.
;; Extract the frame position from the marker.
(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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment