170 |
(save-excursion |
(save-excursion |
171 |
(save-window-excursion |
(save-window-excursion |
172 |
(with-no-warnings |
(with-no-warnings |
173 |
(setq unread-command-char -1)) |
(setq unread-command-char -1)) |
174 |
|
(when (eq (car debugger-args) 'debug) |
175 |
|
;; Skip the frames for backtrace-debug, byte-code, |
176 |
|
;; and implement-debug-on-entry. |
177 |
|
(backtrace-debug 4 t) |
178 |
|
;; Place an extra debug-on-exit for macro's. |
179 |
|
(when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) |
180 |
|
(backtrace-debug 5 t))) |
181 |
(pop-to-buffer debugger-buffer) |
(pop-to-buffer debugger-buffer) |
182 |
(debugger-mode) |
(debugger-mode) |
183 |
(debugger-setup-buffer debugger-args) |
(debugger-setup-buffer debugger-args) |
197 |
(goto-char (point-min)) |
(goto-char (point-min)) |
198 |
(message "%s" (buffer-string)) |
(message "%s" (buffer-string)) |
199 |
(kill-emacs)) |
(kill-emacs)) |
|
(if (eq (car debugger-args) 'debug) |
|
|
;; Skip the frames for backtrace-debug, byte-code, |
|
|
;; and implement-debug-on-entry. |
|
|
(backtrace-debug 4 t)) |
|
200 |
(message "") |
(message "") |
201 |
(let ((standard-output nil) |
(let ((standard-output nil) |
202 |
(buffer-read-only t)) |
(buffer-read-only t)) |
228 |
(setq last-command debugger-outer-last-command) |
(setq last-command debugger-outer-last-command) |
229 |
(setq this-command debugger-outer-this-command) |
(setq this-command debugger-outer-this-command) |
230 |
(with-no-warnings |
(with-no-warnings |
231 |
(setq unread-command-char debugger-outer-unread-command-char)) |
(setq unread-command-char debugger-outer-unread-command-char)) |
232 |
(setq unread-command-events debugger-outer-unread-command-events) |
(setq unread-command-events debugger-outer-unread-command-events) |
233 |
(setq unread-post-input-method-events |
(setq unread-post-input-method-events |
234 |
debugger-outer-unread-post-input-method-events) |
debugger-outer-unread-post-input-method-events) |
266 |
;; lambda is for debug-on-call when a function call is next. |
;; lambda is for debug-on-call when a function call is next. |
267 |
;; debug is for debug-on-entry function called. |
;; debug is for debug-on-entry function called. |
268 |
(cond ((memq (car debugger-args) '(lambda debug)) |
(cond ((memq (car debugger-args) '(lambda debug)) |
269 |
(insert "--entering a function:\n") |
(insert "--entering a function:\n")) |
|
(if (eq (car debugger-args) 'debug) |
|
|
(progn |
|
|
(delete-char 1) |
|
|
(insert ?*) |
|
|
(beginning-of-line)))) |
|
270 |
;; Exiting a function. |
;; Exiting a function. |
271 |
((eq (car debugger-args) 'exit) |
((eq (car debugger-args) 'exit) |
272 |
(insert "--returning value: ") |
(insert "--returning value: ") |
506 |
(unwind-protect |
(unwind-protect |
507 |
(progn |
(progn |
508 |
(with-no-warnings |
(with-no-warnings |
509 |
(setq unread-command-char debugger-outer-unread-command-char)) |
(setq unread-command-char debugger-outer-unread-command-char)) |
510 |
(prog1 (progn ,@body) |
(prog1 (progn ,@body) |
511 |
(with-no-warnings |
(with-no-warnings |
512 |
(setq debugger-outer-unread-command-char unread-command-char)))) |
(setq debugger-outer-unread-command-char unread-command-char)))) |
513 |
(with-no-warnings |
(with-no-warnings |
514 |
(setq unread-command-char save-ucc)))) |
(setq unread-command-char save-ucc)))) |
515 |
(setq debugger-outer-match-data (match-data)) |
(setq debugger-outer-match-data (match-data)) |
516 |
(setq debugger-outer-load-read-function load-read-function) |
(setq debugger-outer-load-read-function load-read-function) |
517 |
(setq debugger-outer-overriding-terminal-local-map |
(setq debugger-outer-overriding-terminal-local-map |