Skip to content

Commit

Permalink
Python trepan debuggers include instruction offset in location
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed May 17, 2015
1 parent be999ea commit 5f664e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion realgud/debugger/trepan2/init.el
Expand Up @@ -26,7 +26,7 @@ realgud-loc-pat struct")
;; before a command prompt.
;;
;; For example:
;; (/usr/bin/zonetab2pot.py:15): <module>
;; (/usr/bin/zonetab2pot.py:15 @3): <module>
;; (/usr/bin/zonetab2pot.py:15 remapped <string>): <module>
;; or MS Windows:
;; (c:\\mydirectory\\gcd.py:10): <module>
Expand Down
4 changes: 2 additions & 2 deletions realgud/lang/python.el
Expand Up @@ -40,14 +40,14 @@ traceback) line." )
;; before a command prompt.
;;
;; For example:
;; (/usr/bin/zonetab2pot.py:15): <module>
;; (/usr/bin/zonetab2pot.py:15 @10): <module>
;; (/usr/bin/zonetab2pot.py:15 remapped <string>): <module>
;; or MS Windows:
;; (c:\\mydirectory\\gcd.py:10): <module>

(defconst realgud:python-trepan-loc-pat
(make-realgud-loc-pat
:regexp "^(\\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/.\\\\ ]+\\):\\([0-9]+\\)\\(?: remapped .*?\\)?): \\(?:<module>\\)?\\(?:\n.. [0-9]+ \\(.*?\\)\n\\)?"
:regexp "^(\\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/.\\\\ ]+\\):\\([0-9]+\\)\\(?: @[0-9]+\\)?\\(?: remapped .*?\\)?): \\(?:<module>\\)?\\(?:\n.. [0-9]+ \\(.*?\\)\n\\)?"
:file-group 1
:line-group 2
:text-group 3
Expand Down
2 changes: 1 addition & 1 deletion test/test-regexp-trepan2.el
Expand Up @@ -126,7 +126,7 @@
(match-string (realgud-loc-pat-line-group helper-loc)
test-s1) "extract line number")

(setq test-s1 "(/usr/bin/ipython:24): <module>")
(setq test-s1 "(/usr/bin/ipython:24 @31): <module>")
(assert-t (numberp (loc-match test-s1 helper-loc))
"position location")
(assert-equal "/usr/bin/ipython"
Expand Down

0 comments on commit 5f664e2

Please sign in to comment.