;; Find source file and compilation directory here.
;; Works for C, C++, Fortran and Ada but not Java (GDB 6.4)
(gdb-enqueue-input (list "server list\n" 'ignore))
+ (gdb-enqueue-input (list "server list MAIN__\n" 'ignore))
(gdb-enqueue-input (list "server info source\n" 'gdb-source-info)))
(defun gdb-get-version ()
(save-excursion
(while (re-search-forward (concat "[\\[,]\\(" fix-key "=\\)") nil t)
(replace-match "" nil nil nil 1))))
- ;; Emacs bug #3794
(when fix-list
(save-excursion
;; Find positions of braces which enclose broken list
(insert "]"))))))
(goto-char (point-min))
(insert "{")
- ;; TODO: This breaks badly with foo= inside constants
- (while (re-search-forward "\\([[:alpha:]-_]+\\)=" nil t)
- (replace-match "\"\\1\":" nil nil))
+ (while (re-search-forward
+ "\\([[:alnum:]-_]+\\)=\\(\\[\\|\"\"\\|\".*?[^\\]\"\\)" nil t)
+ (replace-match "\"\\1\":\\2" nil nil))
(goto-char (point-max))
(insert "}")))