]> git.eshelyaron.com Git - emacs.git/commitdiff
(gdb-info-breakpoints-custom): Make breakpoint
authorNick Roberts <nickrob@snap.net.nz>
Mon, 28 Apr 2008 03:24:43 +0000 (03:24 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Mon, 28 Apr 2008 03:24:43 +0000 (03:24 +0000)
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.

lisp/progmodes/gdb-ui.el

index eee8f00d770dd4d62587e91ca5b8fd11a551e152..508b0e67073d3824ec9885853aa4dd5090482e26 100644 (file)
@@ -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."))))
 \f
 
-;; 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