diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2010-02-19 17:55:31 +1300 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2010-02-19 17:55:31 +1300 |
commit | 8cfae03d196c6510d4b15dce542723548825b73b (patch) | |
tree | ef8e424f1b2cf18394a17f8e1e09a1b78462c3bf /lisp/progmodes | |
parent | 055e4eea01be417b49ce8156cf3b9a87bef99c25 (diff) | |
download | emacs-8cfae03d196c6510d4b15dce542723548825b73b.tar.gz |
Accommodate change of disassemble output in GDB 7.1.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/gdb-ui.el | 28 |
1 files changed, 17 insertions, 11 deletions
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)) |