[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el |
Date: |
Tue, 26 Apr 2005 17:25:55 -0400 |
Index: emacs/lisp/progmodes/gdb-ui.el
diff -c emacs/lisp/progmodes/gdb-ui.el:1.60 emacs/lisp/progmodes/gdb-ui.el:1.61
*** emacs/lisp/progmodes/gdb-ui.el:1.60 Tue Apr 12 03:10:25 2005
--- emacs/lisp/progmodes/gdb-ui.el Tue Apr 26 21:25:55 2005
***************
*** 79,85 ****
(defvar gdb-overlay-arrow-position nil)
(defvar gdb-server-prefix nil)
(defvar gdb-flush-pending-output nil)
! (defvar gdb-location-list nil "Alist of breakpoint numbers and full
filenames.")
(defvar gdb-find-file-unhook nil)
(defvar gdb-buffer-type nil
--- 79,86 ----
(defvar gdb-overlay-arrow-position nil)
(defvar gdb-server-prefix nil)
(defvar gdb-flush-pending-output nil)
! (defvar gdb-location-alist nil
! "Alist of breakpoint numbers and full filenames.")
(defvar gdb-find-file-unhook nil)
(defvar gdb-buffer-type nil
***************
*** 281,287 ****
(setq gdb-output-sink 'user)
(setq gdb-server-prefix "server ")
(setq gdb-flush-pending-output nil)
! (setq gdb-location-list nil)
(setq gdb-find-file-unhook nil)
;;
(setq gdb-buffer-type 'gdba)
--- 282,288 ----
(setq gdb-output-sink 'user)
(setq gdb-server-prefix "server ")
(setq gdb-flush-pending-output nil)
! (setq gdb-location-alist nil)
(setq gdb-find-file-unhook nil)
;;
(setq gdb-buffer-type 'gdba)
***************
*** 301,307 ****
(run-hooks 'gdba-mode-hook))
(defcustom gdb-use-colon-colon-notation nil
! "If non-nil use FUN::VAR format to display variables in the speedbar." ;
:type 'boolean
:group 'gud
:version "22.1")
--- 302,308 ----
(run-hooks 'gdba-mode-hook))
(defcustom gdb-use-colon-colon-notation nil
! "If non-nil use FUN::VAR format to display variables in the speedbar."
:type 'boolean
:group 'gud
:version "22.1")
***************
*** 430,436 ****
(let ((varnum (match-string 1)))
(gdb-enqueue-input
(list
! (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode
'gdba))
(concat "server interpreter mi \"-var-evaluate-expression "
varnum "\"\n")
(concat "-var-evaluate-expression " varnum "\n"))
--- 431,438 ----
(let ((varnum (match-string 1)))
(gdb-enqueue-input
(list
! (if (with-current-buffer gud-comint-buffer
! (eq gud-minor-mode 'gdba))
(concat "server interpreter mi \"-var-evaluate-expression "
varnum "\"\n")
(concat "-var-evaluate-expression " varnum "\n"))
***************
*** 482,488 ****
(list
(if (with-current-buffer gud-comint-buffer
(eq gud-minor-mode 'gdba))
! (concat "server interpreter mi \"-var-assign " varnum " " value
"\"\n")
(concat "-var-assign " varnum " " value "\n"))
'ignore))))
--- 484,491 ----
(list
(if (with-current-buffer gud-comint-buffer
(eq gud-minor-mode 'gdba))
! (concat "server interpreter mi \"-var-assign "
! varnum " " value "\"\n")
(concat "-var-assign " varnum " " value "\n"))
'ignore))))
***************
*** 981,987 ****
(match-beginning 0))))
;;
;; Everything after, we save, to combine with later input.
! (setq gud-marker-acc (substring gud-marker-acc (match-beginning
0))))
;;
;; In case we know the gud-marker-acc contains no partial annotations:
(progn
--- 984,991 ----
(match-beginning 0))))
;;
;; Everything after, we save, to combine with later input.
! (setq gud-marker-acc (substring gud-marker-acc
! (match-beginning 0))))
;;
;; In case we know the gud-marker-acc contains no partial annotations:
(progn
***************
*** 1045,1051 ****
;; annotation rule binding of whatever gdb sends to tell us this command
;; might have changed it's output.
;;
! ;; NAME is the function name. DEMAND-PREDICATE tests if output is really
needed.
;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to
the
;; input in the input queue (see comment about ``gdb communications'' above).
--- 1049,1055 ----
;; annotation rule binding of whatever gdb sends to tell us this command
;; might have changed it's output.
;;
! ;; NAME is the function name. DEMAND-PREDICATE tests if output is really
needed.
;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to
the
;; input in the input queue (see comment about ``gdb communications'' above).
***************
*** 1077,1084 ****
;; put customisation here
(,custom-defun)))
! (defmacro def-gdb-auto-updated-buffer (buffer-key trigger-name gdb-command
! output-handler-name
custom-defun)
`(progn
(def-gdb-auto-update-trigger ,trigger-name
;; The demand predicate:
--- 1081,1089 ----
;; put customisation here
(,custom-defun)))
! (defmacro def-gdb-auto-updated-buffer (buffer-key
! trigger-name gdb-command
! output-handler-name custom-defun)
`(progn
(def-gdb-auto-update-trigger ,trigger-name
;; The demand predicate:
***************
*** 1225,1231 ****
'(mouse-face highlight
help-echo "mouse-2, RET: visit breakpoint"))
(unless (file-exists-p file)
! (setq file (cdr (assoc bptno gdb-location-list))))
(unless (string-equal file "File not found")
(if file
(with-current-buffer (find-file-noselect file)
--- 1230,1236 ----
'(mouse-face highlight
help-echo "mouse-2, RET: visit breakpoint"))
(unless (file-exists-p file)
! (setq file (cdr (assoc bptno gdb-location-alist))))
(unless (string-equal file "File not found")
(if file
(with-current-buffer (find-file-noselect file)
***************
*** 1233,1245 ****
'gdba)
(set (make-local-variable 'tool-bar-map)
gud-tool-bar-map)
! ;; only want one breakpoint icon at each
location
(save-excursion
(goto-line (string-to-number line))
(gdb-put-breakpoint-icon (eq flag ?y) bptno)))
(gdb-enqueue-input
! (list (concat "list "
! (match-string-no-properties 1)
":1\n")
'ignore))
(gdb-enqueue-input
(list "info source\n"
--- 1238,1252 ----
'gdba)
(set (make-local-variable 'tool-bar-map)
gud-tool-bar-map)
! ;; only want one breakpoint icon at each
! ;; location
(save-excursion
(goto-line (string-to-number line))
(gdb-put-breakpoint-icon (eq flag ?y) bptno)))
(gdb-enqueue-input
! (list
! (concat "list "
! (match-string-no-properties 1) ":1\n")
'ignore))
(gdb-enqueue-input
(list "info source\n"
***************
*** 1351,1357 ****
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
(looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
(looking-at
!
"\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
(gdb-enqueue-input
(list
(concat gdb-server-prefix
--- 1358,1364 ----
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
(looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
(looking-at
!
"\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
(gdb-enqueue-input
(list
(concat gdb-server-prefix
***************
*** 1383,1396 ****
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
(looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
(looking-at
!
"\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)"))
(let ((bptno (match-string 1))
(file (match-string 2))
(line (match-string 3)))
(save-selected-window
(let* ((buf (find-file-noselect
(if (file-exists-p file) file
! (cdr (assoc bptno gdb-location-list)))))
(window (display-buffer buf)))
(with-current-buffer buf
(goto-line (string-to-number line))
--- 1390,1404 ----
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
(looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
(looking-at
! "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\
! \\(\\S-*\\):\\([0-9]+\\)"))
(let ((bptno (match-string 1))
(file (match-string 2))
(line (match-string 3)))
(save-selected-window
(let* ((buf (find-file-noselect
(if (file-exists-p file) file
! (cdr (assoc bptno gdb-location-alist)))))
(window (display-buffer buf)))
(with-current-buffer buf
(goto-line (string-to-number line))
***************
*** 1481,1487 ****
(interactive (list last-input-event))
(if event (mouse-set-point event))
(gdb-enqueue-input
! (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n")
'ignore))
(gud-display-frame))
--- 1489,1496 ----
(interactive (list last-input-event))
(if event (mouse-set-point event))
(gdb-enqueue-input
! (list (concat gdb-server-prefix "frame "
! (gdb-get-frame-number) "\n") 'ignore))
(gud-display-frame))
***************
*** 1987,1993 ****
:enable gdb-use-inferior-io-buffer))
(define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
(define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
! (define-key menu [breakpoints] '("Breakpoints" .
gdb-display-breakpoints-buffer)))
(let ((menu (make-sparse-keymap "GDB-Frames")))
(define-key gud-menu-map [frames]
--- 1996,2003 ----
:enable gdb-use-inferior-io-buffer))
(define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
(define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
! (define-key menu [breakpoints]
! '("Breakpoints" . gdb-display-breakpoints-buffer)))
(let ((menu (make-sparse-keymap "GDB-Frames")))
(define-key gud-menu-map [frames]
***************
*** 2002,2008 ****
:enable gdb-use-inferior-io-buffer))
(define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))
(define-key menu [frames] '("Stack" . gdb-frame-stack-buffer))
! (define-key menu [breakpoints] '("Breakpoints" .
gdb-frame-breakpoints-buffer)))
(let ((menu (make-sparse-keymap "GDB-UI")))
(define-key gud-menu-map [ui]
--- 2012,2019 ----
:enable gdb-use-inferior-io-buffer))
(define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))
(define-key menu [frames] '("Stack" . gdb-frame-stack-buffer))
! (define-key menu [breakpoints]
! '("Breakpoints" . gdb-frame-breakpoints-buffer)))
(let ((menu (make-sparse-keymap "GDB-UI")))
(define-key gud-menu-map [ui]
***************
*** 2157,2165 ****
(catch 'file-not-found
(if (search-forward "Located in " nil t)
(if (looking-at "\\S-*")
! (push (cons bptno (match-string 0)) gdb-location-list))
(gdb-resync)
! (push (cons bptno "File not found") gdb-location-list)
(message-box "Cannot find source file for breakpoint location.\n\
Add directory to search path for source files using the GDB command, dir.")
(throw 'file-not-found nil))
--- 2168,2176 ----
(catch 'file-not-found
(if (search-forward "Located in " nil t)
(if (looking-at "\\S-*")
! (push (cons bptno (match-string 0)) gdb-location-alist))
(gdb-resync)
! (push (cons bptno "File not found") gdb-location-alist)
(message-box "Cannot find source file for breakpoint location.\n\
Add directory to search path for source files using the GDB command, dir.")
(throw 'file-not-found nil))
***************
*** 2214,2220 ****
(unless buffer
(setq buffer (current-buffer)))
(dolist (overlay (overlays-in start end))
! (when (overlay-get overlay 'put-break)
(delete-overlay overlay))))
(defun gdb-put-breakpoint-icon (enabled bptno)
--- 2225,2231 ----
(unless buffer
(setq buffer (current-buffer)))
(dolist (overlay (overlays-in start end))
! (when (overlay-get overlay 'put-break)
(delete-overlay overlay))))
(defun gdb-put-breakpoint-icon (enabled bptno)
***************
*** 2416,2422 ****
(setq gdb-input-queue
(delete item gdb-input-queue))))))
(gdb-enqueue-input
! (list (concat gdb-server-prefix "disassemble " gdb-current-address
"\n")
'gdb-assembler-handler))
(push 'gdb-invalidate-assembler gdb-pending-triggers)
(setq gdb-previous-address gdb-current-address)
--- 2427,2434 ----
(setq gdb-input-queue
(delete item gdb-input-queue))))))
(gdb-enqueue-input
! (list (concat gdb-server-prefix "disassemble "
! gdb-current-address "\n")
'gdb-assembler-handler))
(push 'gdb-invalidate-assembler gdb-pending-triggers)
(setq gdb-previous-address gdb-current-address)