changeset 69609:eba3995e301f

(hollow-right-triangle): Define as fringe bitmap. (gdb-info-stack-custom): Rename from gdb-info-frames-custom and change names in macro above for consistency. (gdb-frame-handler): Use hollow-right-triangle for all selected frames which except the innermost (where execution has stopped). (gdb-reset): Reset buffer-local values of overlay-arrow.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 21 Mar 2006 10:16:34 +0000
parents 0c54773776e4
children 2fde6329f77d
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 26 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Tue Mar 21 10:15:39 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Tue Mar 21 10:16:34 2006 +0000
@@ -1661,10 +1661,13 @@
 (defvar breakpoint-disabled-icon nil
   "Icon for disabled breakpoint in display margin.")
 
-;; Bitmap for breakpoint in fringe
 (and (display-images-p)
+     ;; Bitmap for breakpoint in fringe
      (define-fringe-bitmap 'breakpoint
-       "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
+       "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
+     ;; Bitmap for gud-overlay-arrow in fringe
+     (define-fringe-bitmap 'hollow-right-triangle
+       "\xe0\x90\x88\x84\x84\x88\x90\xe0"))
 
 (defface breakpoint-enabled
   '((t
@@ -1920,11 +1923,11 @@
 
 (def-gdb-auto-updated-buffer gdb-stack-buffer
   gdb-invalidate-frames
-  "server where\n"
-  gdb-info-frames-handler
-  gdb-info-frames-custom)
-
-(defun gdb-info-frames-custom ()
+  "server info stack\n"
+  gdb-info-stack-handler
+  gdb-info-stack-custom)
+
+(defun gdb-info-stack-custom ()
   (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
     (save-excursion
       (let ((buffer-read-only nil)
@@ -1985,7 +1988,7 @@
     map))
 
 (defun gdb-frames-mode ()
-  "Major mode for gdb frames.
+  "Major mode for gdb call stack.
 
 \\{gdb-frames-mode-map}"
   (kill-all-local-variables)
@@ -2066,15 +2069,13 @@
     map))
 
 (defvar gdb-threads-font-lock-keywords
-  '(
-    (") +\\([^ ]+\\) ("  (1 font-lock-function-name-face))
+  '((") +\\([^ ]+\\) ("  (1 font-lock-function-name-face))
     ("in \\([^ ]+\\) ("  (1 font-lock-function-name-face))
-    ("\\(\\(\\sw\\|[_.]\\)+\\)="  (1 font-lock-variable-name-face))
-    )
+    ("\\(\\(\\sw\\|[_.]\\)+\\)="  (1 font-lock-variable-name-face)))
   "Font lock keywords used in `gdb-threads-mode'.")
 
 (defun gdb-threads-mode ()
-  "Major mode for gdb frames.
+  "Major mode for gdb threads.
 
 \\{gdb-threads-mode-map}"
   (kill-all-local-variables)
@@ -2787,6 +2788,7 @@
     (setq gdb-overlay-arrow-position nil))
   (setq overlay-arrow-variable-list
 	(delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
+  (setcdr (assoc 'overlay-arrow fringe-indicator-alist)	'right-triangle)
   (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
       (speedbar-refresh))
   (setq gud-running nil)
@@ -3112,6 +3114,17 @@
   (goto-char (point-min))
   (if (re-search-forward  "Stack level \\([0-9]+\\)" nil t)
       (setq gdb-frame-number (match-string 1)))
+  (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
+	    (setcdr (assoc 'overlay-arrow fringe-indicator-alist)
+		    (if (string-equal gdb-frame-number "0")
+			'right-triangle
+		      'hollow-right-triangle))
+	    (setq gud-overlay-arrow-position (make-marker))
+	    (set-marker gud-overlay-arrow-position position)))))
   (goto-char (point-min))
   (if (re-search-forward
        ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t)