aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/scm-cmd.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-06-03 01:58:15 -0700
committerDoug Evans <xdje42@gmail.com>2014-06-03 01:58:15 -0700
commit06eb158633faa8746dd39f19ce784448bb7ece00 (patch)
treeaf106d0dafb2da97a959d2008a02abe3b0e61e4d /gdb/guile/scm-cmd.c
parentaef392c4aee243fe0fe2897d8847aebbbff6abdb (diff)
downloadgdb-06eb158633faa8746dd39f19ce784448bb7ece00.zip
gdb-06eb158633faa8746dd39f19ce784448bb7ece00.tar.gz
gdb-06eb158633faa8746dd39f19ce784448bb7ece00.tar.bz2
Add parameter support for Guile.
* Makefile.in (SUBDIR_GUILE_OBS): Add scm-param.o. (SUBDIR_GUILE_SRCS): Add scm-param.c. (scm-param.o): New rule. * guile/guile-internal.h (gdbscm_gc_dup_argv): Declare. (gdbscm_misc_error): Declare. (gdbscm_canonicalize_command_name): Declare. (gdbscm_scm_to_host_string): Declare. (gdbscm_scm_from_host_string): Declare. (gdbscm_initialize_parameters): Declare. * guile/guile.c (initialize_gdb_module): Call gdbscm_initialize_parameters. * guile/lib/gdb.scm: Export parameter symbols. * guile/scm-cmd.c (gdbscm_canonicalize_command_name): Renamed from cmdscm_canonicalize_name and made public. All callers updated. * guile/scm-exception.c (gdbscm_misc_error): New function. * guile/scm-param.c: New file. * guile/scm-string.c (gdbscm_scm_to_string): Add comments. (gdbscm_scm_to_host_string): New function. (gdbscm_scm_from_host_string): New function. * scm-utils.c (gdbscm_gc_dup_argv): New function. testsuite/ * gdb.guile/scm-parameter.exp: New file. doc/ * guile.texi (Guile API): Add entry for Parameters In Guile. (GDB Scheme Data Types): Mention <gdb:parameter> object. (Parameters In Guile): New node.
Diffstat (limited to 'gdb/guile/scm-cmd.c')
-rw-r--r--gdb/guile/scm-cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/guile/scm-cmd.c b/gdb/guile/scm-cmd.c
index ee3674c..57979c8 100644
--- a/gdb/guile/scm-cmd.c
+++ b/gdb/guile/scm-cmd.c
@@ -603,8 +603,8 @@ gdbscm_valid_command_class_p (int command_class)
but that is the caller's responsibility.
Space for the result is allocated on the GC heap. */
-static char *
-cmdscm_canonicalize_name (const char *name, int want_trailing_space)
+char *
+gdbscm_canonicalize_command_name (const char *name, int want_trailing_space)
{
int i, out, seen_word;
char *result = scm_gc_malloc_pointerless (strlen (name) + 2, FUNC_NAME);
@@ -699,7 +699,7 @@ gdbscm_make_command (SCM name_scm, SCM rest)
doc = xstrdup (_("This command is not documented."));
s = name;
- name = cmdscm_canonicalize_name (s, is_prefix);
+ name = gdbscm_canonicalize_command_name (s, is_prefix);
xfree (s);
s = doc;
doc = gdbscm_gc_xstrdup (s);