summaryrefslogtreecommitdiff
path: root/gdb/guile/lib/gdb.scm
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-06-03 00:29:49 -0700
committerDoug Evans <xdje42@gmail.com>2014-06-03 00:29:49 -0700
commite698b8c41cbb2648a11a2ae806922c44d1482aed (patch)
tree4a3ded90e95596c985b7940cb82e50abd773d194 /gdb/guile/lib/gdb.scm
parentfb1f94b09a3d12a231f6be8fadf421ab578dc4ba (diff)
downloadbinutils-gdb-e698b8c41cbb2648a11a2ae806922c44d1482aed.tar.gz
Add command support for Guile.
* Makefile.in (SUBDIR_GUILE_OBS): Add scm-cmd.o. (SUBDIR_GUILE_SRCS): Add scm-cmd.c. (scm-cmd.o): New rule. * guile/guile-internal.h (gdbscm_gc_xstrdup): Declare. (gdbscm_user_error_p): Declare. (gdbscm_parse_command_name): Declare. (gdbscm_valid_command_class_p): Declare. (gdbscm_initialize_commands): Declare. * guile/guile.c (initialize_gdb_module): Call gdbscm_initialize_commands. * guile/lib/gdb.scm: Export command symbols. * guile/lib/gdb/init.scm (%exception-keys): Add gdb:user-error. (throw-user-error): New function. * guile/scm-cmd.c: New file. * guile/scm-exception.c (user_error_symbol): New static global. (gdbscm_user_error_p): New function. (gdbscm_initialize_exceptions): Set user_error_symbol. * scm-utils.c (gdbscm_gc_xstrdup): New function. testsuite/ * gdb.guile/scm-cmd.c: New file. * gdb.guile/scm-cmd.exp: New file. doc/ * guile.texi (Guile API): Add entry for Commands In Guile. (Basic Guile) <parse-and-eval>: Add reference. (Basic Guile) <string->argv>: Move definition to Commands In Guile. (GDB Scheme Data Types): Mention <gdb:command> object. (Commands In Guile): New node.
Diffstat (limited to 'gdb/guile/lib/gdb.scm')
-rw-r--r--gdb/guile/lib/gdb.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/guile/lib/gdb.scm b/gdb/guile/lib/gdb.scm
index 646ca81f535..a3f43a4589d 100644
--- a/gdb/guile/lib/gdb.scm
+++ b/gdb/guile/lib/gdb.scm
@@ -141,6 +141,34 @@
set-breakpoint-stop!
breakpoint-commands
+ ;; scm-cmd.c
+
+ make-command
+ register-command!
+ command?
+ command-valid?
+ dont-repeat
+
+ COMPLETE_NONE
+ COMPLETE_FILENAME
+ COMPLETE_LOCATION
+ COMPLETE_COMMAND
+ COMPLETE_SYMBOL
+ COMPLETE_EXPRESSION
+
+ COMMAND_NONE
+ COMMAND_RUNNING
+ COMMAND_DATA
+ COMMAND_STACK
+ COMMAND_FILES
+ COMMAND_SUPPORT
+ COMMAND_STATUS
+ COMMAND_BREAKPOINTS
+ COMMAND_TRACEPOINTS
+ COMMAND_OBSCURE
+ COMMAND_MAINTENANCE
+ COMMAND_USER
+
;; scm-disasm.c
arch-disassemble
@@ -457,4 +485,5 @@
orig-input-port
orig-output-port
orig-error-port
+ throw-user-error
)