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

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

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

revision 1.90 by lektu, Tue Aug 30 10:54:08 2005 UTC revision 1.91 by jet, Wed Oct 5 17:20:03 2005 UTC
# Line 1337  static char *magick[] = { Line 1337  static char *magick[] = {
1337                  (setq bptno (match-string 1))                  (setq bptno (match-string 1))
1338                  (setq flag (char-after (match-beginning 2)))                  (setq flag (char-after (match-beginning 2)))
1339                  (beginning-of-line)                  (beginning-of-line)
1340                  (if (re-search-forward " in .* at\\s-+" nil t)                  (if (re-search-forward " in \\(.*\\) at\\s-+" nil t)
1341                      (progn                      (progn
1342                          (let ((buffer-read-only nil))
1343                            (add-text-properties (match-beginning 1) (match-end 1)
1344                                                 '(face font-lock-function-name-face)))
1345                        (looking-at "\\(\\S-+\\):\\([0-9]+\\)")                        (looking-at "\\(\\S-+\\):\\([0-9]+\\)")
1346                        (let ((line (match-string 2)) (buffer-read-only nil)                        (let ((line (match-string 2)) (buffer-read-only nil)
1347                              (file (match-string 1)))                              (file (match-string 1)))
# Line 1531  static char *magick[] = { Line 1534  static char *magick[] = {
1534  (defun gdb-info-frames-custom ()  (defun gdb-info-frames-custom ()
1535    (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)    (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
1536      (save-excursion      (save-excursion
1537        (let ((buffer-read-only nil))        (let ((buffer-read-only nil)
1538                bl el)
1539          (goto-char (point-min))          (goto-char (point-min))
1540          (while (< (point) (point-max))          (while (< (point) (point-max))
1541            (add-text-properties (line-beginning-position) (line-end-position)            (setq bl (line-beginning-position)
1542                    el (line-end-position))
1543              (add-text-properties bl el
1544                               '(mouse-face highlight                               '(mouse-face highlight
1545                                 help-echo "mouse-2, RET: Select frame"))                                 help-echo "mouse-2, RET: Select frame"))
1546            (beginning-of-line)            (goto-char bl)
1547            (when (and (looking-at "^#\\([0-9]+\\)")            (when (looking-at "^#\\([0-9]+\\)")
1548                       (equal (match-string 1) gdb-frame-number))              (if (equal (match-string 1) gdb-frame-number)
1549              (put-text-property (line-beginning-position) (line-end-position)                  (put-text-property bl el 'face '(:inverse-video t))
1550                                 'face '(:inverse-video t)))                (when (re-search-forward " in \\([^ ]+\\) (" el t)
1551                    (put-text-property (match-beginning 1) (match-end 1)
1552                                       'face font-lock-function-name-face)
1553                    (setq bl (match-end 0))
1554                    (while (re-search-forward "<\\([^>]+\\)>" el t)
1555                      (put-text-property (match-beginning 1) (match-end 1)
1556                                         'face font-lock-function-name-face))
1557                    (goto-char bl)
1558                    (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
1559                      (put-text-property (match-beginning 1) (match-end 1)
1560                                         'face font-lock-variable-name-face))
1561                    )))
1562            (forward-line 1))))))            (forward-line 1))))))
1563    
1564  (defun gdb-stack-buffer-name ()  (defun gdb-stack-buffer-name ()
# Line 1648  static char *magick[] = { Line 1665  static char *magick[] = {
1665      (define-key map [mouse-2] 'gdb-threads-select)      (define-key map [mouse-2] 'gdb-threads-select)
1666      map))      map))
1667    
1668    (defvar gdb-threads-font-lock-keywords
1669      '(
1670        (") +\\([^ ]+\\) ("  (1 font-lock-function-name-face))
1671        ("in \\([^ ]+\\) ("  (1 font-lock-function-name-face))
1672        ("\\(\\(\\sw\\|[_.]\\)+\\)="  (1 font-lock-variable-name-face))
1673        )
1674      "Font lock keywords used in `gdb-threads-mode'.")
1675    
1676  (defun gdb-threads-mode ()  (defun gdb-threads-mode ()
1677    "Major mode for gdb frames.    "Major mode for gdb frames.
1678    
# Line 1657  static char *magick[] = { Line 1682  static char *magick[] = {
1682    (setq mode-name "Threads")    (setq mode-name "Threads")
1683    (setq buffer-read-only t)    (setq buffer-read-only t)
1684    (use-local-map gdb-threads-mode-map)    (use-local-map gdb-threads-mode-map)
1685      (set (make-local-variable 'font-lock-defaults)
1686           '(gdb-threads-font-lock-keywords))
1687    (run-mode-hooks 'gdb-threads-mode-hook)    (run-mode-hooks 'gdb-threads-mode-hook)
1688    'gdb-invalidate-threads)    'gdb-invalidate-threads)
1689    
# Line 1702  static char *magick[] = { Line 1729  static char *magick[] = {
1729      (define-key map "q" 'kill-this-buffer)      (define-key map "q" 'kill-this-buffer)
1730       map))       map))
1731    
1732    (defvar gdb-registers-font-lock-keywords
1733      '(
1734        ("^[^ ]+" . font-lock-variable-name-face)
1735        )
1736      "Font lock keywords used in `gdb-registers-mode'.")
1737    
1738  (defun gdb-registers-mode ()  (defun gdb-registers-mode ()
1739    "Major mode for gdb registers.    "Major mode for gdb registers.
1740    
# Line 1711  static char *magick[] = { Line 1744  static char *magick[] = {
1744    (setq mode-name "Registers:")    (setq mode-name "Registers:")
1745    (setq buffer-read-only t)    (setq buffer-read-only t)
1746    (use-local-map gdb-registers-mode-map)    (use-local-map gdb-registers-mode-map)
1747      (set (make-local-variable 'font-lock-defaults)
1748           '(gdb-registers-font-lock-keywords))
1749    (run-mode-hooks 'gdb-registers-mode-hook)    (run-mode-hooks 'gdb-registers-mode-hook)
1750    (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))    (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1751        'gdb-invalidate-registers        'gdb-invalidate-registers
# Line 1955  corresponding to the mode line clicked." Line 1990  corresponding to the mode line clicked."
1990      (define-key map (vector 'header-line 'down-mouse-1) 'ignore)      (define-key map (vector 'header-line 'down-mouse-1) 'ignore)
1991      map))      map))
1992    
1993    (defvar gdb-memory-font-lock-keywords
1994      '(;; <__function.name+n>
1995        ("<\\(\\(\\sw\\|[_.]\\)+\\)\\(\\+[0-9]+\\)?>" (1 font-lock-function-name-face))
1996        )
1997      "Font lock keywords used in `gdb-memory-mode'.")
1998    
1999  (defun gdb-memory-mode ()  (defun gdb-memory-mode ()
2000    "Major mode for examining memory.    "Major mode for examining memory.
2001    
# Line 2026  corresponding to the mode line clicked." Line 2067  corresponding to the mode line clicked."
2067                         'help-echo "mouse-3: Select unit size"                         'help-echo "mouse-3: Select unit size"
2068                         'mouse-face 'mode-line-highlight                         'mouse-face 'mode-line-highlight
2069                         'local-map gdb-memory-unit-keymap))))                         'local-map gdb-memory-unit-keymap))))
2070      (set (make-local-variable 'font-lock-defaults)
2071           '(gdb-memory-font-lock-keywords))
2072    (run-mode-hooks 'gdb-memory-mode-hook)    (run-mode-hooks 'gdb-memory-mode-hook)
2073    'gdb-invalidate-memory)    'gdb-invalidate-memory)
2074    
# Line 2094  corresponding to the mode line clicked." Line 2137  corresponding to the mode line clicked."
2137      (define-key map "q" 'kill-this-buffer)      (define-key map "q" 'kill-this-buffer)
2138       map))       map))
2139    
2140    (defvar gdb-local-font-lock-keywords
2141      '(
2142        ;; var = (struct struct_tag) value
2143        ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +(\\(struct\\) \\(\\(\\sw\\|[_.]\\)+\\)"
2144          (1 font-lock-variable-name-face)
2145          (3 font-lock-keyword-face)
2146          (4 font-lock-type-face))
2147        ;; var = (type) value
2148        ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +(\\(\\(\\sw\\|[_.]\\)+\\)"
2149          (1 font-lock-variable-name-face)
2150          (3 font-lock-type-face))
2151        ;; var = val
2152        ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +[^(]"
2153          (1 font-lock-variable-name-face))
2154        )
2155      "Font lock keywords used in `gdb-local-mode'.")
2156    
2157  (defun gdb-locals-mode ()  (defun gdb-locals-mode ()
2158    "Major mode for gdb locals.    "Major mode for gdb locals.
2159    
# Line 2103  corresponding to the mode line clicked." Line 2163  corresponding to the mode line clicked."
2163    (setq mode-name (concat "Locals:" gdb-selected-frame))    (setq mode-name (concat "Locals:" gdb-selected-frame))
2164    (setq buffer-read-only t)    (setq buffer-read-only t)
2165    (use-local-map gdb-locals-mode-map)    (use-local-map gdb-locals-mode-map)
2166      (set (make-local-variable 'font-lock-defaults)
2167           '(gdb-local-font-lock-keywords))
2168    (run-mode-hooks 'gdb-locals-mode-hook)    (run-mode-hooks 'gdb-locals-mode-hook)
2169    (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))    (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
2170        'gdb-invalidate-locals        'gdb-invalidate-locals

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91

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