[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el
From: |
Dmitry Dzhus |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el |
Date: |
Tue, 11 Aug 2009 13:53:15 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Dmitry Dzhus <sphinx> 09/08/11 13:53:14
Modified files:
lisp : ChangeLog
lisp/progmodes : gdb-mi.el
Log message:
(gdb-line-posns): New helper which helps not to use `goto-line'.
(gdb-place-breakpoints, gdb-get-location): Rewritten without
`goto-line'.
(gdb-invalidate-disassembly): Do not refresh upon receiving
'update signal. Instead, update all disassembly buffers only after
threads list.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15918&r2=1.15919
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/gdb-mi.el?cvsroot=emacs&r1=1.32&r2=1.33
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15918
retrieving revision 1.15919
diff -u -b -r1.15918 -r1.15919
--- ChangeLog 11 Aug 2009 10:48:56 -0000 1.15918
+++ ChangeLog 11 Aug 2009 13:53:10 -0000 1.15919
@@ -1,5 +1,13 @@
2009-08-11 Dmitry Dzhus <address@hidden>
+ * progmodes/gdb-mi.el (gdb-line-posns): New helper which helps not
+ to use `goto-line'.
+ (gdb-place-breakpoints, gdb-get-location): Rewritten without
+ `goto-line'.
+ (gdb-invalidate-disassembly): Do not refresh upon receiving
+ 'update signal. Instead, update all disassembly buffers only after
+ threads list.
+
* progmodes/gud.el (gud-stop-subjob): Rewritten without macros
from `gdb-mi.el' to avoid extra tangling.
Index: progmodes/gdb-mi.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/gdb-mi.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- progmodes/gdb-mi.el 11 Aug 2009 10:49:00 -0000 1.32
+++ progmodes/gdb-mi.el 11 Aug 2009 13:53:14 -0000 1.33
@@ -1282,7 +1282,7 @@
(gdb-add-subscriber gdb-buf-publisher
(cons (current-buffer)
(gdb-bind-function-to-buffer trigger
(current-buffer))))
- (funcall trigger 'update))
+ (funcall trigger 'start))
(current-buffer))))))
(defun gdb-bind-function-to-buffer (expr buffer)
@@ -2068,6 +2068,13 @@
(with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
(gdb-json-read-buffer fix-key fix-list)))
+(defun gdb-line-posns (line)
+ "Return a pair of LINE beginning and end positions."
+ (let ((offset (1+ (- line (line-number-at-pos)))))
+ (cons
+ (line-beginning-position offset)
+ (line-end-position offset))))
+
(defmacro gdb-mark-line (line variable)
"Set VARIABLE marker to point at beginning of LINE.
@@ -2075,9 +2082,9 @@
Return position where LINE begins."
`(save-excursion
- (let* ((offset (1+ (- ,line (line-number-at-pos))))
- (start-posn (line-beginning-position offset))
- (end-posn (line-end-position offset)))
+ (let* ((posns (gdb-line-posns ,line))
+ (start-posn (car posns))
+ (end-posn (cdr posns)))
(set-marker ,variable (copy-marker start-posn))
(when (not (> (car (window-fringes)) 0))
(put-text-property start-posn end-posn
@@ -2233,7 +2240,7 @@
(def-gdb-trigger-and-handler
gdb-invalidate-breakpoints "-break-list"
gdb-breakpoints-list-handler gdb-breakpoints-list-handler-custom
- '(update))
+ '(start update))
(gdb-set-buffer-rules
'gdb-breakpoints-buffer
@@ -2303,9 +2310,8 @@
(find-file-noselect file 'nowarn)
(gdb-init-buffer)
;; Only want one breakpoint icon at each location.
- (save-excursion
- (goto-line (string-to-number line))
- (gdb-put-breakpoint-icon (string-equal flag "y") bptno)))
+ (gdb-put-breakpoint-icon (string-equal flag "y") bptno
+ (string-to-number line)))
(gdb-input
(list (concat "list " file ":1")
'ignore))
@@ -2333,9 +2339,7 @@
(with-current-buffer (find-file-noselect (match-string 1))
(gdb-init-buffer)
;; 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-put-breakpoint-icon (eq flag ?y) bptno (string-to-number line)))))
(add-hook 'find-file-hook 'gdb-find-file-hook)
@@ -2501,7 +2505,7 @@
(def-gdb-trigger-and-handler
gdb-invalidate-threads (gdb-current-context-command "-thread-info"
gud-running)
gdb-thread-list-handler gdb-thread-list-handler-custom
- '(update update-threads))
+ '(start update update-threads))
(gdb-set-buffer-rules
'gdb-threads-buffer
@@ -2763,7 +2767,7 @@
gdb-memory-columns)
gdb-read-memory-handler
gdb-read-memory-custom
- '(update))
+ '(start update))
(gdb-set-buffer-rules
'gdb-memory-buffer
@@ -3138,8 +3142,8 @@
(format "-data-disassemble -f %s -l %s -n -1 -- 0" file line)))
gdb-disassembly-handler
;; We update disassembly only after we have actual frame information
- ;; about all threads
- '(update update-disassembly))
+ ;; about all threads, so no there's `update' signal in this list
+ '(start update-disassembly))
(def-gdb-auto-update-handler
gdb-disassembly-handler
@@ -3307,7 +3311,7 @@
(def-gdb-trigger-and-handler
gdb-invalidate-frames (gdb-current-context-command "-stack-list-frames")
gdb-stack-list-frames-handler gdb-stack-list-frames-custom
- '(update))
+ '(start update))
(gdb-set-buffer-rules
'gdb-stack-buffer
@@ -3417,7 +3421,7 @@
gdb-invalidate-locals
(concat (gdb-current-context-command "-stack-list-locals") "
--simple-values")
gdb-locals-handler gdb-locals-handler-custom
- '(update))
+ '(start update))
(gdb-set-buffer-rules
'gdb-locals-buffer
@@ -3540,7 +3544,7 @@
(concat (gdb-current-context-command "-data-list-register-values") " x")
gdb-registers-handler
gdb-registers-handler-custom
- '(update))
+ '(start update))
(gdb-set-buffer-rules
'gdb-registers-buffer
@@ -4044,9 +4048,10 @@
(when (overlay-get overlay 'put-break)
(delete-overlay overlay))))
-(defun gdb-put-breakpoint-icon (enabled bptno)
- (let ((start (- (line-beginning-position) 1))
- (end (+ (line-end-position) 1))
+(defun gdb-put-breakpoint-icon (enabled bptno &optional line)
+ (let* ((posns (gdb-line-posns (or line (line-number-at-pos))))
+ (start (- (car posns) 1))
+ (end (+ (cdr posns) 1))
(putstring (if enabled "B" "b"))
(source-window (get-buffer-window (current-buffer) 0)))
(add-text-properties
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, (continued)
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/04
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/04
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/04
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/04
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/04
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/06
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/08
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/08
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/08
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/08
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el,
Dmitry Dzhus <=
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/11
- [Emacs-diffs] emacs/lisp ChangeLog progmodes/gdb-mi.el, Dmitry Dzhus, 2009/08/24