diff options
| author | Dima Kogan | 2013-04-19 11:58:07 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-04-19 11:58:07 -0400 |
| commit | 863beb2713cae84562d93f762e9852540bbf85aa (patch) | |
| tree | 89a088fdf6243830d8b735ab5ba28c1ee24d5411 | |
| parent | 6bd1a072a81c36a8064737c6c3e1647df00b9698 (diff) | |
| download | emacs-863beb2713cae84562d93f762e9852540bbf85aa.tar.gz emacs-863beb2713cae84562d93f762e9852540bbf85aa.zip | |
* lisp/progmodes/gud.el (gud-perldb-marker-filter): Understand position info
for subroutines defined in an eval.
Fixes: debbugs:14182
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 30 |
2 files changed, 32 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a09d37352f7..c46b9a5ceab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-04-19 Dima Kogan <dima@secretsauce.net> (tiny change) | ||
| 2 | |||
| 3 | * progmodes/gud.el (gud-perldb-marker-filter): Understand position info | ||
| 4 | for subroutines defined in an eval (bug#14182). | ||
| 5 | |||
| 1 | 2013-04-19 Thierry Volpiatto <thierry.volpiatto@gmail.com> | 6 | 2013-04-19 Thierry Volpiatto <thierry.volpiatto@gmail.com> |
| 2 | 7 | ||
| 3 | * bookmark.el (bookmark-completing-read): Improve handling of empty | 8 | * bookmark.el (bookmark-completing-read): Improve handling of empty |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d339495d76a..4e31c5e827c 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -1487,14 +1487,38 @@ into one that invokes an Emacs-enabled debugging session. | |||
| 1487 | (let ((output "")) | 1487 | (let ((output "")) |
| 1488 | 1488 | ||
| 1489 | ;; Process all the complete markers in this chunk. | 1489 | ;; Process all the complete markers in this chunk. |
| 1490 | (while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n" | 1490 | ;; |
| 1491 | gud-marker-acc) | 1491 | ;; Here I match the string coming out of perldb. |
| 1492 | ;; The strings can look like any of | ||
| 1493 | ;; | ||
| 1494 | ;; "\032\032/tmp/tst.pl:6:0\n" | ||
| 1495 | ;; "\032\032(eval 5)[/tmp/tst.pl:6]:3:0\n" | ||
| 1496 | ;; "\032\032(eval 17)[Basic/Core/Core.pm.PL (i.e. PDL::Core.pm):2931]:1:0\n" | ||
| 1497 | ;; | ||
| 1498 | ;; From those I want the filename and the line number. First I look for | ||
| 1499 | ;; the eval case. If that doesn't match, I look for the "normal" case. | ||
| 1500 | (while | ||
| 1501 | (string-match | ||
| 1502 | (eval-when-compile | ||
| 1503 | (let ((file-re "\\(?:[a-zA-Z]:\\)?[^:\n]*")) | ||
| 1504 | (concat "\032\032\\(?:" | ||
| 1505 | (concat | ||
| 1506 | "(eval [0-9]+)\\[" | ||
| 1507 | "\\(" file-re "\\)" ; Filename. | ||
| 1508 | "\\(?: (i\\.e\\. [^)]*)\\)?" | ||
| 1509 | ":\\([0-9]*\\)\\]") ; Line number. | ||
| 1510 | "\\|" | ||
| 1511 | (concat | ||
| 1512 | "\\(?1:" file-re "\\)" ; Filename. | ||
| 1513 | ":\\(?2:[0-9]*\\)") ; Line number. | ||
| 1514 | "\\):.*\n"))) | ||
| 1515 | gud-marker-acc) | ||
| 1492 | (setq | 1516 | (setq |
| 1493 | 1517 | ||
| 1494 | ;; Extract the frame position from the marker. | 1518 | ;; Extract the frame position from the marker. |
| 1495 | gud-last-frame | 1519 | gud-last-frame |
| 1496 | (cons (match-string 1 gud-marker-acc) | 1520 | (cons (match-string 1 gud-marker-acc) |
| 1497 | (string-to-number (match-string 3 gud-marker-acc))) | 1521 | (string-to-number (match-string 2 gud-marker-acc))) |
| 1498 | 1522 | ||
| 1499 | ;; Append any text before the marker to the output we're going | 1523 | ;; Append any text before the marker to the output we're going |
| 1500 | ;; to return - we don't include the marker in this text. | 1524 | ;; to return - we don't include the marker in this text. |