aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorChong Yidong2012-07-28 23:09:36 +0800
committerChong Yidong2012-07-28 23:09:36 +0800
commita55739d3d02606d60f511b1ce558dd503b69acba (patch)
tree57c3aa3c2ccaa73f978de8ee7d366b6d6c8096ea /lisp/progmodes
parent7747226193850b48d81443fd38ab89a9daa5658e (diff)
downloademacs-a55739d3d02606d60f511b1ce558dd503b69acba.tar.gz
emacs-a55739d3d02606d60f511b1ce558dd503b69acba.zip
Fix bogus code in gdb-place-breakpoints.
* progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to gdb-get-location.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/gdb-mi.el29
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index b19c828d171..f35951e0dda 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2503,20 +2503,23 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
2503 (let ((file (bindat-get-field breakpoint 'fullname)) 2503 (let ((file (bindat-get-field breakpoint 'fullname))
2504 (flag (bindat-get-field breakpoint 'enabled)) 2504 (flag (bindat-get-field breakpoint 'enabled))
2505 (bptno (bindat-get-field breakpoint 'number))) 2505 (bptno (bindat-get-field breakpoint 'number)))
2506 (unless (file-exists-p file) 2506 (unless (and file (file-exists-p file))
2507 (setq file (cdr (assoc bptno gdb-location-alist)))) 2507 (setq file (cdr (assoc bptno gdb-location-alist))))
2508 (if (and file 2508 (if (or (null file)
2509 (not (string-equal file "File not found"))) 2509 (string-equal file "File not found"))
2510 (with-current-buffer 2510 ;; If the full filename is not recorded in the
2511 (find-file-noselect file 'nowarn) 2511 ;; breakpoint structure or in `gdb-location-alist', use
2512 (gdb-init-buffer) 2512 ;; -file-list-exec-source-file to extract it.
2513 ;; Only want one breakpoint icon at each location. 2513 (when (setq file (bindat-get-field breakpoint 'file))
2514 (gdb-put-breakpoint-icon (string-equal flag "y") bptno 2514 (gdb-input (concat "list " file ":1") 'ignore)
2515 (string-to-number line))) 2515 (gdb-input "-file-list-exec-source-file"
2516 (gdb-input (concat "list " file ":1") 'ignore) 2516 `(lambda () (gdb-get-location
2517 (gdb-input "-file-list-exec-source-file" 2517 ,bptno ,line ,flag))))
2518 `(lambda () (gdb-get-location 2518 (with-current-buffer (find-file-noselect file 'nowarn)
2519 ,bptno ,line ,flag))))))))) 2519 (gdb-init-buffer)
2520 ;; Only want one breakpoint icon at each location.
2521 (gdb-put-breakpoint-icon (string-equal flag "y") bptno
2522 (string-to-number line)))))))))
2520 2523
2521(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") 2524(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
2522 2525