bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUD mode bug


From: Nick Roberts
Subject: Re: GUD mode bug
Date: Thu, 28 Jun 2007 13:44:41 +1200

 > M-x dbx
 > dbx -c "runargs -simu; run" path-to-the-debuggee
 > 
 > Above workflow doesn't work on Emacs 22.1.1

 >
 > "Split-String" by default separator.
 > 
 > In the end, because the quote in my original dbx execution, output list by
 > split-string was
 > 
 > ("-c" "\"runargs" "-simu;" "run\"" "path-to-the-debuggee)
 > 
 > instead of
 > 
 > ("-c" "runargs -simu; run" "path-to-the-debuggee")
 > 
 > which is actually correct for (start-process) to be called with

I've fixed this in the CVS repository at Savannah.  If you can build from there
can you tell me if it is fixed now.  Failing that, please apply the patch below
to gud.el, evaluate the function string->strings and try it from there.  Does
that work now?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


(defun string->strings (string &optional separator)
  "Split the STRING into a list of strings.
It understands elisp style quoting within STRING such that
  (string->strings (strings->string strs)) == strs
The SEPARATOR regexp defaults to \"\\s-+\"."
  (let ((sep (or separator "\\s-+"))
        (i (string-match "[\"]" string)))
    (if (null i) (split-string string sep t)    ; no quoting:  easy
      (append (unless (eq i 0) (split-string (substring string 0 i) sep t))
              (let ((rfs (read-from-string string i)))
                (cons (car rfs)
                      (string->strings (substring string (cdr rfs))
                                           sep)))))))



*** gud.el      13 May 2007 16:21:01 +1200      1.130
--- gud.el      28 Jun 2007 12:56:38 +1200      
*************** comint mode, which see."
*** 2462,2468 ****
  ;; for local variables in the debugger buffer.
  (defun gud-common-init (command-line massage-args marker-filter
                                     &optional find-file)
!   (let* ((words (split-string command-line))
         (program (car words))
         (dir default-directory)
         ;; Extract the file name from WORDS
--- 2462,2468 ----
  ;; for local variables in the debugger buffer.
  (defun gud-common-init (command-line massage-args marker-filter
                                     &optional find-file)
!   (let* ((words (string->strings command-line))
         (program (car words))
         (dir default-directory)
         ;; Extract the file name from WORDS




reply via email to

[Prev in Thread] Current Thread [Next in Thread]