Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb-mi.el
@ 2006-08-22 21:04 Nick Roberts
  2006-08-22 21:32 ` Daniel Jacobowitz
  2006-08-23 18:10 ` gdb-mi.el Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: Nick Roberts @ 2006-08-22 21:04 UTC (permalink / raw)
  To: gdb-patches


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")))))


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH] gdb-mi.el
@ 2006-05-14 13:28 Nick Roberts
  2006-05-14 20:07 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Roberts @ 2006-05-14 13:28 UTC (permalink / raw)
  To: gdb-patches


A few more changes to keep in sync.

OK to commit?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


2006-05-14  Nick Roberts  <nickrob@snap.net.nz>

	* mi/gdb-mi.el (gdbmi-send): Correct regexp for repeat commands.
	(gdbmi): Use new variable name gdb-pc-address.
	(gdbmi-frame-handler):  Use new variable name gdb-pc-address.
	Check that a match has been found.


*** gdb-mi.el	31 Mar 2006 12:46:48 +1200	1.7
--- gdb-mi.el	21 Apr 2006 03:12:45 +1200	
***************
*** 170,176 ****
    (setq comint-input-sender 'gdbmi-send)
    ;;
    ;; (re-)initialise
!   (setq gdb-frame-address (if gdb-show-main "main" nil)
          gdb-previous-frame-address nil
          gdb-memory-address "main"
          gdb-previous-frame nil
--- 170,176 ----
    (setq comint-input-sender 'gdbmi-send)
    ;;
    ;; (re-)initialise
!   (setq gdb-pc-address (if gdb-show-main "main" nil)
          gdb-previous-frame-address nil
          gdb-memory-address "main"
          gdb-previous-frame nil
***************
*** 225,231 ****
      (setq gdb-output-sink 'user)
      (setq gdb-prompting nil)
      ;; mimic <RET> key to repeat previous command in GDB
!     (if (string-match "^\\S+$" string)
  	(setq gdb-last-command string)
        (if gdb-last-command (setq string gdb-last-command)))
      (if gdb-enable-debug
--- 225,231 ----
      (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
***************
*** 563,584 ****
      (goto-char (point-min))
      (when (re-search-forward gdb-stack-list-frames-regexp nil t)
        (setq gdb-frame-number (match-string 1))
!       (setq gdb-frame-address (match-string 2))
        (setq gdb-selected-frame (match-string 3))
!       (setq gud-last-frame
! 	    (cons (match-string 4) (string-to-number (match-string 5))))
!       (gud-display-frame)
!       (if gud-overlay-arrow-position
! 	  (let ((buffer (marker-buffer gud-overlay-arrow-position))
! 		(position (marker-position gud-overlay-arrow-position)))
! 	    (when buffer
! 	      (with-current-buffer buffer
! 		(setq fringe-indicator-alist
! 		      (if (string-equal gdb-frame-number "0")
! 			  nil
! 			'((overlay-arrow . hollow-right-triangle))))
! 		(setq gud-overlay-arrow-position (make-marker))
! 		(set-marker gud-overlay-arrow-position position)))))
        (if (gdb-get-buffer 'gdb-locals-buffer)
  	  (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
  	    (setq mode-name (concat "Locals:" gdb-selected-frame))))
--- 563,585 ----
      (goto-char (point-min))
      (when (re-search-forward gdb-stack-list-frames-regexp nil t)
        (setq gdb-frame-number (match-string 1))
!       (setq gdb-pc-address (match-string 2))
        (setq gdb-selected-frame (match-string 3))
!       (when (match-string 4)
! 	(setq gud-last-frame
! 	      (cons (match-string 4) (string-to-number (match-string 5))))
! 	(gud-display-frame)
! 	(if gud-overlay-arrow-position
! 	    (let ((buffer (marker-buffer gud-overlay-arrow-position))
! 		  (position (marker-position gud-overlay-arrow-position)))
! 	      (when buffer
! 		(with-current-buffer buffer
! 		  (setq fringe-indicator-alist
! 			(if (string-equal gdb-frame-number "0")
! 			    nil
! 			  '((overlay-arrow . hollow-right-triangle))))
! 		  (setq gud-overlay-arrow-position (make-marker))
! 		  (set-marker gud-overlay-arrow-position position))))))
        (if (gdb-get-buffer 'gdb-locals-buffer)
  	  (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
  	    (setq mode-name (concat "Locals:" gdb-selected-frame))))


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH] gdb-mi.el
@ 2006-03-25  8:19 Nick Roberts
  2006-03-25 10:14 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Roberts @ 2006-03-25  8:19 UTC (permalink / raw)
  To: gdb-patches

Here's my latest patch for gdb-mi.el.  I guess it's a little bit pointless as
Emacs doesn't seem to have a slow release cycle, so much as a no release cycle 
- its just to keep things tidy.

OK to commit?

-- 
Nick                                           http://www.inet.net.nz/~nickrob

Side Note: diff -p doesn't seem to work with Emacs Lisp

2006-03-25  Nick Roberts  <nickrob@snap.net.nz>

	* mi/gdb-mi.el (gdbmi-send): Improve regexp to repeat commands.
	Try to deal with continuation line.
	(gdbmi, gdbmi-prompt1, gud-gdbmi-marker-filter): Update to new
	variable names.
	(gdb-break-list-regexp, gdb-stack-list-frames-regexp): 
	Future proof against new fields being added to MI output.
	(gdbmi-prompt2, gdb-break-list-handler,gdb-get-source-file)
	(gdbmi-frame-handler): Update to new variable name
	gdb-get-buffer-create.
	(gdbmi-frame-handler): Use hollow-right-triangle for all selected
	frames which except the innermost (where execution has stopped).


*** gdb-mi.el	14 Feb 2006 21:54:32 +1300	1.6
--- gdb-mi.el	25 Mar 2006 18:57:55 +1200	
*************** detailed description of this mode.
*** 115,121 ****
    ;; Let's start with a basic gud-gdb buffer and then modify it a bit.
    (gdb command-line)
    ;;
!   (setq gdb-debug-log nil)
    (set (make-local-variable 'gud-minor-mode) 'gdbmi)
    (set (make-local-variable 'gud-marker-filter) 'gud-gdbmi-marker-filter)
    ;;
--- 115,121 ----
    ;; Let's start with a basic gud-gdb buffer and then modify it a bit.
    (gdb command-line)
    ;;
!   (setq gdb-debug-ring nil)
    (set (make-local-variable 'gud-minor-mode) 'gdbmi)
    (set (make-local-variable 'gud-marker-filter) 'gud-gdbmi-marker-filter)
    ;;
*************** detailed description of this mode.
*** 177,183 ****
          gdb-selected-frame nil
          gdb-frame-number nil
          gdb-var-list nil
!         gdb-var-changed nil
          gdb-prompting nil
          gdb-input-queue nil
          gdb-current-item nil
--- 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
*************** detailed description of this mode.
*** 225,242 ****
      (setq gdb-output-sink 'user)
      (setq gdb-prompting nil)
      ;; mimic <RET> key to repeat previous command in GDB
!     (if (string-match "\\S+" string)
  	(setq gdb-last-command string)
        (if gdb-last-command (setq string gdb-last-command)))
!     (if gdb-enable-debug-log 
! 	(push (cons 'mi-send (concat string "\n")) gdb-debug-log))
!     (process-send-string
!      proc
       (if (string-match "^-" string)
  	 ;; MI command
! 	 (concat string "\n")
         ;; CLI command
!        (concat "-interpreter-exec console \"" string "\"\n")))))
  
  (defcustom gud-gdbmi-command-name "gdb -interp=mi"
    "Default command to execute an executable under the GDB-UI debugger."
--- 225,245 ----
      (setq gdb-output-sink 'user)
      (setq gdb-prompting nil)
      ;; mimic <RET> key to repeat previous command in GDB
!     (if (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))
       (if (string-match "^-" string)
  	 ;; MI command
! 	 (process-send-string proc (concat string "\n"))
         ;; CLI command
!     (if (string-match "\\\\$" string)
! 	(setq gdb-continuation (concat gdb-continuation string "\n"))
!       (process-send-string proc
! 			   (concat "-interpreter-exec console \""
! 				   gdb-continuation string "\"\n"))
!       (setq gdb-continuation nil)))))
  
  (defcustom gud-gdbmi-command-name "gdb -interp=mi"
    "Default command to execute an executable under the GDB-UI debugger."
*************** detailed description of this mode.
*** 265,271 ****
    "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-var-changed t)   ; force update
        (dolist (var gdb-var-list)
  	(setcar (nthcdr 5 var) nil))
        (gdb-var-update-1))
--- 268,274 ----
    "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))
*************** detailed description of this mode.
*** 282,288 ****
      (when (eq sink 'emacs)
        (let ((handler
  	     (car (cdr gdb-current-item))))
! 	(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
  	  (funcall handler)))))
    (let ((input (gdb-dequeue-input)))
      (if input
--- 285,291 ----
      (when (eq sink 'emacs)
        (let ((handler
  	     (car (cdr gdb-current-item))))
! 	(with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
  	  (funcall handler)))))
    (let ((input (gdb-dequeue-input)))
      (if input
*************** detailed description of this mode.
*** 296,303 ****
    "Filter GDB/MI output."
    (if gdb-flush-pending-output
        nil
!     (if gdb-enable-debug-log (push (cons 'recv (list string gdb-output-sink))
! 					 gdb-debug-log))
      ;; 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
--- 299,306 ----
    "Filter GDB/MI output."
    (if gdb-flush-pending-output
        nil
!     (if gdb-enable-debug (push (cons 'recv (list string gdb-output-sink))
! 					 gdb-debug-ring))
      ;; 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
*************** detailed description of this mode.
*** 400,415 ****
    gdb-break-list-handler)
  
  (defconst gdb-break-list-regexp
! "number=\"\\(.*?\\)\",type=\"\\(.*?\\)\",disp=\"\\(.*?\\)\",enabled=\"\\(.\\)\",\
! addr=\"\\(.*?\\)\",\
! \\(?:func=\"\\(.*?\\)\",file=\"\\(.*?\\)\",fullname=\".*?\",line=\"\\(.*?\\)\",\
! \\|\\(?:what=\"\\(.*?\\)\",\\)*\\)times=\"\\(.*?\\)\"")
  
  (defun gdb-break-list-handler ()
    (setq gdb-pending-triggers (delq 'gdbmi-invalidate-breakpoints
  				  gdb-pending-triggers))
    (let ((breakpoint) (breakpoints-list))
!     (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
        (goto-char (point-min))
        (while (re-search-forward gdb-break-list-regexp nil t)
  	(let ((breakpoint (list (match-string 1)
--- 403,418 ----
    gdb-break-list-handler)
  
  (defconst gdb-break-list-regexp
! "bkpt={.*?number=\"\\(.*?\\)\",.*?type=\"\\(.*?\\)\",.*?disp=\"\\(.*?\\)\",.*?\
! enabled=\"\\(.\\)\",.*?addr=\"\\(.*?\\)\",\\(?:.*?func=\"\\(.*?\\)\",.*?\
! file=\"\\(.*?\\)\",.*?fullname=\".*?\",.*?line=\"\\(.*?\\)\",\
! \\|\\(?:.*?what=\"\\(.*?\\)\",\\)*\\).*?times=\"\\(.*?\\)\".*?}")
  
  (defun gdb-break-list-handler ()
    (setq gdb-pending-triggers (delq 'gdbmi-invalidate-breakpoints
  				  gdb-pending-triggers))
    (let ((breakpoint) (breakpoints-list))
!     (with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
        (goto-char (point-min))
        (while (re-search-forward gdb-break-list-regexp nil t)
  	(let ((breakpoint (list (match-string 1)
*************** Add directory to search path for source 
*** 476,483 ****
    gdb-stack-list-frames-handler)
  
  (defconst gdb-stack-list-frames-regexp
! "level=\"\\(.*?\\)\",addr=\"\\(.*?\\)\",func=\"\\(.*?\\)\",\
! \\(?:file=\".*?\",fullname=\"\\(.*?\\)\",line=\"\\(.*?\\)\"\\|\
  from=\"\\(.*?\\)\"\\)")
  
  (defun gdb-stack-list-frames-handler ()
--- 479,486 ----
    gdb-stack-list-frames-handler)
  
  (defconst gdb-stack-list-frames-regexp
! "{.*?level=\"\\(.*?\\)\",.*?addr=\"\\(.*?\\)\",.*?func=\"\\(.*?\\)\",\
! \\(?:.*?file=\".*?\",.*?fullname=\"\\(.*?\\)\",.*?line=\"\\(.*?\\)\".*?}\\|\
  from=\"\\(.*?\\)\"\\)")
  
  (defun gdb-stack-list-frames-handler ()
*************** from=\"\\(.*?\\)\"\\)")
*** 485,491 ****
  				  gdb-pending-triggers))
    (let ((frame nil)
  	(call-stack nil))
!     (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
        (goto-char (point-min))
        (while (re-search-forward gdb-stack-list-frames-regexp nil t)
  	(let ((frame (list (match-string 1)
--- 488,494 ----
  				  gdb-pending-triggers))
    (let ((frame nil)
  	(call-stack nil))
!     (with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
        (goto-char (point-min))
        (while (re-search-forward gdb-stack-list-frames-regexp nil t)
  	(let ((frame (list (match-string 1)
*************** buffers, if required."
*** 540,546 ****
        (setq gdb-main-file (match-string 1)))
   (if gdb-many-windows
        (gdb-setup-windows)
!    (gdb-get-create-buffer 'gdb-breakpoints-buffer)
     (if gdb-show-main
         (let ((pop-up-windows t))
  	 (display-buffer (gud-find-file gdb-main-file))))))
--- 543,549 ----
        (setq gdb-main-file (match-string 1)))
   (if gdb-many-windows
        (gdb-setup-windows)
!    (gdb-get-buffer-create 'gdb-breakpoints-buffer)
     (if gdb-show-main
         (let ((pop-up-windows t))
  	 (display-buffer (gud-find-file gdb-main-file))))))
*************** buffers, if required."
*** 556,562 ****
  (defun gdbmi-frame-handler ()
    (setq gdb-pending-triggers
  	(delq 'gdbmi-get-selected-frame gdb-pending-triggers))
!   (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
      (goto-char (point-min))
      (when (re-search-forward gdb-stack-list-frames-regexp nil t)
        (setq gdb-frame-number (match-string 1))
--- 559,565 ----
  (defun gdbmi-frame-handler ()
    (setq gdb-pending-triggers
  	(delq 'gdbmi-get-selected-frame gdb-pending-triggers))
!   (with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
      (goto-char (point-min))
      (when (re-search-forward gdb-stack-list-frames-regexp nil t)
        (setq gdb-frame-number (match-string 1))
*************** buffers, if required."
*** 565,570 ****
--- 568,584 ----
        (setq gud-last-frame
  	    (cons (match-string 4) (string-to-number (match-string 5))))
        (gud-display-frame)
+       (if gud-overlay-arrow-position
+ 	  (let ((buffer (marker-buffer gud-overlay-arrow-position))
+ 		(position (marker-position gud-overlay-arrow-position)))
+ 	    (when buffer
+ 	      (with-current-buffer buffer
+ 		(setq fringe-indicator-alist
+ 		      (if (string-equal gdb-frame-number "0")
+ 			  nil
+ 			'((overlay-arrow . hollow-right-triangle))))
+ 		(setq gud-overlay-arrow-position (make-marker))
+ 		(set-marker gud-overlay-arrow-position position)))))
        (if (gdb-get-buffer 'gdb-locals-buffer)
  	  (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
  	    (setq mode-name (concat "Locals:" gdb-selected-frame))))


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH] gdb-mi.el
@ 2006-02-10  4:02 Nick Roberts
  2006-02-10  5:34 ` Daniel Jacobowitz
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Roberts @ 2006-02-10  4:02 UTC (permalink / raw)
  To: gdb-patches


Emacs 22 hasn't been released yet and so is still changing.  OK  to commit?

Nick


2005-10-27  Nick Roberts  <nickrob@snap.net.nz>

	* mi/gdb-mi.el: Update to reflect changes in Emacs 22.0.50


*** gdb-mi.el	10 Feb 2006 16:57:10 +1300	1.4
--- gdb-mi.el	09 Feb 2006 23:50:50 +1300	
***************
*** 43,50 ****
  ;; GUD buffer you must not use run, step, next or continue etc but their MI
  ;; counterparts through gud-run, gud-step etc, e.g clicking on the appropriate
  ;; icon in the toolbar.
- ;;
  ;; 2) Some commands send extra prompts to the GUD buffer.
  ;;
  ;; TODO:
  ;; 1) Prefix MI commands with a token instead of queueing commands.
--- 43,50 ----
  ;; GUD buffer you must not use run, step, next or continue etc but their MI
  ;; counterparts through gud-run, gud-step etc, e.g clicking on the appropriate
  ;; icon in the toolbar.
  ;; 2) Some commands send extra prompts to the GUD buffer.
+ ;; 3) Doesn't list catchpoints in breakpoints buffer.
  ;;
  ;; TODO:
  ;; 1) Prefix MI commands with a token instead of queueing commands.
***************
*** 216,221 ****
--- 216,222 ----
    (gdb-enqueue-input
     (list "-gdb-show prompt\n" 'gdb-get-prompt))
    ;;
+   (setq gdb-locals-font-lock-keywords gdb-locals-font-lock-keywords-2)
    (run-hooks 'gdbmi-mode-hook))
  
  ; Force nil till fixed.
***************
*** 467,473 ****
  
  (defconst gdb-break-list-regexp
  "number=\"\\(.*?\\)\",type=\"\\(.*?\\)\",disp=\"\\(.*?\\)\",enabled=\"\\(.\\)\",\
! addr=\"\\(.*?\\)\",func=\"\\(.*?\\)\",file=\"\\(.*?\\)\",line=\"\\(.*?\\)\"")
  
  (defun gdb-break-list-handler ()
    (setq gdb-pending-triggers (delq 'gdbmi-invalidate-breakpoints
--- 468,475 ----
  
  (defconst gdb-break-list-regexp
  "number=\"\\(.*?\\)\",type=\"\\(.*?\\)\",disp=\"\\(.*?\\)\",enabled=\"\\(.\\)\",\
! addr=\"\\(.*?\\)\",func=\"\\(.*?\\)\",file=\"\\(.*?\\)\",fullname=\".*?\",\
! line=\"\\(.*?\\)\"")
  
  (defun gdb-break-list-handler ()
    (setq gdb-pending-triggers (delq 'gdbmi-invalidate-breakpoints
***************
*** 553,566 ****
        (end-of-line)))
    (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
  
! (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
  
  (defun gdbmi-get-location (bptno line flag)
    "Find the directory containing the relevant source file.
  Put in buffer and place breakpoint icon."
    (goto-char (point-min))
    (catch 'file-not-found
!     (if (re-search-forward gdb-source-file-regexp nil t)
  	(delete (cons bptno "File not found") gdb-location-alist)
  	(push (cons bptno (match-string 1)) gdb-location-alist)
        (gdb-resync)
--- 555,568 ----
        (end-of-line)))
    (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
  
! (defvar gdbmi-source-file-regexp "fullname=\"\\(.*?\\)\"")
  
  (defun gdbmi-get-location (bptno line flag)
    "Find the directory containing the relevant source file.
  Put in buffer and place breakpoint icon."
    (goto-char (point-min))
    (catch 'file-not-found
!     (if (re-search-forward gdbmi-source-file-regexp nil t)
  	(delete (cons bptno "File not found") gdb-location-alist)
  	(push (cons bptno (match-string 1)) gdb-location-alist)
        (gdb-resync)
***************
*** 773,779 ****
    "Find the source file where the program starts and display it with related
  buffers, if required."
    (goto-char (point-min))
!   (if (re-search-forward gdb-source-file-regexp nil t)
        (setq gdb-main-file (match-string 1)))
   (if gdb-many-windows
        (gdb-setup-windows)
--- 775,781 ----
    "Find the source file where the program starts and display it with related
  buffers, if required."
    (goto-char (point-min))
!   (if (re-search-forward gdbmi-source-file-regexp nil t)
        (setq gdb-main-file (match-string 1)))
   (if gdb-many-windows
        (gdb-setup-windows)
***************
*** 785,791 ****
  (defun gdb-get-source-file-list ()
    "Create list of source files for current GDB session."
    (goto-char (point-min))
!   (while (re-search-forward gdb-source-file-regexp nil t)
      (push (match-string 1) gdb-source-file-list)))
  
  (defun gdbmi-get-selected-frame ()
--- 787,793 ----
  (defun gdb-get-source-file-list ()
    "Create list of source files for current GDB session."
    (goto-char (point-min))
!   (while (re-search-forward gdbmi-source-file-regexp nil t)
      (push (match-string 1) gdb-source-file-list)))
  
  (defun gdbmi-get-selected-frame ()


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH] gdb-mi.el
@ 2005-11-14 11:34 Nick Roberts
  2005-11-17 10:04 ` Daniel Jacobowitz
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Roberts @ 2005-11-14 11:34 UTC (permalink / raw)
  To: gdb-patches


Here's another patch for gdb-mi.el.  OK to commit to mainline and release
branch?

Nick


2005-11-14  Nick Roberts  <nickrob@snap.net.nz>

	* mi/gdb-mi.el (gdb-source-file-list): Declare.
	(gdbmi): Bind new functions.
	(gdbmi-var-list-children-handler, gdbmi-var-list-children-regexp):
	Handle string expressions properly.  Move "type" field into regexp.
	(gdbmi-var-update-regexp, gdbmi-var-update-handler): Handle string
	expressions properly.  Update speedbar.
	(gdbmi-breakpoints-buffer, gdb-stack-buffer, gdb-locals-buffer)
	(gdb-registers-buffer): Use def-gdb-auto-update-trigger instead of
	def-gdb-auto-updated-buffer as handlers is defined explicitly.
	(gdb-stack-list-locals-handler): Handle string expressions properly.
	(gdb-data-list-register-values-handler)
	(gdb-data-list-register-values-custom): Fontify buffer.


*** gdb-mi.el	27 Oct 2005 22:35:38 +1300	1.3
--- gdb-mi.el	14 Nov 2005 16:28:37 +1300	
***************
*** 58,63 ****
--- 58,64 ----
  (require 'gud)
  (require 'gdb-ui)
  
+ (defvar gdb-source-file-list nil)
  (defvar gdb-register-names nil "List of register names.")
  (defvar gdb-changed-registers nil
    "List of changed register numbers (strings).")
***************
*** 81,87 ****
  
  Watch expressions appear in the speedbar/slowbar.
  
! The following interactive lisp functions help control operation :
  
  `gdb-many-windows'    - Toggle the number of windows gdb uses.
  `gdb-restore-windows' - To restore the window layout.
--- 82,88 ----
  
  Watch expressions appear in the speedbar/slowbar.
  
! The following commands help control operation :
  
  `gdb-many-windows'    - Toggle the number of windows gdb uses.
  `gdb-restore-windows' - To restore the window layout.
***************
*** 90,118 ****
  detailed description of this mode.
  
  
! ---------------------------------------------------------------------
!                                GDB Toolbar
! ---------------------------------------------------------------------
! GUD buffer (I/O of GDB)           | Locals buffer
!                                   |
!                                   |
!                                   |
! ---------------------------------------------------------------------
!  Source buffer                    | Input/Output (of inferior) buffer
!                                   | (comint-mode)
!                                   |
!                                   |
!                                   |
!                                   |
!                                   |
!                                   |
! ---------------------------------------------------------------------
!  Stack buffer                     | Breakpoints buffer
!  RET      gdb-frames-select       | SPC    gdb-toggle-breakpoint
!                                   | RET    gdb-goto-breakpoint
!                                   |   d    gdb-delete-breakpoint
! ---------------------------------------------------------------------
! "
    ;;
    (interactive (list (gud-query-cmdline 'gdbmi)))
    ;;
--- 91,118 ----
  detailed description of this mode.
  
  
! +--------------------------------------------------------------+
! |                           GDB Toolbar                        |
! +-------------------------------+------------------------------+
! | GUD buffer (I/O of GDB)       | Locals buffer                |
! |                               |                              |
! |                               |                              |
! |                               |                              |
! +-------------------------------+------------------------------+
! | Source buffer                 | I/O buffer (of inferior)     |
! |                               | (comint-mode)                |
! |                               |                              |
! |                               |                              |
! |                               |                              |
! |                               |                              |
! |                               |                              |
! |                               |                              |
! +-------------------------------+------------------------------+
! | Stack buffer                  | Breakpoints buffer           |
! | RET      gdb-frames-select    | SPC    gdb-toggle-breakpoint |
! |                               | RET    gdb-goto-breakpoint   |
! |                               | d      gdb-delete-breakpoint |
! +-------------------------------+------------------------------+"
    ;;
    (interactive (list (gud-query-cmdline 'gdbmi)))
    ;;
***************
*** 162,169 ****
      'gdb-mouse-set-clear-breakpoint)
    (define-key gud-minor-mode-map [left-fringe mouse-1]
      'gdb-mouse-set-clear-breakpoint)
    (define-key gud-minor-mode-map [left-margin mouse-3]
!     'gdb-mouse-toggle-breakpoint)
  
    (setq comint-input-sender 'gdbmi-send)
    ;;
--- 162,175 ----
      'gdb-mouse-set-clear-breakpoint)
    (define-key gud-minor-mode-map [left-fringe mouse-1]
      'gdb-mouse-set-clear-breakpoint)
+   (define-key gud-minor-mode-map [left-fringe mouse-2]
+     'gdb-mouse-until)
+   (define-key gud-minor-mode-map [left-fringe drag-mouse-1]
+     'gdb-mouse-until)
    (define-key gud-minor-mode-map [left-margin mouse-3]
!     'gdb-mouse-toggle-breakpoint-margin)
!   (define-key gud-minor-mode-map [left-fringe mouse-3]
!     'gdb-mouse-toggle-breakpoint-fringe)
  
    (setq comint-input-sender 'gdbmi-send)
    ;;
***************
*** 223,230 ****
  	     `(lambda () (gdbmi-var-list-children-handler ,varnum)))))
  
  (defconst gdbmi-var-list-children-regexp
! "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",\
! value=\"\\(.*?\\)\"")
  
  (defun gdbmi-var-list-children-handler (varnum)
    (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
--- 229,236 ----
  	     `(lambda () (gdbmi-var-list-children-handler ,varnum)))))
  
  (defconst gdbmi-var-list-children-regexp
!   "name=\"\\(.+?\\)\",exp=\"\\(.+?\\)\",numchild=\"\\(.+?\\)\",\
! value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
  
  (defun gdbmi-var-list-children-handler (varnum)
    (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
***************
*** 239,249 ****
  		 (let ((varchild (list (match-string 2)
  				       (match-string 1)
  				       (match-string 3)
! 				       nil
! 				       (match-string 4)
  				       nil)))
- 		   (if (looking-at ",type=\"\\(.*?\\)\"")
- 		       (setcar (nthcdr 3 varchild) (match-string 1)))
  		   (dolist (var1 gdb-var-list)
  		     (if (string-equal (cadr var1) (cadr varchild))
  			 (throw 'child-already-watched nil)))
--- 245,253 ----
  		 (let ((varchild (list (match-string 2)
  				       (match-string 1)
  				       (match-string 3)
! 				       (match-string 5)
! 				       (read (match-string 4))
  				       nil)))
  		   (dolist (var1 gdb-var-list)
  		     (if (string-equal (cadr var1) (cadr varchild))
  			 (throw 'child-already-watched nil)))
***************
*** 257,280 ****
    (gdb-enqueue-input
     (list "-var-update --all-values *\n" 'gdbmi-var-update-handler)))
  
! (defconst gdbmi-var-update-regexp "name=\"\\(.*?\\)\",value=\"\\(.*?\\)\"")
  
  (defun gdbmi-var-update-handler ()
    (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
      (goto-char (point-min))
      (while (re-search-forward gdbmi-var-update-regexp nil t)
  	(let ((varnum (match-string 1)))
! 	  (catch 'var-found1
  	    (let ((num 0))
  	      (dolist (var gdb-var-list)
  		(if (string-equal varnum (cadr var))
  		    (progn
  		      (setcar (nthcdr 5 var) t)
! 		      (setcar (nthcdr 4 var) (match-string 2))
  		      (setcar (nthcdr num gdb-var-list) var)
! 		      (throw 'var-found1 nil)))
  		(setq num (+ num 1))))))
! 	(setq gdb-var-changed t))))
  \f
  (defun gdbmi-send (proc string)
    "A comint send filter for gdb."
--- 261,286 ----
    (gdb-enqueue-input
     (list "-var-update --all-values *\n" 'gdbmi-var-update-handler)))
  
! (defconst gdbmi-var-update-regexp "name=\"\\(.*?\\)\",value=\\(\".*\"\\),")
  
  (defun gdbmi-var-update-handler ()
    (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
      (goto-char (point-min))
      (while (re-search-forward gdbmi-var-update-regexp nil t)
  	(let ((varnum (match-string 1)))
! 	  (catch 'var-found-1
  	    (let ((num 0))
  	      (dolist (var gdb-var-list)
  		(if (string-equal varnum (cadr var))
  		    (progn
  		      (setcar (nthcdr 5 var) t)
! 		      (setcar (nthcdr 4 var) (read (match-string 2)))
  		      (setcar (nthcdr num gdb-var-list) var)
! 		      (throw 'var-found-1 nil)))
  		(setq num (+ num 1))))))
! 	(setq gdb-var-changed t)))
!   (with-current-buffer gud-comint-buffer
!     (speedbar-timer-fn)))
  \f
  (defun gdbmi-send (proc string)
    "A comint send filter for gdb."
***************
*** 454,476 ****
  
  ;; Breakpoint buffer : This displays the output of `-break-list'.
  ;;
! (def-gdb-auto-updated-buffer gdb-breakpoints-buffer
!   ;; This defines the auto update rule for buffers of type
!   ;; `gdb-breakpoints-buffer'.
!   ;;
!   ;; It defines a function that queues the command below.  That function is
!   ;; called:
!   gdbmi-invalidate-breakpoints
!   ;;
!   ;; To update the buffer, this command is sent to gdb.
    "-break-list\n"
!   ;;
!   ;; This also defines a function to be the handler for the output
!   ;; from the command above.  That function will copy the output into
!   ;; the appropriately typed buffer.  That function will be called:
!   gdb-break-list-handler
!   ;; buffer specific functions
!   gdb-break-list-custom)
  
  (defconst gdb-break-list-regexp
  "number=\"\\(.*?\\)\",type=\"\\(.*?\\)\",disp=\"\\(.*?\\)\",enabled=\"\\(.\\)\",\
--- 460,469 ----
  
  ;; Breakpoint buffer : This displays the output of `-break-list'.
  ;;
! (def-gdb-auto-update-trigger gdbmi-invalidate-breakpoints
!   (gdb-get-buffer 'gdb-breakpoints-buffer)
    "-break-list\n"
!   gdb-break-list-handler)
  
  (defconst gdb-break-list-regexp
  "number=\"\\(.*?\\)\",type=\"\\(.*?\\)\",disp=\"\\(.*?\\)\",enabled=\"\\(.\\)\",\
***************
*** 560,565 ****
--- 553,560 ----
        (end-of-line)))
    (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
  
+ (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
+ 
  (defun gdbmi-get-location (bptno line flag)
    "Find the directory containing the relevant source file.
  Put in buffer and place breakpoint icon."
***************
*** 586,596 ****
  
  ;; Frames buffer.  This displays a perpetually correct bactrack trace.
  ;;
! (def-gdb-auto-updated-buffer gdb-stack-buffer
!   gdbmi-invalidate-frames
    "-stack-list-frames\n"
!   gdb-stack-list-frames-handler
!   gdb-stack-list-frames-custom)
  
  (defconst gdb-stack-list-frames-regexp
  "level=\"\\(.*?\\)\",addr=\"\\(.*?\\)\",func=\"\\(.*?\\)\",\
--- 581,591 ----
  
  ;; Frames buffer.  This displays a perpetually correct bactrack trace.
  ;;
! (def-gdb-auto-update-trigger gdbmi-invalidate-frames
!   (gdb-get-buffer 'gdb-stack-buffer)
    "-stack-list-frames\n"
!   gdb-stack-list-frames-handler)
! 
  
  (defconst gdb-stack-list-frames-regexp
  "level=\"\\(.*?\\)\",addr=\"\\(.*?\\)\",func=\"\\(.*?\\)\",\
***************
*** 644,654 ****
  
  ;; Locals buffer.
  ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards.
! (def-gdb-auto-updated-buffer gdb-locals-buffer
!   gdbmi-invalidate-locals
    "-stack-list-locals --simple-values\n"
!   gdb-stack-list-locals-handler
!   gdb-stack-list-locals-custom)
  
  (defconst gdb-stack-list-locals-regexp
    (concat "name=\"\\(.*?\\)\",type=\"\\(.*?\\)\""))
--- 639,648 ----
  
  ;; Locals buffer.
  ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards.
! (def-gdb-auto-update-trigger gdbmi-invalidate-locals
!   (gdb-get-buffer 'gdb-locals-buffer)
    "-stack-list-locals --simple-values\n"
!   gdb-stack-list-locals-handler)
  
  (defconst gdb-stack-list-locals-regexp
    (concat "name=\"\\(.*?\\)\",type=\"\\(.*?\\)\""))
***************
*** 666,677 ****
  	(let ((local (list (match-string 1)
  			   (match-string 2)
  			   nil)))
! 	  (if (looking-at ",value=\"\\(.*?\\)\"")
! 	      (setcar (nthcdr 2 local) (match-string 1)))
  	(push local locals-list))))
      (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
        (and buf (with-current-buffer buf
! 		 (let ((p (window-point (get-buffer-window buf 0)))
  		       (buffer-read-only nil))
  		   (erase-buffer)
  		   (dolist (local locals-list)
--- 660,672 ----
  	(let ((local (list (match-string 1)
  			   (match-string 2)
  			   nil)))
! 	  (if (looking-at ",value=\\(\".*\"\\)}")
! 	      (setcar (nthcdr 2 local) (read (match-string 1))))
  	(push local locals-list))))
      (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
        (and buf (with-current-buffer buf
! 	      (let* ((window (get-buffer-window buf 0))
! 		     (p (window-point window))
  		       (buffer-read-only nil))
  		   (erase-buffer)
  		   (dolist (local locals-list)
***************
*** 682,700 ****
  				      "(structure)"
  				    "(array)"))
  			      "\n")))
! 		   (set-window-point (get-buffer-window buf 0) p)))))))
! 
! (defun gdb-stack-list-locals-custom ()
!   nil)
  
  \f
  ;; Registers buffer.
  ;;
! (def-gdb-auto-updated-buffer gdb-registers-buffer
!   gdbmi-invalidate-registers
    "-data-list-register-values x\n"
!   gdb-data-list-register-values-handler
!   gdb-data-list-register-values-custom)
  
  (defconst gdb-data-list-register-values-regexp
    "number=\"\\(.*?\\)\",value=\"\\(.*?\\)\"")
--- 677,691 ----
  				      "(structure)"
  				    "(array)"))
  			      "\n")))
! 		   (set-window-point window p)))))))
  
  \f
  ;; Registers buffer.
  ;;
! (def-gdb-auto-update-trigger gdbmi-invalidate-registers
!   (gdb-get-buffer 'gdb-registers-buffer)
    "-data-list-register-values x\n"
!   gdb-data-list-register-values-handler)
  
  (defconst gdb-data-list-register-values-regexp
    "number=\"\\(.*?\\)\",value=\"\\(.*?\\)\"")
***************
*** 731,739 ****
  		  (buffer-read-only nil))
  	      (erase-buffer)
  	      (insert register-values)
! 	      (set-window-point (get-buffer-window buf 0) p))))))))
  
! (defun gdb-data-list-register-values-custom ())
  
  (defun gdb-get-changed-registers ()
    (if (and (gdb-get-buffer 'gdb-registers-buffer)
--- 722,742 ----
  		  (buffer-read-only nil))
  	      (erase-buffer)
  	      (insert register-values)
! 	      (set-window-point (get-buffer-window buf 0) p)))))))
!   (gdb-data-list-register-values-custom))
  
! (defun gdb-data-list-register-values-custom ()
!   (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
!     (save-excursion
!       (let ((buffer-read-only nil)
! 	    bl)
! 	(goto-char (point-min))
! 	(while (< (point) (point-max))
! 	  (setq bl (line-beginning-position))
! 	  (when (looking-at "^[^\t]+")
! 	    (put-text-property bl (match-end 0)
! 			       'face font-lock-variable-name-face))
! 	  (forward-line 1))))))
  
  (defun gdb-get-changed-registers ()
    (if (and (gdb-get-buffer 'gdb-registers-buffer)
***************
*** 745,750 ****
--- 748,755 ----
  	  'gdb-get-changed-registers-handler))
  	(push 'gdb-get-changed-registers gdb-pending-triggers))))
  
+ (defconst gdb-data-list-register-names-regexp "\"\\(.*?\\)\"")
+ 
  (defun gdb-get-changed-registers-handler ()
    (setq gdb-pending-triggers
  	(delq 'gdb-get-changed-registers gdb-pending-triggers))
***************
*** 754,762 ****
      (while (re-search-forward gdb-data-list-register-names-regexp nil t)
        (push (match-string 1) gdb-changed-registers))))
  
- 
- (defconst gdb-data-list-register-names-regexp "\"\\(.*?\\)\"")
- 
  (defun gdb-get-register-names ()
    "Create a list of register names."
    (goto-char (point-min))
--- 759,764 ----
***************
*** 767,775 ****
  ;; these functions/variables may go into gdb-ui.el in the near future
  ;; (from gdb-nui.el)
  
- (defvar gdb-source-file-list nil)
- (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
- 
  (defun gdb-get-source-file ()
    "Find the source file where the program starts and display it with related
  buffers, if required."
--- 769,774 ----


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH] gdb-mi.el
@ 2005-10-27 12:10 Nick Roberts
  2005-10-27 16:54 ` Daniel Jacobowitz
  0 siblings, 1 reply; 15+ messages in thread
From: Nick Roberts @ 2005-10-27 12:10 UTC (permalink / raw)
  To: gdb-patches


OK  to commit?

Nick


2005-10-27  Nick Roberts  <nickrob@snap.net.nz>

	* mi/gdb-mi.el (gdbmi): Sync with Emacs 22.0.50



*** gdb-mi.el	19 Sep 2005 18:44:13 +1200	1.2
--- gdb-mi.el	27 Oct 2005 22:35:38 +1300	
***************
*** 187,193 ****
          gdb-find-file-unhook nil
          gdb-source-file-list nil
          gdb-last-command nil
! 	gdb-prompt-name nil)
    ;;
    (setq gdb-buffer-type 'gdbmi)
    ;;
--- 187,194 ----
          gdb-find-file-unhook nil
          gdb-source-file-list nil
          gdb-last-command nil
! 	gdb-prompt-name nil
! 	gdb-buffer-fringe-width (car (window-fringes)))
    ;;
    (setq gdb-buffer-type 'gdbmi)
    ;;


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-08-23 21:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-22 21:04 [PATCH] gdb-mi.el Nick Roberts
2006-08-22 21:32 ` Daniel Jacobowitz
2006-08-23 18:10 ` gdb-mi.el Eli Zaretskii
2006-08-25  2:24   ` gdb-mi.el Nick Roberts
  -- strict thread matches above, loose matches on Subject: below --
2006-05-14 13:28 [PATCH] gdb-mi.el Nick Roberts
2006-05-14 20:07 ` Eli Zaretskii
2006-03-25  8:19 Nick Roberts
2006-03-25 10:14 ` Eli Zaretskii
2006-02-10  4:02 Nick Roberts
2006-02-10  5:34 ` Daniel Jacobowitz
2006-02-10  6:22   ` Nick Roberts
2005-11-14 11:34 Nick Roberts
2005-11-17 10:04 ` Daniel Jacobowitz
2005-10-27 12:10 Nick Roberts
2005-10-27 16:54 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox