Mercurial > emacs
comparison lisp/gud.el @ 48011:6ee65f935a8c
(gdb): Pass default-directory to GDB via -cd option.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 26 Oct 2002 22:37:04 +0000 |
parents | cfea5643ff62 |
children | b82c4ff4d201 |
comparison
equal
deleted
inserted
replaced
48010:d7662618cd11 | 48011:6ee65f935a8c |
---|---|
403 "Run gdb on program FILE in buffer *gud-FILE*. | 403 "Run gdb on program FILE in buffer *gud-FILE*. |
404 The directory containing FILE becomes the initial working directory | 404 The directory containing FILE becomes the initial working directory |
405 and source-file directory for your debugger." | 405 and source-file directory for your debugger." |
406 (interactive (list (gud-query-cmdline 'gdb))) | 406 (interactive (list (gud-query-cmdline 'gdb))) |
407 | 407 |
408 (gud-common-init command-line nil | 408 (gud-common-init command-line |
409 #'(lambda (file args) | |
410 `("-cd" ,(expand-file-name default-directory) . ,args)) | |
409 'gud-gdb-marker-filter 'gud-gdb-find-file) | 411 'gud-gdb-marker-filter 'gud-gdb-find-file) |
410 (set (make-local-variable 'gud-minor-mode) 'gdb) | 412 (set (make-local-variable 'gud-minor-mode) 'gdb) |
411 | 413 |
412 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") | 414 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") |
413 (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.") | 415 (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.") |