1766 |
gdb-read-memory-handler |
gdb-read-memory-handler |
1767 |
gdb-read-memory-custom) |
gdb-read-memory-custom) |
1768 |
|
|
1769 |
(defun gdb-read-memory-custom ()) |
(defun gdb-read-memory-custom () |
1770 |
|
(save-excursion |
1771 |
|
(goto-char (point-min)) |
1772 |
|
(if (looking-at "0x[[:xdigit:]]+") |
1773 |
|
(setq gdb-memory-address (match-string 0))))) |
1774 |
|
|
1775 |
(defvar gdb-memory-mode-map |
(defvar gdb-memory-mode-map |
1776 |
(let ((map (make-sparse-keymap))) |
(let ((map (make-sparse-keymap))) |
1794 |
(select-window (posn-window (event-start event))) |
(select-window (posn-window (event-start event))) |
1795 |
(let* ((arg (read-from-minibuffer "Repeat count: ")) |
(let* ((arg (read-from-minibuffer "Repeat count: ")) |
1796 |
(count (string-to-number arg))) |
(count (string-to-number arg))) |
1797 |
(if (< count 0) |
(if (<= count 0) |
1798 |
(error "Non-negative numbers only") |
(error "Positive numbers only") |
1799 |
(customize-set-variable 'gdb-memory-repeat-count count) |
(customize-set-variable 'gdb-memory-repeat-count count) |
1800 |
(gdb-invalidate-memory))))) |
(gdb-invalidate-memory))))) |
1801 |
|
|
1948 |
(setq header-line-format |
(setq header-line-format |
1949 |
'(:eval |
'(:eval |
1950 |
(concat |
(concat |
1951 |
"Read address: " |
"Read address[" |
1952 |
|
(propertize |
1953 |
|
"-" |
1954 |
|
'face font-lock-warning-face |
1955 |
|
'help-echo "mouse-1: Decrement address" |
1956 |
|
'mouse-face 'mode-line-highlight |
1957 |
|
'local-map |
1958 |
|
(gdb-make-header-line-mouse-map |
1959 |
|
'mouse-1 |
1960 |
|
#'(lambda () (interactive) |
1961 |
|
(let ((gdb-memory-address |
1962 |
|
;; let GDB do the arithmetic |
1963 |
|
(concat |
1964 |
|
gdb-memory-address " - " |
1965 |
|
(number-to-string |
1966 |
|
(* gdb-memory-repeat-count |
1967 |
|
(cond ((string= gdb-memory-unit "b") 1) |
1968 |
|
((string= gdb-memory-unit "h") 2) |
1969 |
|
((string= gdb-memory-unit "w") 4) |
1970 |
|
((string= gdb-memory-unit "g") 8))))))) |
1971 |
|
(gdb-invalidate-memory))))) |
1972 |
|
"|" |
1973 |
|
(propertize "+" |
1974 |
|
'face font-lock-warning-face |
1975 |
|
'help-echo "mouse-1: Increment address" |
1976 |
|
'mouse-face 'mode-line-highlight |
1977 |
|
'local-map (gdb-make-header-line-mouse-map |
1978 |
|
'mouse-1 |
1979 |
|
#'(lambda () (interactive) |
1980 |
|
(let ((gdb-memory-address nil)) |
1981 |
|
(gdb-invalidate-memory))))) |
1982 |
|
"]: " |
1983 |
(propertize gdb-memory-address |
(propertize gdb-memory-address |
1984 |
'face font-lock-warning-face |
'face font-lock-warning-face |
1985 |
'help-echo "mouse-1: Set memory address" |
'help-echo "mouse-1: Set memory address" |