(gdb-enqueue-input (list "set new-console off\n" 'ignore)))
(gdb-enqueue-input (list "set height 0\n" 'ignore))
;; find source file and compilation directory here
- (gdb-enqueue-input (list "server list\n" 'ignore))
+ (gdb-enqueue-input (list "server list\n" 'ignore)) ; C program
+ (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program
(gdb-enqueue-input (list "server info source\n"
'gdb-source-info))
;;
;; any newlines.
;;
-(defcustom gud-gdba-command-name
- (if (eq window-system 'w32)
- "gdb -annotate=2 -noasync"
- "gdb -annotate=2")
+(defcustom gud-gdba-command-name "gdb -annotate=2 -noasync"
"Default command to execute an executable under the GDB-UI debugger."
:type 'string
:group 'gud)
buffers."
(goto-char (point-min))
(when (search-forward "directory is " nil t)
- (looking-at "\\S-*")
- (setq gdb-cdir (match-string 0))
+ (if (looking-at "\\S-*:\\(\\S-*\\)")
+ (setq gdb-cdir (match-string 1))
+ (looking-at "\\S-*")
+ (setq gdb-cdir (match-string 0)))
(search-forward "Located in ")
(looking-at "\\S-*")
(setq gdb-main-file (match-string 0))