(setq cmd default-cmd-template))
)
(dbgr-command cmd arg no-record? frame-switch? dbgr-prompts?)
+ ;; FIXME: Figure out how to update the position if the source
+ ;; buffer is displayed.
+ ;; (if frame-switch?
+ ;; (let* ((src-buffer (dbgr-get-srcbuf-from-cmdbuf cmdbuf))
+ ;; (src-window (get-buffer-window src-buffer))
+ ;; ))
+ ;; (with-selected-window src-window
+ ;; (message "recentering...")
+ ;; (dbgr-recenter-arrow)
+ ;; ))
)
;; FIXME: this is a one-time thing. Put in caller.
(local-set-key (format "\C-c%s" key)
'step over' or 'step into'.
"
(interactive "p")
- (dbgr-cmd-remap arg "finish" "finish" "F")
+ (dbgr-cmd-remap arg "finish" "finish" ".")
)
(defun dbgr-cmd-frame(&optional arg)
"If the current buffer contains dbgr-overlay-arrows 1, 2 or 3
recenter window to show that"
(interactive "")
+ ;; We need to update in the order 3..1 so that if there are more than on
+ ;; arrows in the same buffer the smaller number (e.g. arrow 1) is the
+ ;; position we are at rather than the earlier one (e.g. arrow 3).
+ (if (and dbgr-overlay-arrow3
+ (eq (marker-buffer dbgr-overlay-arrow3) (current-buffer)))
+ (goto-char dbgr-overlay-arrow3)
+ )
+ (if (and dbgr-overlay-arrow2
+ (eq (marker-buffer dbgr-overlay-arrow2) (current-buffer)))
+ (goto-char dbgr-overlay-arrow2)
+ )
(if (and dbgr-overlay-arrow1
(eq (marker-buffer dbgr-overlay-arrow1) (current-buffer)))
(goto-char dbgr-overlay-arrow1)
- (if (and dbgr-overlay-arrow2
- (eq (marker-buffer dbgr-overlay-arrow2) (current-buffer)))
- (goto-char dbgr-overlay-arrow2)
- (if (and dbgr-overlay-arrow3
- (eq (marker-buffer dbgr-overlay-arrow3) (current-buffer)))
- (goto-char dbgr-overlay-arrow3)
- )
- ))
+ )
)
"Make sure the source buffers is displayed in windows without
disturbing the command window if it is also displayed. Returns
the command window
-See also `dbgr-window-src-window'"
+See also `dbgr-window-src'"
(interactive)
(let* ((buffer (or opt-buffer (current-buffer)))
(src-buffer (dbgr-get-srcbuf buffer))
"Make sure the source buffer is displayed in windows without
disturbing the command window if it is also displayed. Returns
the source window.
-See also `dbgr-window-src-window'"
+See also `dbgr-window-src'"
(interactive)
(let* ((buffer (or opt-buffer (current-buffer)))
(src-buffer (dbgr-get-srcbuf buffer))
"Make sure the backtrace buffer is displayed in windows without
disturbing the source window if it is also displayed. Returns
the source window
-See also `dbgr-window-src-window'"
+See also `dbgr-window-src'"
(interactive)
(let* ((buffer (or opt-buffer (current-buffer)))
(src-buffer (dbgr-get-srcbuf buffer))
:num 1))
(defconst dbgr-remake-frame-start-regexp
- "\\(?:^\\|\n\\)\\(=>\\| \\)#")
+ "\\(?:^\\|\n\\)\\(=>\\| \\)")
(defconst dbgr-remake-frame-num-regexp
- "\\([0-9]+\\)")
+ "#\\([0-9]+\\) ")
-(defconst dbgr-remake-frame-file-regexp "\\(.*\\):\\([0-9]+\\)")
+(defconst dbgr-remake-frame-file-regexp " at \\(.*\\):\\([0-9]+\\)")
;; Regular expression that describes a debugger "backtrace" command line.
;; For example:
(setf (gethash "frame" dbgr-remake-pat-hash)
(make-dbgr-loc-pat
:regexp (concat dbgr-remake-frame-start-regexp
- dbgr-remake-frame-num-regexp " "
- "\\(.*\\)" " at "
+ dbgr-remake-frame-num-regexp
+ "\\(.*\\)"
dbgr-remake-frame-file-regexp
)
:num 2
(setf (gethash "font-lock-keywords" dbgr-remake-pat-hash)
'(
+ ;; ;; File name and line number
+ ;; ;; E.g. =>#0 Makefile.in at /tmp/Makefile:216
+ ;; ;; ----^^^^^^^^^^^^^^^^^
+ (" at \\(.*\\):\\([0-9]+\\)"
+ (1 dbgr-file-name-face)
+ (2 dbgr-line-number-face))
+
;; The frame number and first type name, if present.
;; E.g. =>#0 Makefile.in at /tmp/Makefile:216
;; ---^
- ((concat dbgr-remake-frame-start-regexp
- dbgr-remake-frame-num-regexp)
- (2 dbgr-backtrace-number-face))
-
- ;; File name.
- ;; E.g. =>#0 Makefile.in at /tmp/Makefile:216
- ;; ---------------^^^^^^^^^^^^^^^^^
- ((concat " \\(.*\\)" " at " dbgr-remake-frame-file-regexp)
- (2 dbgr-file-name-face)
- (3 dbgr-line-number-face)
- )
+ ("#\\([0-9]+\\) "
+ (1 dbgr-backtrace-number-face))
))
(setf (gethash "remake" dbgr-pat-hash) dbgr-remake-pat-hash)