:version "22.1")
(defcustom gdb-many-windows nil
- "Nil means just pop up the GUD buffer unless `gdb-show-main' is t.
+ "nil means just pop up the GUD buffer unless `gdb-show-main' is t.
In this case it starts with two windows: one displaying the GUD
buffer and the other with the source file with the main routine
-of the inferior. Non-nil means display the layout shown for
+of the debugged program. Non-nil means display the layout shown for
`gdba'."
:type 'boolean
:group 'gud
(defconst gdb-var-list-children-regexp
"child={.*?name=\"\\(.*?\\)\",.*?exp=\"\\(.*?\\)\",.*?\
-numchild=\"\\(.*?\\)\",.*?type=\"\\(.*?\\)\".*?}")
+numchild=\"\\(.*?\\)\"\\(}\\|,.*?\\(type=\"\\(.*?\\)\"\\)?.*?}\\)")
(defun gdb-var-list-children-handler (varnum)
(goto-char (point-min))
(let ((varchild (list (match-string 1)
(match-string 2)
(match-string 3)
- (match-string 4)
+ (match-string 6)
nil nil)))
(if (assoc (car varchild) gdb-var-list)
(throw 'child-already-watched nil))
TEXT is the text of the button we clicked on, a + or - item.
TOKEN is data related to this node.
INDENT is the current indentation depth."
- (cond ((string-match "+" text) ;expand this node
- (if (and
- (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
- (string-equal gdb-version "pre-6.4"))
- (gdb-var-list-children token)
- (gdb-var-list-children-1 token)))
- ((string-match "-" text) ;contract this node
- (dolist (var gdb-var-list)
- (if (string-match (concat token "\\.") (car var))
- (setq gdb-var-list (delq var gdb-var-list))))
- (speedbar-change-expand-button-char ?+)
- (speedbar-delete-subblock indent))
- (t (error "Ooops... not sure what to do")))
- (speedbar-center-buffer-smartly))
+ (if (and gud-comint-buffer (buffer-name gud-comint-buffer))
+ (progn
+ (cond ((string-match "+" text) ;expand this node
+ (if (and (eq (buffer-local-value
+ 'gud-minor-mode gud-comint-buffer) 'gdba)
+ (string-equal gdb-version "pre-6.4"))
+ (gdb-var-list-children token)
+ (gdb-var-list-children-1 token)))
+ ((string-match "-" text) ;contract this node
+ (dolist (var gdb-var-list)
+ (if (string-match (concat token "\\.") (car var))
+ (setq gdb-var-list (delq var gdb-var-list))))
+ (speedbar-change-expand-button-char ?+)
+ (speedbar-delete-subblock indent))
+ (t (error "Ooops... not sure what to do")))
+ (speedbar-center-buffer-smartly))
+ (message-box "GUD session has been killed")))
(defun gdb-get-target-string ()
(with-current-buffer gud-comint-buffer
(if gdb-prompting
(progn
(gdb-send-item item)
- (setq gdb-prompting nil))
+ (setq gdb-prompting nil))
(push item gdb-input-queue))))
(defun gdb-dequeue-input ()
(progn
(setq gud-running t)
(setq gdb-inferior-status "running")
+ (setq gdb-signalled nil)
(gdb-force-mode-line-update
(propertize gdb-inferior-status 'face font-lock-type-face))
(gdb-remove-text-properties)
(or gdb-stack-position
(setq gdb-stack-position (make-marker)))
(set-marker gdb-stack-position (point)))
- (set-marker gdb-stack-position nil)
(put-text-property bl (+ bl 4)
'face '(:inverse-video t))))
(when (re-search-forward
(defun gdb-frame-memory-buffer ()
"Display memory contents in a new frame."
(interactive)
- (let ((special-display-regexps (append special-display-regexps '(".*")))
- (special-display-frame-alist gdb-frame-parameters))
+ (let* ((special-display-regexps (append special-display-regexps '(".*")))
+ (special-display-frame-alist
+ (cons '(left-fringe . 0)
+ (cons '(right-fringe . 0)
+ (cons '(width . 83) gdb-frame-parameters)))))
(display-buffer (gdb-get-buffer-create 'gdb-memory-buffer))))
\f
(defconst gdb-var-list-children-regexp-1
"child={.*?name=\"\\(.+?\\)\",.*?exp=\"\\(.+?\\)\",.*?\
-numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}")
+numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\)\
+\\(}\\|,.*?\\(type=\"\\(.+?\\)\"\\)?.*?}\\)")
(defun gdb-var-list-children-handler-1 (varnum)
(goto-char (point-min))
(let ((varchild (list (match-string 1)
(match-string 2)
(match-string 3)
- (match-string 5)
+ (match-string 7)
(read (match-string 4))
nil)))
(if (assoc (car varchild) gdb-var-list)
value))
(insert
(concat name "\t" (nth 1 local)
- "\t" (nth 2 local) "\n")))
+ "\t" value "\n")))
(set-window-start window start)
(set-window-point window p))))))))