summaryrefslogtreecommitdiff
path: root/gdb/command.c
Commit message (Collapse)AuthorAgeFilesLines
* 2000-12-01 Fernando Nasser <fnasser@redhat.com>Fernando Nasser2000-12-011-2080/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cli/cli-decode.c: New file. Handle lists of commands, their decoding and documentation. (add_cmd, deprecate_cmd, add_abbrev_cmd, add_alias_cmd, add_prefix_cmd, add_abbrev_prefix_cmd, not_just_help_class_command, empty_sfunc, add_set_cmd, add_set_enum_cmd, add_set_auto_boolean_cmd, add_show_from_set, delete_cmd, apropos_cmd, help_cmd, help_list, help_all, print_doc_line, help_cmd_list, find_cmd, lookup_cmd_1, undef_cmd_error, lookup_cmd, deprecated_cmd_warning, lookup_cmd_composition, complete_on_cmdlist, complete_on_enum): Moved here from command.c. (add_info, add_info_alias, add_com, add_com_alias): Moved here from top.c. * cli/cli-decode.h: Definitions/declarations for the above. * cli/cli-cmds.c: New file. GDB CLI commands. (error_no_arg, info_command, show_command, help_command, show_version, quit_command, pwd_command, cd_command, echo_command, shell_escape, make_command, show_user, set_debug, show_debug, init_cmd_lists): Moved here from top.c. (apropos_command): Moved here from command.c. (complete_command, source_command): Moved here (part) from top.c. (is_complete_command): New function. Checks if a command is the "complete" command. (init_cli_cmds): New function. Add commands to the CLI (from code previously in top.c. * cli/cli-cmds.h: Definitions/declarations for the above. * cli/cli-script.c: New file. GDB CLI command scripting. (build_command_line, get_command_line, print_command_lines, print_command_line, execute_user_command, execute_control_command, while_command, if_command, arg_cleanup, setup_user_args, locate_arg, insert_args, realloc_body_list, read_next_line, recurse_read_control_structure, read_command_lines, free_command_lines, do_free_command_lines_cleanup, make_cleanup_free_command_lines, validate_comname, user_defined_command, define_command, document_command, source_cleanup_lines, do_fclose_cleanup, show_user_1): Moved here from top.c. (script_from_file): New function. Implements execution of a script contained in a file (part of code for the source_command() that used to exist in top.c). * cli/cli-script.h: Definitions/declarations for the above. * cli/cli-setshow.c: New file. Handle set and show GDB CLI commands. (parse_auto_binary_operation, parse_binary_operation, do_setshow_command, cmd_show_list): Moved here from command.c. * cli/cli-setshow.h: Definitions/declarations for the above. * top.c: Remove all CLI code, except the command loop. (gdb_init): Call init_cli_cmds(). * command.c: Remove obsolete file. * command.h: Mark as DEPRECATED. * gdbcmd.h: Ditto. * call-cmds.h: Ditto. * Makefile.in (SFILES): Remove command.c. (COMMON_OBS): Remove command.o. (command.o): Remove obsolete target. (cli_decode_h, cli_cmds_h, cli_script_h, cli_setshow_h): New macros. Refer to CLI header files. (cli-decode.o, cli-cmds.o, cli-setshow.o, cli-script.o): New targets. (SUBDIR_CLI_OBS, SUBDIR_CLI_SRCS, SUBDIR_CLI_DEPS, SUBDIR_CLI_INITS, SUBDIR_CLI_LDFLAGS, SUBDIR_CLI_CFLAGS, SUBDIR_CLI_ALL, SUBDIR_CLI_CLEAN, SUBDIR_CLI_INSTALL, SUBDIR_CLI_UNINSTALL): New macros for new cli subdirectory. * configure.in (enable_gdbcli): New option. Include the CLI in the executable (cannot be disabled yet). (CONFIG_OBS, CONFIG_DEPS, CONFIG_SRCS, CONFIG_INITS, ENABLE_CFLAGS, CONFIG_ALL, CONFIG_CLEAN, CONFIG_INSTALL, CONFIG_UNINSTALL): Add the corresponding SUBDIR_CLI_* macros if CLI requested. * configure: Regenerate.
* 2000-11-06 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser2000-11-061-9/+26
| | | | | | | | | | | | | | | | | | | | | | From Steven Johnson <sbjohnson@ozemail.com.au>: This set of changes add "hookpost-" as an expansion on the original hooking of commands to GDB. A Hook may now be run "AFTER" execution of a command as well as before. * command.h (struct cmd_list_element): Changed elements hook and hookee to hook_pre and hookee_pre respectively. Added hook_post and hookee_post for the post hook command operation. Added hook_in so that an executing hook can be flagged to prevent recursion. * command.c (add_cmd): Changed initilization of cmd_list_element to reflect above changes. (delete_cmd): Remove both pre and post hooks. (help_cmd): Notify that the command has pre and/or post hooks. * infrun.c (normal_stop): Change references to hook_pre from hook. * top.c (execute_command): Run both pre and post hooks. (define_command): Allow definition of both pre and post hooks. The definition of pre-hooks is done as before, with the "hook-" prefix for backward compatibility.
* * eval.c (parse_and_eval_long): New function.David Taylor2000-10-301-3/+3
| | | | | | | | | | | | | | | | * value.h: Declare it. * breakpoint.c (breakpoints_info, maintenance_info_breakpoints): Call parse_and_eval_long, not parse_and_eval_address. * command.c (do_setshow_command): Ditto. * infcmd.c (step_1, signal_command, continue_command): Ditto. * infrun.c (signals_info): Ditto. * stack.c (set_backtrace_limit_command, backtrace_command_1, up_silently_base, down_silently_base): Ditto. * tracepoints.c (tracepoints_info, trace_find_command, trace_find_tracepoint_command): Ditto. * valprint.c (set_radix): Ditto. * values.c (show_values): Ditto.
* Corrected spelling errors in commentsDavid Anderson2000-10-231-1/+1
|
* Protoize.Kevin Buettner2000-08-081-32/+12
|
* Protoization.gdb-post-protoization-2000-07-29Kevin Buettner2000-07-301-89/+32
|
* 2000-07-11 Scott Bambrough <scottb@netwinder.org>Scott Bambrough2000-07-111-1/+1
| | | | | * command.c (do_setshow_command): Fix typo in var_auto_boolean case.
* Add support for auto_boolean (true, false or auto).Andrew Cagney2000-06-231-6/+90
|
* Change signature of function add_set_enum_cmd() so that it usesAndrew Cagney2000-06-081-9/+8
| | | | | constant character pointers. Update everything. As a consequence fix infrun's follow-fork plugging a small memory leak.
* Accept an enum immediately when it is an exact match - wouldn't acceptAndrew Cagney2000-06-061-2/+11
| | | | ``d10v'' when the choice was d10v{,:ts2,:ts3}.
* Eliminate PARAMS from function pointer declarations.gdb-post-params-removal-2000-06-04Kevin Buettner2000-06-041-4/+4
|
* PARAMS removal.gdb-post-params-removal-2000-05-28Kevin Buettner2000-05-281-12/+12
|
* Fix signature of add_set_enum_cmd. Change VAR parameter to char**.Andrew Cagney2000-05-161-14/+12
| | | | Cleanup signature of add_set_cmd. Change VAR parameter to void*.
* Use make_cleanup_ui_out_stream_delete().Andrew Cagney2000-05-151-1/+1
|
* Make help_all static.Andrew Cagney2000-04-211-2/+3
|
* Fri Mar 24 12:10:38 2000 glen mccready <gkm@pobox.com>Glen Mccready2000-04-201-0/+27
| | | | | * command.c, command.h (help_all): Add functionality to display a complete listing of available commands.
* 2000-03-23 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser2000-03-231-4/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | From David Whedon <dwhedon@gordian.com> * top.c (execute_command): Checks all commands beore executing to see if the user needs to be warned that the command is deprecated, warns user if appropriate. (add_info), (add_info_alias), (add_com) , (add_com_alias): Changed return values from void to struct cmd_list_element *. * command.c (lookup_cmd_1): Check aliases before following link in case user needs to be warned about a deprecated alias. (deprecate_cmd): new exported function for command deprecation, sets flags and posibly a replacement string. (deprecated_cmd_warning): New exported funciton to warn user about a deprecated command. (lookup_cmd_composition): New exported function that determines alias, prefix_command, and cmd based on a string. This is useful is we want to full name of a command. * command.h : Added prototypes for deprecate_cmd, deprecated_warn_user and lookup_cmd_composition, added flags to the cmd_list_element structure, changed return values for add_com_* and add_info_* from void to cmd_list_element. * maint.c : (maintenance_deprecate): New function to deprecate a command. This exists only so that the testsuite can deprecate commands at runtime and check the warning behavior. (maintenance_undeprecate) : New function, drops deprecated flags. (maintenance_do_deprecate): Actually does the (un)deprecation. (initialize_maint_cmds): Added the above new deprecate commands.
* Added the apropos commandDaniel Berlin2000-03-231-1/+87
|
* Document requirements on adding a ``!'' command.Andrew Cagney2000-03-201-0/+6
|
* Replace ../include/wait.h with gdb_wait.h.Andrew Cagney2000-02-091-7/+1
|
* import gdb-2000-02-02 snapshotJason Molenda2000-02-031-0/+102
|
* import gdb-2000-02-01 snapshotJason Molenda2000-02-021-8/+8
|
* import gdb-1999-10-04 snapshotJason Molenda1999-10-051-5/+3
|
* import gdb-1999-09-08 snapshotStan Shebs1999-09-091-2/+0
|
* import gdb-1999-08-30 snapshotJason Molenda1999-08-311-3/+0
|
* import gdb-1999-08-23 snapshotJason Molenda1999-08-231-3/+28
|
* import gdb-1999-08-09 snapshotJason Molenda1999-08-091-0/+2
|
* import gdb-1999-07-12 snapshotJason Molenda1999-07-121-2/+1
|
* import gdb-1999-07-07 post reformatJason Molenda1999-07-071-187/+191
|
* import gdb-1999-05-25 snapshotJason Molenda1999-05-251-0/+7
|
* import gdb-1999-0519Jason Molenda1999-05-191-1/+1
|
* Initial revisionStan Shebs1999-04-161-0/+1564