changeset 80535:106730cfdf95

(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.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 28 Apr 2008 03:24:43 +0000
parents 3d112d86803d
children 4b0ab9e918cd
files lisp/progmodes/gdb-ui.el
diffstat 1 files changed, 34 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el	Mon Apr 28 03:22:23 2008 +0000
+++ b/lisp/progmodes/gdb-ui.el	Mon Apr 28 03:24:43 2008 +0000
@@ -1927,38 +1927,37 @@
 		   '(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 @@
   (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 @@
       (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 @@
 	  (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