2423 |
|
|
2424 |
|
|
2425 |
(defun edebug-debugger (edebug-offset-index edebug-arg-mode edebug-value) |
(defun edebug-debugger (edebug-offset-index edebug-arg-mode edebug-value) |
2426 |
;; Check breakpoints and pending input. |
(if inhibit-redisplay |
2427 |
;; If edebug display should be updated, call edebug-display. |
;; Don't really try to enter edebug within an eval from redisplay. |
2428 |
;; Return edebug-value. |
edebug-value |
2429 |
(let* (;; This needs to be here since breakpoints may be changed. |
;; Check breakpoints and pending input. |
2430 |
(edebug-breakpoints (car (cdr edebug-data))) ; list of breakpoints |
;; If edebug display should be updated, call edebug-display. |
2431 |
(edebug-break-data (assq edebug-offset-index edebug-breakpoints)) |
;; Return edebug-value. |
2432 |
(edebug-break-condition (car (cdr edebug-break-data))) |
(let* ( ;; This needs to be here since breakpoints may be changed. |
2433 |
(edebug-global-break |
(edebug-breakpoints (car (cdr edebug-data))) ; list of breakpoints |
2434 |
(if edebug-global-break-condition |
(edebug-break-data (assq edebug-offset-index edebug-breakpoints)) |
2435 |
(condition-case nil |
(edebug-break-condition (car (cdr edebug-break-data))) |
2436 |
(setq edebug-global-break-result |
(edebug-global-break |
2437 |
(eval edebug-global-break-condition)) |
(if edebug-global-break-condition |
2438 |
(error nil)))) |
(condition-case nil |
2439 |
(edebug-break)) |
(setq edebug-global-break-result |
2440 |
|
(eval edebug-global-break-condition)) |
2441 |
|
(error nil)))) |
2442 |
|
(edebug-break)) |
2443 |
|
|
2444 |
;;; (edebug-trace "exp: %s" edebug-value) |
;;; (edebug-trace "exp: %s" edebug-value) |
2445 |
;; Test whether we should break. |
;; Test whether we should break. |
2446 |
(setq edebug-break |
(setq edebug-break |
2447 |
(or edebug-global-break |
(or edebug-global-break |
2448 |
(and edebug-break-data |
(and edebug-break-data |
2449 |
(or (not edebug-break-condition) |
(or (not edebug-break-condition) |
2450 |
(setq edebug-break-result |
(setq edebug-break-result |
2451 |
(eval edebug-break-condition)))))) |
(eval edebug-break-condition)))))) |
2452 |
(if (and edebug-break |
(if (and edebug-break |
2453 |
(nth 2 edebug-break-data)) ; is it temporary? |
(nth 2 edebug-break-data)) ; is it temporary? |
2454 |
;; Delete the breakpoint. |
;; Delete the breakpoint. |
2455 |
(setcdr edebug-data |
(setcdr edebug-data |
2456 |
(cons (delq edebug-break-data edebug-breakpoints) |
(cons (delq edebug-break-data edebug-breakpoints) |
2457 |
(cdr (cdr edebug-data))))) |
(cdr (cdr edebug-data))))) |
2458 |
|
|
2459 |
;; Display if mode is not go, continue, or Continue-fast |
;; Display if mode is not go, continue, or Continue-fast |
2460 |
;; or break, or input is pending, |
;; or break, or input is pending, |
2461 |
(if (or (not (memq edebug-execution-mode '(go continue Continue-fast))) |
(if (or (not (memq edebug-execution-mode '(go continue Continue-fast))) |
2462 |
edebug-break |
edebug-break |
2463 |
(edebug-input-pending-p)) |
(edebug-input-pending-p)) |
2464 |
(edebug-display)) ; <--------------- display |
(edebug-display)) ; <--------------- display |
2465 |
|
|
2466 |
edebug-value |
edebug-value |
2467 |
)) |
))) |
2468 |
|
|
2469 |
|
|
2470 |
;; window-start now stored with each function. |
;; window-start now stored with each function. |