# HG changeset patch # User Nick Roberts # Date 1073599842 0 # Node ID 4aca4e9c37dafdb5d8a83f3b2cca9c1041d0e9cd # Parent 09fdb86bd84e1cda1b507242b531b8f895eda207 (gdb-ann3): Revert previous change. (don't use GDB command "set width 0"). (gdb-source-info): Allow for case of where compilation directory is not recorded. diff -r 09fdb86bd84e -r 4aca4e9c37da lisp/gdb-ui.el --- a/lisp/gdb-ui.el Thu Jan 08 22:09:12 2004 +0000 +++ b/lisp/gdb-ui.el Thu Jan 08 22:10:42 2004 +0000 @@ -172,7 +172,6 @@ (if (eq window-system 'w32) (gdb-enqueue-input (list "set new-console off\n" 'ignore))) (gdb-enqueue-input (list "set height 0\n" 'ignore)) - (gdb-enqueue-input (list "set width 0\n" 'ignore)) ;; find source file and compilation directory here (gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program @@ -1706,14 +1705,13 @@ buffers." (goto-char (point-min)) (if (search-forward "directory is " nil t) - (progn - (if (looking-at "\\S-*:\\(\\S-*\\)") - (setq gdb-cdir (match-string 1)) - (looking-at "\\S-*") - (setq gdb-cdir (match-string 0))) - (search-forward "Located in ") + (if (looking-at "\\S-*:\\(\\S-*\\)") + (setq gdb-cdir (match-string 1)) (looking-at "\\S-*") - (setq gdb-main-file (match-string 0))) + (setq gdb-cdir (match-string 0)))) + (if (search-forward "Located in " nil t) + (if (looking-at "\\S-*") + (setq gdb-main-file (match-string 0))) (setq gdb-view-source nil)) (delete-other-windows) (switch-to-buffer gud-comint-buffer)