aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/guile-internal.h
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/guile-internal.h
parentfb1f94b09a3d12a231f6be8fadf421ab578dc4ba (diff)
downloadfsf-binutils-gdb-e698b8c41cbb2648a11a2ae806922c44d1482aed.zip
fsf-binutils-gdb-e698b8c41cbb2648a11a2ae806922c44d1482aed.tar.gz
fsf-binutils-gdb-e698b8c41cbb2648a11a2ae806922c44d1482aed.tar.bz2
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/guile-internal.h')
-rw-r--r--gdb/guile/guile-internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h
index 9f6a886..042ece9 100644
--- a/gdb/guile/guile-internal.h
+++ b/gdb/guile/guile-internal.h
@@ -164,6 +164,8 @@ extern ULONGEST gdbscm_scm_to_ulongest (SCM u);
extern void gdbscm_dynwind_xfree (void *ptr);
extern int gdbscm_is_procedure (SCM proc);
+
+extern char *gdbscm_gc_xstrdup (const char *);
/* GDB smobs, from scm-gsmob.c */
@@ -315,6 +317,8 @@ extern char *gdbscm_exception_message_to_string (SCM exception);
extern excp_matcher_func gdbscm_memory_error_p;
+extern excp_matcher_func gdbscm_user_error_p;
+
extern SCM gdbscm_make_memory_error (const char *subr, const char *msg,
SCM args);
@@ -375,6 +379,15 @@ extern SCM bkscm_scm_from_block (const struct block *block,
extern const struct block *bkscm_scm_to_block
(SCM block_scm, int arg_pos, const char *func_name, SCM *excp);
+/* scm-cmd.c */
+
+extern char *gdbscm_parse_command_name (const char *name,
+ const char *func_name, int arg_pos,
+ struct cmd_list_element ***base_list,
+ struct cmd_list_element **start_list);
+
+extern int gdbscm_valid_command_class_p (int command_class);
+
/* scm-frame.c */
typedef struct _frame_smob frame_smob;
@@ -543,6 +556,7 @@ extern void gdbscm_initialize_arches (void);
extern void gdbscm_initialize_auto_load (void);
extern void gdbscm_initialize_blocks (void);
extern void gdbscm_initialize_breakpoints (void);
+extern void gdbscm_initialize_commands (void);
extern void gdbscm_initialize_disasm (void);
extern void gdbscm_initialize_exceptions (void);
extern void gdbscm_initialize_frames (void);