1 ;;; gud-guile.el --- Support for debugging guile internals
3 ;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
5 ;; GNU Emacs is free software; you can redistribute it and/or modify
6 ;; it under the terms of the GNU General Public License as published by
7 ;; the Free Software Foundation; either version 2, or (at your option)
10 ;; GNU Emacs is distributed in the hope that it will be useful,
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;; GNU General Public License for more details.
15 ;; You should have received a copy of the GNU General Public License
16 ;; along with GNU Emacs; see the file COPYING. If not, write to the
17 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 ;; Boston, MA 02110-1301, USA.
20 ;;; Author: Thien-Thi Nguyen <ttn@gnu.org>
22 ;;; Favorite-Favorite: Favorite-Favorite
26 ;; This is a grab bag of stuff for doing "gdb guile" in Emacs.
27 ;; The var `gdb-guile-suggested-gdbinit' has a string that is
28 ;; snarfed from ../HACKING. (todo: Write `gdb-guile-init' to
35 (defun gdb-guile-display-scm ()
38 (let ((sym (thing-at-point 'symbol))
39 (proc (get-buffer-process
40 (find-if (lambda (buf)
41 (string-match "^.gud-." (buffer-name buf)))
43 (mapc (lambda (template)
44 (process-send-string proc (format template sym)))
47 "printf \"%s: %%s\\n\", gdb_output\n")))))
49 (defvar gdb-guile-suggested-gdbinit "
55 Executes (object->string arg)
60 call gdb_eval(gdb_result)
61 set gdb_print(gdb_result)
65 Executes (print (eval (read arg))): ge \"(+ 1 2)\" => 3
69 call g_help(scm_str2symbol($arg0), 20)
74 Prints help string for arg: gh \"enved-target\"
81 ;;; gud-guile.el ends here