diff options
| author | Nick Roberts | 2004-05-03 00:34:50 +0000 |
|---|---|---|
| committer | Nick Roberts | 2004-05-03 00:34:50 +0000 |
| commit | 294240c35d87784a87d85a97642ae518262ee37d (patch) | |
| tree | 7e5b9c0738f05b65b0b0641549dd009214d4408f | |
| parent | 31b5ff3984e57b4e34033ef71e3b4594eaeaaa9c (diff) | |
| download | emacs-294240c35d87784a87d85a97642ae518262ee37d.tar.gz emacs-294240c35d87784a87d85a97642ae518262ee37d.zip | |
(gdb-goto-breakpoint): Make buffer display file at breakpoint.
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 937d9189510..97e15fc2872 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -1216,11 +1216,13 @@ current line." | |||
| 1216 | (let ((line (match-string 2)) | 1216 | (let ((line (match-string 2)) |
| 1217 | (file (match-string 1))) | 1217 | (file (match-string 1))) |
| 1218 | (save-selected-window | 1218 | (save-selected-window |
| 1219 | (gdb-display-buffer (find-file-noselect | 1219 | (let* ((buf (find-file-noselect (if (file-exists-p file) |
| 1220 | (if (file-exists-p file) | 1220 | file |
| 1221 | file | 1221 | (expand-file-name file gdb-cdir)))) |
| 1222 | (expand-file-name file gdb-cdir)))) | 1222 | (window (gdb-display-buffer buf))) |
| 1223 | (goto-line (string-to-number line)))))) | 1223 | (with-current-buffer buf |
| 1224 | (goto-line (string-to-number line)) | ||
| 1225 | (set-window-point window (point)))))))) | ||
| 1224 | 1226 | ||
| 1225 | (defun gdb-mouse-goto-breakpoint (event) | 1227 | (defun gdb-mouse-goto-breakpoint (event) |
| 1226 | "Display the file in the source buffer at the selected breakpoint." | 1228 | "Display the file in the source buffer at the selected breakpoint." |