]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/gud.el
(gud-stop-subjob): Using jdb, suspend threads
[gnu-emacs] / lisp / progmodes / gud.el
index 7c1970f7aa20a78e36e26f546dfc3108e3f3e8c3..4e56383f3a43bc64bcc15723b48418afcd64e0a4 100644 (file)
@@ -139,7 +139,9 @@ Used to grey out relevant toolbar icons.")
   (with-current-buffer gud-comint-buffer
     (if (string-equal gud-target-name "emacs")
        (comint-stop-subjob)
-      (comint-interrupt-subjob))))
+      (if (eq gud-minor-mode 'jdb)
+         (gud-call "suspend")
+       (comint-interrupt-subjob)))))
 
 (easy-mmode-defmap gud-menu-map
   '(([help]     "Info (debugger)" . gud-goto-info)
@@ -2445,6 +2447,9 @@ comint mode, which see."
   :group 'gud
   :type 'boolean)
 
+(declare-function tramp-file-name-localname "tramp" (vec))
+(declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
+
 ;; Perform initializations common to all debuggers.
 ;; The first arg is the specified command line,
 ;; which starts with the program to debug.
@@ -2502,7 +2507,9 @@ comint mode, which see."
       (if w
          (setcar w
                  (if (file-remote-p default-directory)
-                     (setq file (file-name-nondirectory file))
+                     ;; Tramp has already been loaded if we are here.
+                     (setq file (tramp-file-name-localname
+                                 (tramp-dissect-file-name file)))
                    file))))
     (apply 'make-comint (concat "gud" filepart) program nil
           (if massage-args (funcall massage-args file args) args))