[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Fri Mar 19 12:32:31 UTC 2010
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv8638
Modified Files:
ChangeLog slime.el swank-backend.lisp swank-ecl.lisp
swank.lisp
Log Message:
* slime.el (slime-lisp-implementation-program): New connection
variable.
(slime-set-connection-info): Adapted to set it.
(slime-attach-gdb): Use it to invoke gdb so gdb is able to find
debugging symbols on non-Linux platforms.
* swank.lisp (connection-info): Include lisp-implementation-program.
* swank-backend.lisp (lisp-implementation-program): New interface.
Default implementation based on command-line-args.
* swank-ecl.lisp (command-line-args): Implement.
--- /project/slime/cvsroot/slime/ChangeLog 2010/03/18 18:24:25 1.2042
+++ /project/slime/cvsroot/slime/ChangeLog 2010/03/19 12:32:30 1.2043
@@ -1,3 +1,18 @@
+2010-03-19 Tobias C. Rittweiler <tcr at freebits.de>
+
+ * slime.el (slime-lisp-implementation-program): New connection
+ variable.
+ (slime-set-connection-info): Adapted to set it.
+ (slime-attach-gdb): Use it to invoke gdb so gdb is able to find
+ debugging symbols on non-Linux platforms.
+
+ * swank.lisp (connection-info): Include lisp-implementation-program.
+
+ * swank-backend.lisp (lisp-implementation-program): New interface.
+ Default implementation based on command-line-args.
+
+ * swank-ecl.lisp (command-line-args): Implement.
+
2010-03-18 Tobias C. Rittweiler <tcr at freebits.de>
Remove attach-gdb restart. Instead add SLDB shortcut `A'.
@@ -45,7 +60,8 @@
Add an ATTACH-GDB restart to SLDB.
- * swank.lisp (call-with-gdb-restart): New. Sends the new :gdb-attach event to Emacs.
+ * swank.lisp (call-with-gdb-restart): New. Sends the new
+ :gdb-attach event to Emacs.
(with-gdb-restart): Sugar.
(with-top-level-restart): Also expand to with-gdb-restart.
(dispatch-event): Add :gdb-attach event.
--- /project/slime/cvsroot/slime/slime.el 2010/03/18 18:24:25 1.1288
+++ /project/slime/cvsroot/slime/slime.el 2010/03/19 12:32:30 1.1289
@@ -1838,6 +1838,9 @@
(slime-def-connection-var slime-lisp-implementation-name nil
"The short name for the Lisp implementation.")
+(slime-def-connection-var slime-lisp-implementation-program nil
+ "The argv[0] of the process running the Lisp implementation.")
+
(slime-def-connection-var slime-connection-name nil
"The short name for connection.")
@@ -1892,10 +1895,11 @@
(slime-communication-style) style
(slime-lisp-features) features
(slime-lisp-modules) modules)
- (destructuring-bind (&key type name version) lisp-implementation
+ (destructuring-bind (&key type name version program) lisp-implementation
(setf (slime-lisp-implementation-type) type
(slime-lisp-implementation-version) version
(slime-lisp-implementation-name) name
+ (slime-lisp-implementation-program) program
(slime-connection-name) (slime-generate-connection-name name)))
(destructuring-bind (&key instance type version) machine
(setf (slime-machine-instance) instance)))
@@ -6088,11 +6092,12 @@
truly screwed up."
(interactive
(list (slime-read-connection "Attach gdb to: " (slime-connection)) "P"))
- (let ((pid (slime-pid connection))
+ (let ((pid (slime-pid connection))
+ (file (slime-lisp-implementation-program connection))
(commands (unless lightweight
(let ((slime-dispatching-connection connection))
(slime-eval `(swank:gdb-initial-commands))))))
- (gud-gdb (format "gdb -p %d" pid))
+ (gud-gdb (format "gdb -p %d %s" pid (or file "")))
(with-current-buffer gud-comint-buffer
(dolist (cmd commands)
;; First wait until gdb was initialized, then wait until current
--- /project/slime/cvsroot/slime/swank-backend.lisp 2010/03/18 12:29:07 1.197
+++ /project/slime/cvsroot/slime/swank-backend.lisp 2010/03/19 12:32:30 1.198
@@ -342,6 +342,12 @@
"Return a short name for the Lisp implementation."
(lisp-implementation-type))
+(definterface lisp-implementation-program ()
+ "Return the argv[0] of the running Lisp process, or NIL."
+ (let ((file (car (command-line-args))))
+ (when (and file (probe-file file))
+ (namestring (truename file)))))
+
(definterface socket-fd (socket-stream)
"Return the file descriptor for SOCKET-STREAM.")
@@ -362,7 +368,8 @@
This is thin wrapper around exec(3).")
(definterface command-line-args ()
- "Return a list of strings as passed by the OS.")
+ "Return a list of strings as passed by the OS."
+ nil)
;; pathnames are sooo useless
--- /project/slime/cvsroot/slime/swank-ecl.lisp 2010/03/18 12:29:07 1.65
+++ /project/slime/cvsroot/slime/swank-ecl.lisp 2010/03/19 12:32:30 1.66
@@ -486,6 +486,9 @@
#+linux '("handle SIGPWR noprint nostop"
"handle SIGXCPU noprint nostop"))
+(defimplementation command-line-args ()
+ (loop for n from 0 below (si:argc) collect (si:argv n)))
+
;;;; Inspector
--- /project/slime/cvsroot/slime/swank.lisp 2010/03/18 18:24:25 1.704
+++ /project/slime/cvsroot/slime/swank.lisp 2010/03/19 12:32:30 1.705
@@ -1737,7 +1737,8 @@
(connection.external-format c)))
:lisp-implementation (:type ,(lisp-implementation-type)
:name ,(lisp-implementation-type-name)
- :version ,(lisp-implementation-version))
+ :version ,(lisp-implementation-version)
+ :program ,(lisp-implementation-program))
:machine (:instance ,(machine-instance)
:type ,(machine-type)
:version ,(machine-version))
More information about the slime-cvs
mailing list