aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2008-04-28 03:24:43 +0000
committerNick Roberts2008-04-28 03:24:43 +0000
commit841b19a0a0fbf59a64f69e809697bf492f5e923a (patch)
treedbcc6c5aef33d859902c838456a6311757be111a
parentce31e57251682ea8e0709424e7e653f112630f33 (diff)
downloademacs-841b19a0a0fbf59a64f69e809697bf492f5e923a.tar.gz
emacs-841b19a0a0fbf59a64f69e809697bf492f5e923a.zip
(gdb-info-breakpoints-custom): Make breakpoint
icons work for assembler, i.e. FILE.s, FILE.S (not disassembly). (gdb-goto-breakpoint): Likewise for visiting breakpoints. (gdb-assembler-custom): Be careful not to match other addresses.
-rw-r--r--lisp/progmodes/gdb-ui.el69
1 files changed, 34 insertions, 35 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index eee8f00d770..508b0e67073 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1927,38 +1927,37 @@ static char *magick[] = {
1927 '(face font-lock-type-face))) 1927 '(face font-lock-type-face)))
1928 (let ((bl (point)) 1928 (let ((bl (point))
1929 (el (line-end-position))) 1929 (el (line-end-position)))
1930 (if (re-search-forward " in \\(.*\\) at\\s-+" el t) 1930 (when (re-search-forward " in \\(.*\\) at" el t)
1931 (progn 1931 (add-text-properties
1932 (add-text-properties 1932 (match-beginning 1) (match-end 1)
1933 (match-beginning 1) (match-end 1) 1933 '(face font-lock-function-name-face)))
1934 '(face font-lock-function-name-face)) 1934 (if (re-search-forward ".*\\s-+\\(\\S-+\\):\\([0-9]+\\)$")
1935 (looking-at "\\(\\S-+\\):\\([0-9]+\\)") 1935 (let ((line (match-string 2))
1936 (let ((line (match-string 2)) 1936 (file (match-string 1)))
1937 (file (match-string 1))) 1937 (add-text-properties bl el
1938 (add-text-properties bl el 1938 '(mouse-face highlight
1939 '(mouse-face highlight 1939 help-echo "mouse-2, RET: visit breakpoint"))
1940 help-echo "mouse-2, RET: visit breakpoint")) 1940 (unless (file-exists-p file)
1941 (unless (file-exists-p file) 1941 (setq file (cdr (assoc bptno gdb-location-alist))))
1942 (setq file (cdr (assoc bptno gdb-location-alist)))) 1942 (if (and file
1943 (if (and file 1943 (not (string-equal file "File not found")))
1944 (not (string-equal file "File not found"))) 1944 (with-current-buffer
1945 (with-current-buffer 1945 (find-file-noselect file 'nowarn)
1946 (find-file-noselect file 'nowarn) 1946 (gdb-init-buffer)
1947 (gdb-init-buffer) 1947 ;; Only want one breakpoint icon at each
1948 ;; Only want one breakpoint icon at each 1948 ;; location.
1949 ;; location. 1949 (save-excursion
1950 (save-excursion 1950 (goto-line (string-to-number line))
1951 (goto-line (string-to-number line)) 1951 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
1952 (gdb-put-breakpoint-icon (eq flag ?y) bptno))) 1952 (gdb-enqueue-input
1953 (gdb-enqueue-input 1953 (list
1954 (list 1954 (concat gdb-server-prefix "list "
1955 (concat gdb-server-prefix "list " 1955 (match-string-no-properties 1) ":1\n")
1956 (match-string-no-properties 1) ":1\n") 1956 'ignore))
1957 'ignore)) 1957 (gdb-enqueue-input
1958 (gdb-enqueue-input 1958 (list (concat gdb-server-prefix "info source\n")
1959 (list (concat gdb-server-prefix "info source\n") 1959 `(lambda () (gdb-get-location
1960 `(lambda () (gdb-get-location 1960 ,bptno ,line ,flag)))))))
1961 ,bptno ,line ,flag)))))))
1962 (if (re-search-forward 1961 (if (re-search-forward
1963 "<\\(\\(\\sw\\|[_.]\\)+\\)\\(\\+[0-9]+\\)?>" 1962 "<\\(\\(\\sw\\|[_.]\\)+\\)\\(\\+[0-9]+\\)?>"
1964 el t) 1963 el t)
@@ -2131,7 +2130,7 @@ static char *magick[] = {
2131 (if event (posn-set-point (event-end event))) 2130 (if event (posn-set-point (event-end event)))
2132 (save-excursion 2131 (save-excursion
2133 (beginning-of-line 1) 2132 (beginning-of-line 1)
2134 (if (looking-at "\\([0-9]+\\.?[0-9]*\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)") 2133 (if (looking-at "\\([0-9]+\\.?[0-9]*\\) .*\\s-+\\(\\S-+\\):\\([0-9]+\\)$")
2135 (let ((bptno (match-string 1)) 2134 (let ((bptno (match-string 1))
2136 (file (match-string 2)) 2135 (file (match-string 2))
2137 (line (match-string 3))) 2136 (line (match-string 3)))
@@ -2148,7 +2147,7 @@ static char *magick[] = {
2148 (error "No location specified.")))) 2147 (error "No location specified."))))
2149 2148
2150 2149
2151;; Frames buffer. This displays a perpetually correct bactracktrace 2150;; Frames buffer. This displays a perpetually correct backtrace
2152;; (from the command `where'). 2151;; (from the command `where').
2153;; 2152;;
2154;; Alas, if your stack is deep, it is costly. 2153;; Alas, if your stack is deep, it is costly.
@@ -3337,7 +3336,7 @@ BUFFER nil or omitted means use the current buffer."
3337 (with-current-buffer buffer 3336 (with-current-buffer buffer
3338 (save-excursion 3337 (save-excursion
3339 (goto-char (point-min)) 3338 (goto-char (point-min))
3340 (if (search-forward address nil t) 3339 (if (re-search-forward (concat "^0x0*" address) nil t)
3341 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) 3340 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))
3342 (if (not (equal gdb-pc-address "main")) 3341 (if (not (equal gdb-pc-address "main"))
3343 (with-current-buffer buffer 3342 (with-current-buffer buffer