comparison lisp/progmodes/gdb-ui.el @ 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 5df8e547a422
children 33d43eba45d4
comparison
equal deleted inserted replaced
107195:3c104aea26eb 107196:19bad34b0d81
3571 ;; window-start but keep the overlay arrow/current line visible. 3571 ;; window-start but keep the overlay arrow/current line visible.
3572 (defun gdb-assembler-handler () 3572 (defun gdb-assembler-handler ()
3573 (setq gdb-pending-triggers 3573 (setq gdb-pending-triggers
3574 (delq 'gdb-invalidate-assembler 3574 (delq 'gdb-invalidate-assembler
3575 gdb-pending-triggers)) 3575 gdb-pending-triggers))
3576 (let ((buf (gdb-get-buffer 'gdb-assembler-buffer))) 3576 (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
3577 (and buf 3577 (with-current-buffer buf
3578 (with-current-buffer buf 3578 (goto-char (point-min))
3579 (let* ((window (get-buffer-window buf 0)) 3579 ;; The disassemble command in GDB 7.1 onwards displays an overlay arrow.
3580 (p (window-point window)) 3580 (while (re-search-forward "\\(^ 0x\\|=> 0x\\)" nil t)
3581 (buffer-read-only nil)) 3581 (replace-match "0x" nil nil))))
3582 (erase-buffer) 3582 (let ((buf (gdb-get-buffer 'gdb-assembler-buffer)))
3583 (insert-buffer-substring (gdb-get-buffer-create 3583 (and buf
3584 (with-current-buffer buf
3585 (let* ((window (get-buffer-window buf 0))
3586 (p (window-point window))
3587 (buffer-read-only nil))
3588 (erase-buffer)
3589 (insert-buffer-substring (gdb-get-buffer-create
3584 'gdb-partial-output-buffer)) 3590 'gdb-partial-output-buffer))
3585 (set-window-point window p))))) 3591 (set-window-point window p)))))
3586 ;; put customisation here 3592 ;; put customisation here
3587 (gdb-assembler-custom)) 3593 (gdb-assembler-custom))
3588 3594
3589 (defun gdb-assembler-custom () 3595 (defun gdb-assembler-custom ()
3590 (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) 3596 (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))
3591 (pos 1) (address) (flag) (bptno)) 3597 (pos 1) (address) (flag) (bptno))
3592 (with-current-buffer buffer 3598 (with-current-buffer buffer