/[emacs]/emacs/lisp/gdb-ui.el
ViewVC logotype

Diff of /emacs/lisp/gdb-ui.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by nickrob, Sat May 17 10:17:57 2003 UTC revision 1.30 by nickrob, Sun May 18 22:19:17 2003 UTC
# Line 149  The following interactive lisp functions Line 149  The following interactive lisp functions
149                            (beginning-of-line)                            (beginning-of-line)
150                            (forward-char 2)                            (forward-char 2)
151                            (gud-call "until *%a" arg)))                            (gud-call "until *%a" arg)))
152             "\C-u" "Continue up to current line or address.")             "\C-u" "Continue to current line or address.")
153    
154    (setq comint-input-sender 'gdb-send)    (setq comint-input-sender 'gdb-send)
155    ;;    ;;
# Line 754  output from the current command if that Line 754  output from the current command if that
754          (progn          (progn
755            (setq char "*")            (setq char "*")
756            (setq gdb-temp-value (substring gdb-temp-value 1 nil))))            (setq gdb-temp-value (substring gdb-temp-value 1 nil))))
757      (save-excursion      (with-current-buffer gdb-expression-buffer-name
       (set-buffer gdb-expression-buffer-name)  
758        (setq gdb-expression gdb-temp-value)        (setq gdb-expression gdb-temp-value)
759        (if (not (string-match "::" gdb-expression))        (if (not (string-match "::" gdb-expression))
760            (setq gdb-expression (concat char gdb-current-frame            (setq gdb-expression (concat char gdb-current-frame
# Line 768  output from the current command if that Line 767  output from the current command if that
767    ;;-if scalar/string    ;;-if scalar/string
768    (if (not (re-search-forward "##" nil t))    (if (not (re-search-forward "##" nil t))
769        (progn        (progn
770          (save-excursion          (with-current-buffer gdb-expression-buffer-name
           (set-buffer gdb-expression-buffer-name)  
771            (let ((buffer-read-only nil))            (let ((buffer-read-only nil))
772              (delete-region (point-min) (point-max))              (delete-region (point-min) (point-max))
773              (insert-buffer-substring              (insert-buffer-substring
# Line 778  output from the current command if that Line 776  output from the current command if that
776      (goto-char (point-min))      (goto-char (point-min))
777      (let ((start (progn (point)))      (let ((start (progn (point)))
778            (end (progn (end-of-line) (point))))            (end (progn (end-of-line) (point))))
779        (save-excursion        (with-current-buffer gdb-expression-buffer-name
         (set-buffer gdb-expression-buffer-name)  
780          (setq buffer-read-only nil)          (setq buffer-read-only nil)
781          (delete-region (point-min) (point-max))          (delete-region (point-min) (point-max))
782          (insert-buffer-substring (gdb-get-buffer          (insert-buffer-substring (gdb-get-buffer
# Line 798  output from the current command if that Line 795  output from the current command if that
795          (progn          (progn
796            (setq gdb-annotation-arg (match-string 1))            (setq gdb-annotation-arg (match-string 1))
797            (gdb-field-format-begin))))            (gdb-field-format-begin))))
798    (save-excursion    (with-current-buffer gdb-expression-buffer-name
     (set-buffer gdb-expression-buffer-name)  
799      (if gdb-dive-display-number      (if gdb-dive-display-number
800          (progn          (progn
801            (let ((buffer-read-only nil))            (let ((buffer-read-only nil))
# Line 830  output from the current command if that Line 826  output from the current command if that
826  (defun gdb-array-section-begin (args)  (defun gdb-array-section-begin (args)
827    (if gdb-display-in-progress    (if gdb-display-in-progress
828        (progn        (progn
829          (save-excursion          (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
           (set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))  
830            (goto-char (point-max))            (goto-char (point-max))
831            (insert (concat "\n##array-section-begin " args "\n"))))))            (insert (concat "\n##array-section-begin " args "\n"))))))
832    
833  (defun gdb-array-section-end (ignored)  (defun gdb-array-section-end (ignored)
834    (if gdb-display-in-progress    (if gdb-display-in-progress
835        (progn        (progn
836          (save-excursion          (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
           (set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))  
837            (goto-char (point-max))            (goto-char (point-max))
838            (insert "\n##array-section-end\n")))))            (insert "\n##array-section-end\n")))))
839    
840  (defun gdb-field-begin (args)  (defun gdb-field-begin (args)
841    (if gdb-display-in-progress    (if gdb-display-in-progress
842        (progn        (progn
843          (save-excursion          (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
           (set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))  
844            (goto-char (point-max))            (goto-char (point-max))
845            (insert (concat "\n##field-begin " args "\n"))))))            (insert (concat "\n##field-begin " args "\n"))))))
846    
847  (defun gdb-field-end (ignored)  (defun gdb-field-end (ignored)
848    (if gdb-display-in-progress    (if gdb-display-in-progress
849        (progn        (progn
850          (save-excursion          (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
           (set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))  
851            (goto-char (point-max))            (goto-char (point-max))
852            (insert "\n##field-end\n")))))            (insert "\n##field-end\n")))))
853    
# Line 934  output from the current command if that Line 926  output from the current command if that
926    (let ((start (progn (point)))    (let ((start (progn (point)))
927          (end (progn (next-line) (point)))          (end (progn (next-line) (point)))
928          (num 0))          (num 0))
929      (save-excursion      (with-current-buffer gdb-expression-buffer-name
       (set-buffer gdb-expression-buffer-name)  
930        (let ((buffer-read-only nil))        (let ((buffer-read-only nil))
931          (if (string-equal gdb-annotation-arg "\*") (insert "\*"))          (if (string-equal gdb-annotation-arg "\*") (insert "\*"))
932          (while (<= num gdb-nesting-level)          (while (<= num gdb-nesting-level)
# Line 966  output from the current command if that Line 957  output from the current command if that
957          (if (eq gdb-nesting-level 0)          (if (eq gdb-nesting-level 0)
958              (progn              (progn
959                (let ((values (buffer-substring gdb-point (- (point) 2))))                (let ((values (buffer-substring gdb-point (- (point) 2))))
960                  (save-excursion                  (with-current-buffer gdb-expression-buffer-name
                   (set-buffer gdb-expression-buffer-name)  
961                    (setq gdb-values                    (setq gdb-values
962                          (concat "{" (replace-regexp-in-string "\n" "" values)                          (concat "{" (replace-regexp-in-string "\n" "" values)
963                                  "}"))                                  "}"))
# Line 1149  output from the current command if that Line 1139  output from the current command if that
1139       (t (error "Bogon output sink %S" sink)))))       (t (error "Bogon output sink %S" sink)))))
1140    
1141  (defun gdb-append-to-partial-output (string)  (defun gdb-append-to-partial-output (string)
1142    (save-excursion    (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
     (set-buffer  
      (gdb-get-create-buffer 'gdb-partial-output-buffer))  
1143      (goto-char (point-max))      (goto-char (point-max))
1144      (insert string)))      (insert string)))
1145    
1146  (defun gdb-clear-partial-output ()  (defun gdb-clear-partial-output ()
1147    (save-excursion    (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
     (set-buffer  
      (gdb-get-create-buffer 'gdb-partial-output-buffer))  
1148      (delete-region (point-min) (point-max))))      (delete-region (point-min) (point-max))))
1149    
1150  (defun gdb-append-to-inferior-io (string)  (defun gdb-append-to-inferior-io (string)
1151    (save-excursion    (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io)
     (set-buffer  
      (gdb-get-create-buffer 'gdb-inferior-io))  
1152      (goto-char (point-max))      (goto-char (point-max))
1153      (insert-before-markers string))      (insert-before-markers string))
1154    (if (not (string-equal string ""))    (if (not (string-equal string ""))
# Line 1172  output from the current command if that Line 1156  output from the current command if that
1156          (gdb-display-buffer (gdb-get-create-buffer 'gdb-inferior-io)))))          (gdb-display-buffer (gdb-get-create-buffer 'gdb-inferior-io)))))
1157    
1158  (defun gdb-clear-inferior-io ()  (defun gdb-clear-inferior-io ()
1159    (save-excursion    (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io)
     (set-buffer  
      (gdb-get-create-buffer 'gdb-inferior-io))  
1160      (delete-region (point-min) (point-max))))      (delete-region (point-min) (point-max))))
1161    
1162    
# Line 1222  output from the current command if that Line 1204  output from the current command if that
1204              (gdb-get-pending-triggers)))              (gdb-get-pending-triggers)))
1205       (let ((buf (gdb-get-buffer ',buf-key)))       (let ((buf (gdb-get-buffer ',buf-key)))
1206         (and buf         (and buf
1207              (save-excursion              (with-current-buffer buf
               (set-buffer buf)  
1208                (let ((p (point))                (let ((p (point))
1209                      (buffer-read-only nil))                      (buffer-read-only nil))
1210                  (delete-region (point-min) (point-max))                  (delete-region (point-min) (point-max))
# Line 1344  static char *magick[] = { Line 1325  static char *magick[] = {
1325      ;;      ;;
1326      ;; remove all breakpoint-icons in source buffers but not assembler buffer      ;; remove all breakpoint-icons in source buffers but not assembler buffer
1327      (dolist (buffer (buffer-list))      (dolist (buffer (buffer-list))
1328        (save-excursion        (with-current-buffer buffer
         (set-buffer buffer)  
1329          (if (and (eq gud-minor-mode 'gdba)          (if (and (eq gud-minor-mode 'gdba)
1330                   (not (string-match "^\*" (buffer-name))))                   (not (string-match "^\*" (buffer-name))))
1331              (if (display-graphic-p)              (if (display-graphic-p)
1332                  (remove-images (point-min) (point-max))                  (remove-images (point-min) (point-max))
1333                (remove-strings (point-min) (point-max))))))                (gdb-remove-strings (point-min) (point-max))))))
1334      (save-excursion      (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
       (set-buffer (gdb-get-buffer 'gdb-breakpoints-buffer))  
1335        (save-excursion        (save-excursion
1336          (goto-char (point-min))          (goto-char (point-min))
1337          (while (< (point) (- (point-max) 1))          (while (< (point) (- (point-max) 1))
# Line 1370  static char *magick[] = { Line 1349  static char *magick[] = {
1349                          (put-text-property (progn (beginning-of-line) (point))                          (put-text-property (progn (beginning-of-line) (point))
1350                                             (progn (end-of-line) (point))                                             (progn (end-of-line) (point))
1351                                             'mouse-face 'highlight)                                             'mouse-face 'highlight)
1352                          (save-excursion                          (with-current-buffer
1353                            (set-buffer                              (find-file-noselect
1354                             (find-file-noselect                               (if (file-exists-p file) file
1355                              (if (file-exists-p file) file                                 (expand-file-name file gdb-cdir)))
                               (expand-file-name file gdb-cdir))))  
1356                            (save-current-buffer                            (save-current-buffer
1357                              (set (make-local-variable 'gud-minor-mode) 'gdba)                              (set (make-local-variable 'gud-minor-mode) 'gdba)
1358                              (set (make-local-variable 'tool-bar-map)                              (set (make-local-variable 'tool-bar-map)
# Line 1402  static char *magick[] = { Line 1380  static char *magick[] = {
1380                                        (put-image breakpoint-disabled-icon (point)                                        (put-image breakpoint-disabled-icon (point)
1381                                                   "breakpoint icon disabled"                                                   "breakpoint icon disabled"
1382                                                   'left-margin)))                                                   'left-margin)))
1383                                  (remove-strings start end)                                  (gdb-remove-strings start end)
1384                                  (if (eq ?y flag)                                  (if (eq ?y flag)
1385                                      (put-string "B" (point) "enabled"                                      (put-string "B" (point))
1386                                                  'left-margin)                                    (put-string "b" (point))))))))))))
                                   (put-string "b" (point) "disabled"  
                                               'left-margin)))))))))))  
1387            (end-of-line))))))            (end-of-line))))))
1388    
1389  (defun gdb-breakpoints-buffer-name ()  (defun gdb-breakpoints-buffer-name ()
# Line 1518  current line." Line 1494  current line."
1494    gdb-info-frames-custom)    gdb-info-frames-custom)
1495    
1496  (defun gdb-info-frames-custom ()  (defun gdb-info-frames-custom ()
1497    (save-excursion    (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
     (set-buffer (gdb-get-buffer 'gdb-stack-buffer))  
1498      (save-excursion      (save-excursion
1499        (let ((buffer-read-only nil))        (let ((buffer-read-only nil))
1500          (goto-char (point-min))          (goto-char (point-min))
# Line 1605  the source buffer." Line 1580  the source buffer."
1580    gdb-info-threads-custom)    gdb-info-threads-custom)
1581    
1582  (defun gdb-info-threads-custom ()  (defun gdb-info-threads-custom ()
1583    (save-excursion    (with-current-buffer (gdb-get-buffer 'gdb-threads-buffer)
     (set-buffer (gdb-get-buffer 'gdb-threads-buffer))  
1584      (let ((buffer-read-only nil))      (let ((buffer-read-only nil))
1585        (goto-char (point-min))        (goto-char (point-min))
1586        (while (< (point) (point-max))        (while (< (point) (point-max))
# Line 1730  the source buffer." Line 1704  the source buffer."
1704    (gdb-set-pending-triggers (delq 'gdb-invalidate-locals    (gdb-set-pending-triggers (delq 'gdb-invalidate-locals
1705                                    (gdb-get-pending-triggers)))                                    (gdb-get-pending-triggers)))
1706    (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))    (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
1707      (save-excursion      (with-current-buffer buf
       (set-buffer buf)  
1708        (goto-char (point-min))        (goto-char (point-min))
1709        (while (re-search-forward "^ .*\n" nil t)        (while (re-search-forward "^ .*\n" nil t)
1710          (replace-match "" nil nil))          (replace-match "" nil nil))
# Line 1742  the source buffer." Line 1715  the source buffer."
1715        (while (re-search-forward "{.*=.*\n" nil t)        (while (re-search-forward "{.*=.*\n" nil t)
1716          (replace-match "(structure);\n" nil nil))))          (replace-match "(structure);\n" nil nil))))
1717    (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))    (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
1718      (and buf (save-excursion      (and buf (with-current-buffer buf
                (set-buffer buf)  
1719                 (let ((p (point))                 (let ((p (point))
1720                       (buffer-read-only nil))                       (buffer-read-only nil))
1721                   (delete-region (point-min) (point-max))                   (delete-region (point-min) (point-max))
# Line 1800  the source buffer." Line 1772  the source buffer."
1772    
1773  (defun gdb-info-display-custom ()  (defun gdb-info-display-custom ()
1774    (let ((display-list nil))    (let ((display-list nil))
1775      (save-excursion      (with-current-buffer (gdb-get-buffer 'gdb-display-buffer)
       (set-buffer (gdb-get-buffer 'gdb-display-buffer))  
1776        (goto-char (point-min))        (goto-char (point-min))
1777        (while (< (point) (- (point-max) 1))        (while (< (point) (- (point-max) 1))
1778          (forward-line 1)          (forward-line 1)
# Line 1887  the source buffer." Line 1858  the source buffer."
1858  (defun gdb-delete-display ()  (defun gdb-delete-display ()
1859    "Delete the displayed expression at current line."    "Delete the displayed expression at current line."
1860    (interactive)    (interactive)
1861    (save-excursion    (with-current-buffer (gdb-get-buffer 'gdb-display-buffer)
     (set-buffer  
      (gdb-get-buffer 'gdb-display-buffer))  
1862      (beginning-of-line 1)      (beginning-of-line 1)
1863      (if (not (looking-at "\\([0-9]+\\):   \\([ny]\\)"))      (if (not (looking-at "\\([0-9]+\\):   \\([ny]\\)"))
1864          (error "No expression on this line")          (error "No expression on this line")
# Line 2084  This arrangement depends on the value of Line 2053  This arrangement depends on the value of
2053                    (kill-buffer nil)                    (kill-buffer nil)
2054                  (if (display-graphic-p)                  (if (display-graphic-p)
2055                      (remove-images (point-min) (point-max))                      (remove-images (point-min) (point-max))
2056                    (remove-strings (point-min) (point-max)))                    (gdb-remove-strings (point-min) (point-max)))
2057                  (setq left-margin-width 0)                  (setq left-margin-width 0)
2058                  (setq gud-minor-mode nil)                  (setq gud-minor-mode nil)
2059                  (kill-local-variable 'tool-bar-map)                  (kill-local-variable 'tool-bar-map)
# Line 2122  buffers." Line 2091  buffers."
2091        (other-window 1))))        (other-window 1))))
2092    
2093  ;;from put-image  ;;from put-image
2094  (defun put-string (putstring pos &optional string area)  (defun gdb-put-string (putstring pos)
2095    "Put string PUTSTRING in front of POS in the current buffer.    "Put string PUTSTRING in front of POS in the current buffer.
2096  PUTSTRING is displayed by putting an overlay into the current buffer with a  PUTSTRING is displayed by putting an overlay into the current buffer with a
2097  `before-string' STRING that has a `display' property whose value is  `before-string' STRING that has a `display' property whose value is
2098  PUTSTRING.  STRING is defaulted if you omit it.  PUTSTRING."
2099  POS may be an integer or marker.    (setq string "x")
 AREA is where to display the string.  AREA nil or omitted means  
 display it in the text area, a value of `left-margin' means  
 display it in the left marginal area, a value of `right-margin'  
 means display it in the right marginal area."  
   (unless string (setq string "x"))  
2100    (let ((buffer (current-buffer)))    (let ((buffer (current-buffer)))
     (unless (or (null area) (memq area '(left-margin right-margin)))  
       (error "Invalid area %s" area))  
2101      (setq string (copy-sequence string))      (setq string (copy-sequence string))
2102      (let ((overlay (make-overlay pos pos buffer))      (let ((overlay (make-overlay pos pos buffer))
2103            (prop (if (null area) putstring (list (list 'margin area) putstring))))            (prop (list (list 'margin 'left-margin) putstring)))
2104        (put-text-property 0 (length string) 'display prop string)        (put-text-property 0 (length string) 'display prop string)
2105        (overlay-put overlay 'put-text t)        (overlay-put overlay 'put-break t)
2106        (overlay-put overlay 'before-string string))))        (overlay-put overlay 'before-string string))))
2107    
2108  ;;from remove-images  ;;from remove-images
2109  (defun remove-strings (start end &optional buffer)  (defun gdb-remove-strings (start end &optional buffer)
2110    "Remove strings between START and END in BUFFER.    "Remove strings between START and END in BUFFER.
2111  Remove only images that were put in BUFFER with calls to `put-string'.  Remove only strings that were put in BUFFER with calls to `put-string'.
2112  BUFFER nil or omitted means use the current buffer."  BUFFER nil or omitted means use the current buffer."
2113    (unless buffer    (unless buffer
2114      (setq buffer (current-buffer)))      (setq buffer (current-buffer)))
2115    (let ((overlays (overlays-in start end)))    (let ((overlays (overlays-in start end)))
2116      (while overlays      (while overlays
2117        (let ((overlay (car overlays)))        (let ((overlay (car overlays)))
2118          (when (overlay-get overlay 'put-text)          (when (overlay-get overlay 'put-break)
2119            (delete-overlay overlay)))            (delete-overlay overlay)))
2120        (setq overlays (cdr overlays)))))        (setq overlays (cdr overlays)))))
2121    
2122  (defun put-arrow (putstring pos &optional string area)  (defun gdb-put-arrow (putstring pos)
2123    "Put arrow string PUTSTRING in front of POS in the current buffer.    "Put arrow string PUTSTRING in the left margin in front of POS
2124  PUTSTRING is displayed by putting an overlay into the current buffer with a  in the current buffer.  PUTSTRING is displayed by putting an
2125  `before-string' \"gdb-arrow\" that has a `display' property whose value is  overlay into the current buffer with a `before-string'
2126  PUTSTRING. STRING is defaulted if you omit it.  \"gdb-arrow\" that has a `display' property whose value is
2127  POS may be an integer or marker.  PUTSTRING. STRING is defaulted if you omit it.  POS may be an
2128  AREA is where to display the string.  AREA nil or omitted means  integer or marker."
 display it in the text area, a value of `left-margin' means  
 display it in the left marginal area, a value of `right-margin'  
 means display it in the right marginal area."  
2129    (setq string "gdb-arrow")    (setq string "gdb-arrow")
2130    (let ((buffer (current-buffer)))    (let ((buffer (current-buffer)))
     (unless (or (null area) (memq area '(left-margin right-margin)))  
       (error "Invalid area %s" area))  
2131      (setq string (copy-sequence string))      (setq string (copy-sequence string))
2132      (let ((overlay (make-overlay pos pos buffer))      (let ((overlay (make-overlay pos pos buffer))
2133            (prop (if (null area) putstring (list (list 'margin area) putstring))))            (prop (list (list 'margin 'left-margin) putstring)))
2134        (put-text-property 0 (length string) 'display prop string)        (put-text-property 0 (length string) 'display prop string)
2135        (overlay-put overlay 'put-text t)        (overlay-put overlay 'put-arrow t)
2136        (overlay-put overlay 'before-string string))))        (overlay-put overlay 'before-string string))))
2137    
2138  (defun remove-arrow (&optional buffer)  (defun gdb-remove-arrow (&optional buffer)
2139    "Remove arrow in BUFFER.    "Remove arrow in BUFFER.
2140  Remove only images that were put in BUFFER with calls to `put-arrow'.  Remove only images that were put in BUFFER with calls to `put-arrow'.
2141  BUFFER nil or omitted means use the current buffer."  BUFFER nil or omitted means use the current buffer."
# Line 2187  BUFFER nil or omitted means use the curr Line 2144  BUFFER nil or omitted means use the curr
2144    (let ((overlays (overlays-in (point-min) (point-max))))    (let ((overlays (overlays-in (point-min) (point-max))))
2145      (while overlays      (while overlays
2146        (let ((overlay (car overlays)))        (let ((overlay (car overlays)))
2147          (when (string-equal (overlay-get overlay 'before-string) "gdb-arrow")          (when (overlay-get overlay 'put-arrow)
2148            (delete-overlay overlay)))            (delete-overlay overlay)))
2149        (setq overlays (cdr overlays)))))        (setq overlays (cdr overlays)))))
2150    
# Line 2240  BUFFER nil or omitted means use the curr Line 2197  BUFFER nil or omitted means use the curr
2197  (defun gdb-assembler-custom ()  (defun gdb-assembler-custom ()
2198    (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))    (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))
2199          (address) (flag))          (address) (flag))
2200      (save-excursion      (with-current-buffer buffer
       (set-buffer buffer)  
2201        (if (not (equal gdb-current-address "main"))        (if (not (equal gdb-current-address "main"))
2202            (progn            (progn
2203              (remove-arrow)              (gdb-remove-arrow)
2204              (goto-char (point-min))              (save-selected-window
2205              (if (re-search-forward gdb-current-address nil t)                (select-window gdb-source-window)
2206                  (progn                (goto-char (point-min))
2207                    (put-arrow "=>" (point) nil 'left-margin)                (if (re-search-forward gdb-current-address nil t)
2208                    (set-window-point gdb-source-window (point))))))                    (gdb-put-arrow "=>" (point))))))
2209        ;; remove all breakpoint-icons in assembler buffer  before updating.        ;; remove all breakpoint-icons in assembler buffer before updating.
2210        (save-excursion        (save-excursion
2211          (if (display-graphic-p)          (if (display-graphic-p)
2212              (remove-images (point-min) (point-max))              (remove-images (point-min) (point-max))
2213            (remove-strings (point-min) (point-max))))            (gdb-remove-strings (point-min) (point-max))))
2214        (set-buffer (gdb-get-buffer 'gdb-breakpoints-buffer))        (set-buffer (gdb-get-buffer 'gdb-breakpoints-buffer))
2215        (goto-char (point-min))        (goto-char (point-min))
2216        (while (< (point) (- (point-max) 1))        (while (< (point) (- (point-max) 1))
# Line 2269  BUFFER nil or omitted means use the curr Line 2225  BUFFER nil or omitted means use the curr
2225                  (if (string-match "0x0+\\(.*\\)" number)                  (if (string-match "0x0+\\(.*\\)" number)
2226                      (setq address (concat "0x" (match-string 1 address)))                      (setq address (concat "0x" (match-string 1 address)))
2227                    (setq address number)))                    (setq address number)))
2228                (save-excursion                (with-current-buffer buffer
                 (set-buffer buffer)  
2229                  (save-excursion                  (save-excursion
2230                    (goto-char (point-min))                    (goto-char (point-min))
2231                    (if (re-search-forward address nil t)                    (if (re-search-forward address nil t)
# Line 2286  BUFFER nil or omitted means use the curr Line 2241  BUFFER nil or omitted means use the curr
2241                                  (put-image breakpoint-disabled-icon (point)                                  (put-image breakpoint-disabled-icon (point)
2242                                             "breakpoint icon disabled"                                             "breakpoint icon disabled"
2243                                             'left-margin)))                                             'left-margin)))
2244                            (remove-strings start end)                            (gdb-remove-strings start end)
2245                            (if (eq ?y flag)                            (if (eq ?y flag)
2246                                (put-string "B" (point) "enabled" 'left-margin)                                (put-string "B" (point))
2247                              (put-string "b" (point) "disabled"                              (put-string "b" (point))))))))))))))
                                         'left-margin)))))))))))))  
2248    
2249  (defvar gdb-assembler-mode-map  (defvar gdb-assembler-mode-map
2250    (let ((map (make-sparse-keymap)))    (let ((map (make-sparse-keymap)))
# Line 2332  BUFFER nil or omitted means use the curr Line 2286  BUFFER nil or omitted means use the curr
2286                 (not (string-equal gdb-current-address gdb-previous-address))))                 (not (string-equal gdb-current-address gdb-previous-address))))
2287        (progn        (progn
2288          ;; take previous disassemble command off the queue          ;; take previous disassemble command off the queue
2289          (save-excursion          (with-current-buffer gud-comint-buffer
           (set-buffer gud-comint-buffer)  
2290            (let ((queue (gdb-get-idle-input-queue)) (item))            (let ((queue (gdb-get-idle-input-queue)) (item))
2291              (dolist (item queue)              (dolist (item queue)
2292                (if (equal (cdr item) '(gdb-assembler-handler))                (if (equal (cdr item) '(gdb-assembler-handler))
# Line 2359  BUFFER nil or omitted means use the curr Line 2312  BUFFER nil or omitted means use the curr
2312  (defun gdb-frame-handler ()  (defun gdb-frame-handler ()
2313    (gdb-set-pending-triggers    (gdb-set-pending-triggers
2314     (delq 'gdb-get-current-frame (gdb-get-pending-triggers)))     (delq 'gdb-get-current-frame (gdb-get-pending-triggers)))
2315    (save-excursion    (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
     (set-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer))  
2316      (goto-char (point-min))      (goto-char (point-min))
2317      (if (looking-at "^#[0-9]*\\s-*\\(\\S-*\\) in \\(\\S-*\\)")      (if (looking-at "^#[0-9]*\\s-*\\(\\S-*\\) in \\(\\S-*\\)")
2318          (progn          (progn

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26