From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25899 invoked by alias); 22 Aug 2006 20:57:48 -0000 Received: (qmail 25889 invoked by uid 22791); 22 Aug 2006 20:57:47 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 Aug 2006 20:57:42 +0000 Received: from kahikatea.snap.net.nz (p202-124-125-225.snap.net.nz [202.124.125.225]) by viper.snap.net.nz (Postfix) with ESMTP id 692CE7B4BA8 for ; Wed, 23 Aug 2006 08:57:38 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 7B887BE43C; Wed, 23 Aug 2006 08:55:36 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17643.28486.490932.560091@kahikatea.snap.net.nz> Date: Tue, 22 Aug 2006 21:04:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH] gdb-mi.el X-Mailer: VM 7.19 under Emacs 22.0.50.4 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00171.txt.bz2 Sychronising again. OK to commit? -- Nick http://www.inet.net.nz/~nickrob 2006-08-23 Nick Roberts * 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 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 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")))))