Doug Evans
d81412aa4b
Replace use of magic number with named constant.
...
gdb/ChangeLog:
* guile/scm-cmd.c (gdbscm_parse_command_name): Replace magic number
with named constant. Fix style of pointer comparison.
* python/py-cmd.c (gdbpy_parse_command_name): Ditto.
2014-09-08 20:47:57 -07:00
Tom Tromey
1947513d92
constify command docs
...
This makes the command "doc" parameter const.
2014-07-24 Tom Tromey <tromey@redhat.com>
* cli/cli-decode.c (add_cmd, add_prefix_cmd)
(add_abbrev_prefix_cmd, add_set_or_show_cmd, add_info)
(add_info_alias, add_com): Make "doc" const.
(print_doc_line): Make "str" const.
(delete_cmd): Update.
* cli/cli-decode.h (struct cmd_list_element) <doc>: Now const.
(print_doc_line): Update.
* cli/cli-script.c (document_command): Update.
* command.h (add_cmd, add_prefix_cmd, add_abbrev_prefix_cmd)
(add_com, add_info, add_info_alias): Update.
* guile/scm-cmd.c (cmdscm_destroyer): Update.
* python/py-cmd.c (cmdpy_destroyer): Update.
2014-07-24 11:30:04 -06:00
Tom Tromey
64e61d290e
constify command prefix
...
This constifies the "prefix" argument to the various command-adding
functions.
2014-07-24 Tom Tromey <tromey@redhat.com>
* cli/cli-decode.c (print_help_for_command): Make "prefix" const.
(add_prefix_cmd, add_abbrev_prefix_cmd, apropos_cmd, help_list)
(help_cmd_list): Constify.
(lookup_cmd): Update.
* cli/cli-decode.h (struct cmd_list_element) <prefixname>: Now
const.
(help_cmd_list, apropos_cmd): Update.
* cli/cli-script.c (show_user): Update.
* cli/cli-setshow.c (cmd_show_list): Make "prefix" const.
* cli/cli-setshow.h (cmd_show_list): Update.
* command.h (add_prefix_cmd, add_abbrev_prefix_cmd, help_list)
(cmd_show_list): Update.
* guile/scm-cmd.c (cmdscm_destroyer): Update.
* python/py-cmd.c (cmdpy_destroyer): Update.
2014-07-24 11:30:04 -06:00
Doug Evans
06eb158633
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.
2014-06-03 01:58:15 -07:00
Doug Evans
e698b8c41c
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.
2014-06-03 00:29:49 -07:00