Commit fbc232f4 authored by J.D. Smith's avatar J.D. Smith

(idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.

parent ecd3d557
...@@ -3545,22 +3545,21 @@ specified. If NO-SHOW is non-nil, don't do any updating." ...@@ -3545,22 +3545,21 @@ specified. If NO-SHOW is non-nil, don't do any updating."
(idlwave-shell-module-source-query (idlwave-shell-bp-get bp 'module) (idlwave-shell-module-source-query (idlwave-shell-bp-get bp 'module)
(idlwave-shell-bp-get bp 'type)) (idlwave-shell-bp-get bp 'type))
(let* (let*
((arg (idlwave-shell-bp-get bp 'count)) ((count (idlwave-shell-bp-get bp 'count))
(key (cond
((not (and arg (numberp arg))) "")
((= arg 1)
",/once")
((> arg 1)
(format ",after=%d" arg))))
(condition (idlwave-shell-bp-get bp 'condition)) (condition (idlwave-shell-bp-get bp 'condition))
(disabled (idlwave-shell-bp-get bp 'disabled)) (disabled (idlwave-shell-bp-get bp 'disabled))
(key (concat key (key (concat (if (and count (numberp count))
(if condition (concat ",CONDITION=\"" condition "\"")))) (cond
;; IDL can't simultaneously set a condition and disable a ((= count 1) ",/once")
;; breakpoint, but it does keep both of these when resetting ((> count 1) (format ",after=%d" count))))
;; the same BP. We assume DISABLE and CONDITION are not set (if condition (concat ",CONDITION=\"" condition "\""))
;; together for a newly created breakpoint. ;; IDL can't simultaneously set a condition/count
(key (concat key (if (and disabled (not condition)) ",/DISABLE"))) ;; and disable a breakpoint, but it does keep both
;; of these when resetting the same BP. We assume
;; DISABLE and CONDITION/COUNT are not set
;; together for a newly created breakpoint.
(if (and disabled (not condition) (not count))
",/DISABLE")))
(line (idlwave-shell-bp-get bp 'line))) (line (idlwave-shell-bp-get bp 'line)))
(idlwave-shell-send-command (idlwave-shell-send-command
(concat "breakpoint,'" (concat "breakpoint,'"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment