diff options
| author | Chong Yidong | 2012-07-28 23:09:36 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-07-28 23:09:36 +0800 |
| commit | a55739d3d02606d60f511b1ce558dd503b69acba (patch) | |
| tree | 57c3aa3c2ccaa73f978de8ee7d366b6d6c8096ea | |
| parent | 7747226193850b48d81443fd38ab89a9daa5658e (diff) | |
| download | emacs-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.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 29 |
2 files changed, 21 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac1482df4e1..635ecc054dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-07-28 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to | ||
| 4 | gdb-get-location. | ||
| 5 | |||
| 1 | 2012-07-25 Leo Liu <sdl.web@gmail.com> | 6 | 2012-07-25 Leo Liu <sdl.web@gmail.com> |
| 2 | 7 | ||
| 3 | * progmodes/cc-menus.el (cc-imenu-objc-function): Avoid leaving nil in | 8 | * progmodes/cc-menus.el (cc-imenu-objc-function): Avoid leaving nil in |
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 | ||