emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108082: Fix bogus code in gdb-pla


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108082: Fix bogus code in gdb-place-breakpoints.
Date: Sat, 28 Jul 2012 23:09:36 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108082
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Sat 2012-07-28 23:09:36 +0800
message:
  Fix bogus code in gdb-place-breakpoints.
  * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to
  gdb-get-location.
modified:
  lisp/ChangeLog
  lisp/progmodes/gdb-mi.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-07-25 16:11:23 +0000
+++ b/lisp/ChangeLog    2012-07-28 15:09:36 +0000
@@ -1,3 +1,8 @@
+2012-07-28  Chong Yidong  <address@hidden>
+
+       * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to
+       gdb-get-location.
+
 2012-07-25  Leo Liu  <address@hidden>
 
        * progmodes/cc-menus.el (cc-imenu-objc-function): Avoid leaving nil in

=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el  2012-04-20 10:09:40 +0000
+++ b/lisp/progmodes/gdb-mi.el  2012-07-28 15:09:36 +0000
@@ -2503,20 +2503,23 @@
         (let ((file (bindat-get-field breakpoint 'fullname))
               (flag (bindat-get-field breakpoint 'enabled))
               (bptno (bindat-get-field breakpoint 'number)))
-          (unless (file-exists-p file)
+          (unless (and file (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.
-                (gdb-put-breakpoint-icon (string-equal flag "y") bptno
-                                         (string-to-number line)))
-            (gdb-input (concat "list " file ":1") 'ignore)
-            (gdb-input "-file-list-exec-source-file"
-                      `(lambda () (gdb-get-location
-                                   ,bptno ,line ,flag)))))))))
+         (if (or (null file)
+                 (string-equal file "File not found"))
+             ;; If the full filename is not recorded in the
+             ;; breakpoint structure or in `gdb-location-alist', use
+             ;; -file-list-exec-source-file to extract it.
+             (when (setq file (bindat-get-field breakpoint 'file))
+               (gdb-input (concat "list " file ":1") 'ignore)
+               (gdb-input "-file-list-exec-source-file"
+                          `(lambda () (gdb-get-location
+                                       ,bptno ,line ,flag))))
+           (with-current-buffer (find-file-noselect file 'nowarn)
+             (gdb-init-buffer)
+             ;; Only want one breakpoint icon at each location.
+             (gdb-put-breakpoint-icon (string-equal flag "y") bptno
+                                      (string-to-number line)))))))))
 
 (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]