]> git.eshelyaron.com Git - emacs.git/commitdiff
Accommodate change of disassemble output in GDB 7.1.
authorNick Roberts <nickrob@snap.net.nz>
Fri, 19 Feb 2010 04:55:31 +0000 (17:55 +1300)
committerNick Roberts <nickrob@snap.net.nz>
Fri, 19 Feb 2010 04:55:31 +0000 (17:55 +1300)
lisp/ChangeLog
lisp/progmodes/gdb-ui.el

index 78034242ba4250e412a03778d34309e69d80eba1..cc6082716c3a1ed5e88ab66098b4e8f5a698c61e 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-19  Nick Roberts  <nickrob@snap.net.nz>
+
+       * progmodes/gdb-ui.el (gdb-assembler-handler): Accommodate change
+       of disassemble output in GDB 7.1.
+
 2010-02-19  Glenn Morris  <rgm@gnu.org>
 
        * progmodes/f90.el (f90-electric-insert): Give it a delete-selection
index 4be5cc4511e7f73c5723b1cfe2f34b08757ea65c..9c4f8b4dd5817c00fc861c697f67811317ba125a 100644 (file)
@@ -3573,18 +3573,24 @@ BUFFER nil or omitted means use the current buffer."
   (setq gdb-pending-triggers
        (delq 'gdb-invalidate-assembler
              gdb-pending-triggers))
-     (let ((buf (gdb-get-buffer 'gdb-assembler-buffer)))
-       (and buf
-           (with-current-buffer buf
-             (let* ((window (get-buffer-window buf 0))
-                    (p (window-point window))
-                   (buffer-read-only nil))
-               (erase-buffer)
-               (insert-buffer-substring (gdb-get-buffer-create
+  (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
+    (with-current-buffer buf
+      (goto-char (point-min))
+      ;; The disassemble command in GDB 7.1 onwards displays an overlay arrow.
+      (while (re-search-forward "\\(^   0x\\|=> 0x\\)" nil t)
+       (replace-match "0x" nil nil))))
+  (let ((buf (gdb-get-buffer 'gdb-assembler-buffer)))
+    (and buf
+        (with-current-buffer buf
+          (let* ((window (get-buffer-window buf 0))
+                 (p (window-point window))
+                 (buffer-read-only nil))
+            (erase-buffer)
+            (insert-buffer-substring (gdb-get-buffer-create
                                          'gdb-partial-output-buffer))
-               (set-window-point window p)))))
-     ;; put customisation here
-     (gdb-assembler-custom))
+            (set-window-point window p)))))
+  ;; put customisation here
+  (gdb-assembler-custom))
 
 (defun gdb-assembler-custom ()
   (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))