changeset 107196:19bad34b0d81

Accommodate change of disassemble output in GDB 7.1.
author Nick Roberts <nickrob@snap.net.nz>
date Fri, 19 Feb 2010 17:55:31 +1300
parents 3c104aea26eb
children 8b83e8b68526 6f4137affc72
files lisp/ChangeLog lisp/progmodes/gdb-ui.el
diffstat 2 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Feb 18 18:36:10 2010 -0800
+++ b/lisp/ChangeLog	Fri Feb 19 17:55:31 2010 +1300
@@ -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
--- a/lisp/progmodes/gdb-ui.el	Thu Feb 18 18:36:10 2010 -0800
+++ b/lisp/progmodes/gdb-ui.el	Fri Feb 19 17:55:31 2010 +1300
@@ -3573,18 +3573,24 @@
   (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))