summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2008-04-28 03:24:43 +0000
committerNick Roberts <nickrob@snap.net.nz>2008-04-28 03:24:43 +0000
commit841b19a0a0fbf59a64f69e809697bf492f5e923a (patch)
treedbcc6c5aef33d859902c838456a6311757be111a /lisp/progmodes/gdb-ui.el
parentce31e57251682ea8e0709424e7e653f112630f33 (diff)
downloademacs-841b19a0a0fbf59a64f69e809697bf492f5e923a.tar.gz
(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.
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-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[] = {
'(face font-lock-type-face)))
(let ((bl (point))
(el (line-end-position)))
- (if (re-search-forward " in \\(.*\\) at\\s-+" el t)
- (progn
- (add-text-properties
- (match-beginning 1) (match-end 1)
- '(face font-lock-function-name-face))
- (looking-at "\\(\\S-+\\):\\([0-9]+\\)")
- (let ((line (match-string 2))
- (file (match-string 1)))
- (add-text-properties bl el
- '(mouse-face highlight
- help-echo "mouse-2, RET: visit breakpoint"))
- (unless (file-exists-p file)
- (setq file (cdr (assoc bptno gdb-location-alist))))
- (if (and file
- (not (string-equal file "File not found")))
- (with-current-buffer
- (find-file-noselect file 'nowarn)
- (gdb-init-buffer)
- ;; Only want one breakpoint icon at each
- ;; location.
- (save-excursion
- (goto-line (string-to-number line))
- (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
- (gdb-enqueue-input
- (list
- (concat gdb-server-prefix "list "
- (match-string-no-properties 1) ":1\n")
- 'ignore))
- (gdb-enqueue-input
- (list (concat gdb-server-prefix "info source\n")
- `(lambda () (gdb-get-location
- ,bptno ,line ,flag)))))))
+ (when (re-search-forward " in \\(.*\\) at" el t)
+ (add-text-properties
+ (match-beginning 1) (match-end 1)
+ '(face font-lock-function-name-face)))
+ (if (re-search-forward ".*\\s-+\\(\\S-+\\):\\([0-9]+\\)$")
+ (let ((line (match-string 2))
+ (file (match-string 1)))
+ (add-text-properties bl el
+ '(mouse-face highlight
+ help-echo "mouse-2, RET: visit breakpoint"))
+ (unless (file-exists-p file)
+ (setq file (cdr (assoc bptno gdb-location-alist))))
+ (if (and file
+ (not (string-equal file "File not found")))
+ (with-current-buffer
+ (find-file-noselect file 'nowarn)
+ (gdb-init-buffer)
+ ;; Only want one breakpoint icon at each
+ ;; location.
+ (save-excursion
+ (goto-line (string-to-number line))
+ (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
+ (gdb-enqueue-input
+ (list
+ (concat gdb-server-prefix "list "
+ (match-string-no-properties 1) ":1\n")
+ 'ignore))
+ (gdb-enqueue-input
+ (list (concat gdb-server-prefix "info source\n")
+ `(lambda () (gdb-get-location
+ ,bptno ,line ,flag)))))))
(if (re-search-forward
"<\\(\\(\\sw\\|[_.]\\)+\\)\\(\\+[0-9]+\\)?>"
el t)
@@ -2131,7 +2130,7 @@ static char *magick[] = {
(if event (posn-set-point (event-end event)))
(save-excursion
(beginning-of-line 1)
- (if (looking-at "\\([0-9]+\\.?[0-9]*\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)")
+ (if (looking-at "\\([0-9]+\\.?[0-9]*\\) .*\\s-+\\(\\S-+\\):\\([0-9]+\\)$")
(let ((bptno (match-string 1))
(file (match-string 2))
(line (match-string 3)))
@@ -2148,7 +2147,7 @@ static char *magick[] = {
(error "No location specified."))))
-;; Frames buffer. This displays a perpetually correct bactracktrace
+;; Frames buffer. This displays a perpetually correct backtrace
;; (from the command `where').
;;
;; Alas, if your stack is deep, it is costly.
@@ -3337,7 +3336,7 @@ BUFFER nil or omitted means use the current buffer."
(with-current-buffer buffer
(save-excursion
(goto-char (point-min))
- (if (search-forward address nil t)
+ (if (re-search-forward (concat "^0x0*" address) nil t)
(gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))
(if (not (equal gdb-pc-address "main"))
(with-current-buffer buffer