This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] gdb-mi.el
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 23 Aug 2006 08:55:34 +1200
- Subject: [PATCH] gdb-mi.el
Sychronising again.
OK to commit?
--
Nick http://www.inet.net.nz/~nickrob
2006-08-23 Nick Roberts <nickrob@snap.net.nz>
* mi/gdb-mi.el (gdbmi): Remove gdb-force-update, initialize
other variables.
(gdbmi-send): Ensure any text properties can be removed.
(gdbmi-prompt1): Update to gdb-ui.el
(gud-gdbmi-marker-filter): Defer setting of gud-running.
Keep gdb-done-regexp for partial-output-buffer.
(gdb-stack-list-frames-handler): Add face to function names.
*** gdb-mi.el 15 May 2006 10:27:26 +1200 1.8
--- gdb-mi.el 23 Aug 2006 08:23:33 +1200
***************
*** 36,41 ****
--- 36,46 ----
;; development and is part of a process to migrate Emacs from annotations (as
;; used in gdb-ui.el) to GDB/MI. It runs gdb with GDB/MI (-interp=mi) and
;; access CLI using "-interpreter-exec console cli-command".
+
+ ;; This mode acts on top of gdb-ui.el. After the release of 22.0,
+ ;; mainline Emacs in the CVS repository will have a file also called gdb-mi.el
+ ;; which will *replace* gdb-ui.el. If you are interested in developing
+ ;; this mode you should get this version.
;;
;; Known Bugs:
;;
***************
*** 177,183 ****
gdb-selected-frame nil
gdb-frame-number nil
gdb-var-list nil
- gdb-force-update t
gdb-prompting nil
gdb-input-queue nil
gdb-current-item nil
--- 182,187 ----
***************
*** 190,195 ****
--- 194,203 ----
gdb-last-command nil
gdb-prompt-name nil
gdb-buffer-fringe-width (car (window-fringes)))
+ gdb-debug-ring nil
+ gdb-source-window nil
+ gdb-inferior-status nil
+ gdb-continuation nil
;;
(setq gdb-buffer-type 'gdbmi)
;;
***************
*** 221,232 ****
(if gud-running
(process-send-string proc (concat string "\n"))
(with-current-buffer gud-comint-buffer
! (remove-text-properties (point-min) (point-max) '(face)))
(setq gdb-output-sink 'user)
(setq gdb-prompting nil)
;; mimic <RET> key to repeat previous command in GDB
(if (not (string-match "^\\s+$" string))
! (setq gdb-last-command string)
(if gdb-last-command (setq string gdb-last-command)))
(if gdb-enable-debug
(push (cons 'mi-send (concat string "\n")) gdb-debug-ring))
--- 229,241 ----
(if gud-running
(process-send-string proc (concat string "\n"))
(with-current-buffer gud-comint-buffer
! (let ((inhibit-read-only t))
! (remove-text-properties (point-min) (point-max) '(face))))
(setq gdb-output-sink 'user)
(setq gdb-prompting nil)
;; mimic <RET> key to repeat previous command in GDB
(if (not (string-match "^\\s+$" string))
! (setq gdb-last-command string)
(if gdb-last-command (setq string gdb-last-command)))
(if gdb-enable-debug
(push (cons 'mi-send (concat string "\n")) gdb-debug-ring))
***************
*** 267,283 ****
(defun gdbmi-prompt1 ()
"Queue any GDB commands that the user interface needs."
(unless gdb-pending-triggers
- (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
- (setq gdb-force-update t)
- (dolist (var gdb-var-list)
- (setcar (nthcdr 5 var) nil))
- (gdb-var-update-1))
(gdbmi-get-selected-frame)
(gdbmi-invalidate-frames)
(gdbmi-invalidate-breakpoints)
(gdb-get-changed-registers)
(gdb-invalidate-registers-1)
! (gdb-invalidate-locals-1)))
(defun gdbmi-prompt2 ()
"Handle any output and send next GDB command."
--- 276,289 ----
(defun gdbmi-prompt1 ()
"Queue any GDB commands that the user interface needs."
(unless gdb-pending-triggers
(gdbmi-get-selected-frame)
(gdbmi-invalidate-frames)
(gdbmi-invalidate-breakpoints)
(gdb-get-changed-registers)
(gdb-invalidate-registers-1)
! (gdb-invalidate-locals-1)
! (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
! (gdb-var-update-1))))
(defun gdbmi-prompt2 ()
"Handle any output and send next GDB command."
***************
*** 304,317 ****
;; Recall the left over gud-marker-acc from last time
(setq gud-marker-acc (concat gud-marker-acc string))
;; Start accumulating output for the GUD buffer
! (let ((output ""))
(if (string-match gdb-running-regexp gud-marker-acc)
(setq
gud-marker-acc
(concat (substring gud-marker-acc 0 (match-beginning 0))
(substring gud-marker-acc (match-end 0)))
! gud-running t))
(if (string-match gdb-stopped-regexp gud-marker-acc)
(setq
--- 310,323 ----
;; Recall the left over gud-marker-acc from last time
(setq gud-marker-acc (concat gud-marker-acc string))
;; Start accumulating output for the GUD buffer
! (let ((output "") running)
(if (string-match gdb-running-regexp gud-marker-acc)
(setq
gud-marker-acc
(concat (substring gud-marker-acc 0 (match-beginning 0))
(substring gud-marker-acc (match-end 0)))
! running t))
(if (string-match gdb-stopped-regexp gud-marker-acc)
(setq
***************
*** 327,346 ****
;; Filter error messages going to GUD buffer and
;; display in minibuffer.
! (if (eq gdb-output-sink 'user)
! (while (string-match gdb-error-regexp gud-marker-acc)
! (message (read (match-string 1 gud-marker-acc)))
! (setq
! gud-marker-acc
! (concat (substring gud-marker-acc 0 (match-beginning 0))
! (substring gud-marker-acc (match-end 0))))))
!
! (if (string-match gdb-done-regexp gud-marker-acc)
(setq
gud-marker-acc
(concat (substring gud-marker-acc 0 (match-beginning 0))
(substring gud-marker-acc (match-end 0)))))
(when (string-match gdb-gdb-regexp gud-marker-acc)
(setq
gud-marker-acc
--- 333,352 ----
;; Filter error messages going to GUD buffer and
;; display in minibuffer.
! (when (eq gdb-output-sink 'user)
! (while (string-match gdb-error-regexp gud-marker-acc)
! (message (read (match-string 1 gud-marker-acc)))
(setq
gud-marker-acc
(concat (substring gud-marker-acc 0 (match-beginning 0))
(substring gud-marker-acc (match-end 0)))))
+ (if (string-match gdb-done-regexp gud-marker-acc)
+ (setq
+ gud-marker-acc
+ (concat (substring gud-marker-acc 0 (match-beginning 0))
+ (substring gud-marker-acc (match-end 0))))))
+
(when (string-match gdb-gdb-regexp gud-marker-acc)
(setq
gud-marker-acc
***************
*** 375,381 ****
(gdbmi-prompt1)
(unless gdb-input-queue
(setq output (concat output gdb-prompt-name)))
! (gdbmi-prompt2))
(when gud-running
(setq output (gdbmi-concat-output output gud-marker-acc))
--- 381,388 ----
(gdbmi-prompt1)
(unless gdb-input-queue
(setq output (concat output gdb-prompt-name)))
! (gdbmi-prompt2)
! (setq gud-running running))
(when gud-running
(setq output (gdbmi-concat-output output gud-marker-acc))
***************
*** 509,515 ****
(concat
(nth 0 frame) "\t"
(nth 1 frame) "\t"
! (nth 2 frame) "\t"
(if (nth 3 frame)
(concat "at "(nth 3 frame) ":" (nth 4 frame) "\n")
(concat "from " (nth 5 frame) "\n")))))
--- 516,523 ----
(concat
(nth 0 frame) "\t"
(nth 1 frame) "\t"
! (propertize (nth 2 frame)
! 'face font-lock-function-name-face) "\t"
(if (nth 3 frame)
(concat "at "(nth 3 frame) ":" (nth 4 frame) "\n")
(concat "from " (nth 5 frame) "\n")))))