From: Nick Roberts Date: Fri, 19 Feb 2010 04:55:31 +0000 (+1300) Subject: Accommodate change of disassemble output in GDB 7.1. X-Git-Tag: emacs-pretest-23.1.93~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8cfae03d196c6510d4b15dce542723548825b73b;p=emacs.git Accommodate change of disassemble output in GDB 7.1. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 78034242ba4..cc6082716c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-02-19 Nick Roberts + + * progmodes/gdb-ui.el (gdb-assembler-handler): Accommodate change + of disassemble output in GDB 7.1. + 2010-02-19 Glenn Morris * progmodes/f90.el (f90-electric-insert): Give it a delete-selection diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 4be5cc4511e..9c4f8b4dd58 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -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))