comparison lisp/progmodes/idlw-shell.el @ 76073:9c80ddcdba82

(idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
author J.D. Smith <jdsmith@as.arizona.edu>
date Thu, 22 Feb 2007 20:18:17 +0000
parents 1029d540daf5
children 1064d1d79d3e 07774e5c3ff5 dd7c098af727
comparison
equal deleted inserted replaced
76072:08f453b60dc2 76073:9c80ddcdba82
3543 3543
3544 ;; Get sources for this routine in the sources list 3544 ;; Get sources for this routine in the sources list
3545 (idlwave-shell-module-source-query (idlwave-shell-bp-get bp 'module) 3545 (idlwave-shell-module-source-query (idlwave-shell-bp-get bp 'module)
3546 (idlwave-shell-bp-get bp 'type)) 3546 (idlwave-shell-bp-get bp 'type))
3547 (let* 3547 (let*
3548 ((arg (idlwave-shell-bp-get bp 'count)) 3548 ((count (idlwave-shell-bp-get bp 'count))
3549 (key (cond
3550 ((not (and arg (numberp arg))) "")
3551 ((= arg 1)
3552 ",/once")
3553 ((> arg 1)
3554 (format ",after=%d" arg))))
3555 (condition (idlwave-shell-bp-get bp 'condition)) 3549 (condition (idlwave-shell-bp-get bp 'condition))
3556 (disabled (idlwave-shell-bp-get bp 'disabled)) 3550 (disabled (idlwave-shell-bp-get bp 'disabled))
3557 (key (concat key 3551 (key (concat (if (and count (numberp count))
3558 (if condition (concat ",CONDITION=\"" condition "\"")))) 3552 (cond
3559 ;; IDL can't simultaneously set a condition and disable a 3553 ((= count 1) ",/once")
3560 ;; breakpoint, but it does keep both of these when resetting 3554 ((> count 1) (format ",after=%d" count))))
3561 ;; the same BP. We assume DISABLE and CONDITION are not set 3555 (if condition (concat ",CONDITION=\"" condition "\""))
3562 ;; together for a newly created breakpoint. 3556 ;; IDL can't simultaneously set a condition/count
3563 (key (concat key (if (and disabled (not condition)) ",/DISABLE"))) 3557 ;; and disable a breakpoint, but it does keep both
3558 ;; of these when resetting the same BP. We assume
3559 ;; DISABLE and CONDITION/COUNT are not set
3560 ;; together for a newly created breakpoint.
3561 (if (and disabled (not condition) (not count))
3562 ",/DISABLE")))
3564 (line (idlwave-shell-bp-get bp 'line))) 3563 (line (idlwave-shell-bp-get bp 'line)))
3565 (idlwave-shell-send-command 3564 (idlwave-shell-send-command
3566 (concat "breakpoint,'" 3565 (concat "breakpoint,'"
3567 (idlwave-shell-sources-bp bp) "'," 3566 (idlwave-shell-sources-bp bp) "',"
3568 (if (integerp line) (setq line (int-to-string line))) 3567 (if (integerp line) (setq line (int-to-string line)))