aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
AgeCommit message (Collapse)AuthorFilesLines
2002-08-272002-08-27 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+2
* cli/cli-script.h (copy_command_lines): Export. * breakpoint.c: Include cli/cli-script.h. * Makefile.in (breakpoint.o): Update dependencies.
2002-08-272002-08-26 Joel Brobecker <brobecker@gnat.com>Michael Snyder1-0/+30
* cli/cli-script.c (copy_command_lines): New function. * defs.h (copy_command_lines): Export. * testsuite/gdb.base/commands.exp: New tests for commands attached to a temporary breakpoint, and for commands that delete the breakpoint they are attached to. 2002-08-26 Michael Snyder <msnyder@redhat.com> * breakpoint.c (bpstat_stop_status): Instead of copying the pointer to the breakpoint commands struct, make a new copy of the struct and point to that. (bpstat_clear): Free the commands struct. (bpstat_clear_actions): Free the commands struct. (bpstat_do_actions): Free the command actions. Also execute the local cleanups, instead of deleting them. (delete_breakpoint): Leave the commands field of the bpstat chain alone -- it will be freed later.
2002-08-09 * cli/cli-dump.c: Change fopen modes to use binary open modesCorinna Vinschen1-13/+13
as defined in include/fopen-bin.h throughout.
2002-08-07 * cli/cli-dump.c (add_dump_command): Explicitely use "b" flag toCorinna Vinschen1-2/+2
write dump file binary.
2002-07-302002-07-30 Andrew Cagney <ac131313@redhat.com>Andrew Cagney4-2/+3
* symtab.h: Replace #include "gdb_obstack.h" with opaque declaration. * cli/cli-cmds.c, cli/cli-script.c: Include "gdb_string.h". * gnu-v3-abi.c, arc-tdep.c, cli/cli-decode.c: Ditto. * avr-tdep.c, mon960-rom.c, i960-tdep.c: Ditto. * arch-utils.c, cli/cli-setshow.c: Unconditionally include "gdb_string.h". * Makefile.in (cli-script.o, cli-cmds.o): Update dependencies. (gnu-v3-abi.o, cli-setshow.o, i960-tdep.o): Ditto. (cli-decode.o, mi-cmd-var.o, mi-cmd-disas.o): Ditto. (avr-tdep.o, mon960-rom.o): Ditto. (aout_stabs_gnu_h): Define. (symtab_h): Remove $(gdb_obstack_h).
2002-07-032002-07-03 Martin M. Hunt <hunt@redhat.com>Martin Hunt1-0/+20
* top.c (execute_command): Use cmd_func() and cmd_func_p(). * cli/cli-decode.c (cmd_func_p): New function. (cmd_func): New function. * command.h: Add cmd_func() and cmd_func_p().
2002-06-26 * command.h (add_setshow_cmd): Declare.Tom Tromey1-19/+47
(add_setshow_cmd_full): Declare. * cli/cli-decode.c (add_setshow_cmd): No longer static. Now returns void. Use add_setshow_cmd_full. (add_setshow_cmd_full): New function. (add_setshow_auto_boolean_cmd): Use add_setshow_cmd_full. (add_setshow_boolean_cmd): Likewise.
2002-06-25 * cli/cli-decode.c (add_show_from_set): Fixed typo in comment.Tom Tromey1-1/+1
* target.c (initialize_targets): Fixed typo in trust-readonly-sections `show' documentation.
2002-06-15* command.h (add_setshow_auto_boolean_cmd): ReplaceAndrew Cagney2-19/+16
add_set_auto_boolean_cmd. * cli/cli-decode.c (add_setshow_auto_boolean_cmd): Replace add_set_auto_boolean_cmd. * cli/cli-decode.h (add_set_auto_boolean_cmd): Delete declaration. * mips-tdep.c (_initialize_mips_tdep): Update ``set mips mask-address'' command. (show_mask_address): Add cmd parameter. * remote.c (add_packet_config_cmd): Update. Change type of set_func and show_func to cmd_sfunc_ftype. (_initialize_remote): Update `set remote Z-packet' (show_remote_protocol_qSymbol_packet_cmd): Add cmd parameter. (show_remote_protocol_e_packet_cmd): Ditto. (show_remote_protocol_E_packet_cmd): Ditto. (show_remote_protocol_P_packet_cmd): Ditto. (show_remote_protocol_Z_software_bp_packet_cmd): Ditto. (show_remote_protocol_Z_hardware_bp_packet_cmd): Ditto. (show_remote_protocol_Z_write_wp_packet_cmd): Ditto. (show_remote_protocol_Z_read_wp_packet_cmd): Ditto. (show_remote_protocol_Z_access_wp_packet_cmd): Ditto. (show_remote_protocol_Z_packet_cmd): Ditto. (show_remote_protocol_binary_download_cmd): Ditto. (show_remote_cmd): Pass NULL to all of above.
2002-06-15* cli/cli-decode.c (add_setshow_boolean_cmd): ReplaceAndrew Cagney2-19/+45
add_set_boolean_cmd. (add_setshow_cmd): New function. * command.h (add_setshow_boolean_cmd): Replace add_set_boolean_cmd. * remote-rdi.c (_initialize_remote_rdi): Update ``set rdiheartbeat'' and ``set rdiromatzero''. * maint.c (_initialize_maint_cmds): Update commented out code. * cli/cli-decode.h (add_set_boolean_cmd): Delete declaration. * target.c (initialize_targets): Update `set trust-readonly-sections'. * remote.c (_initialize_remote): Update `set remotebreak'.
2002-06-15* cli/cli-decode.c (set_cmd_cfunc): Update.Andrew Cagney2-11/+7
(set_cmd_sfunc): Update. * command.h (cmd_cfunc_ftype, cmd_sfunc_ftype): Declare. (set_cmd_sfunc, set_cmd_cfunc): Update. * cli/cli-decode.h: Update.
2002-06-15* defs.h (auto_boolean): Declare enum.Andrew Cagney3-13/+12
* command.h (cmd_auto_boolean): Delete enum. * mips-tdep.c (mask_address_var): Update. (mips_mask_address_p): Update. (show_mask_address): Update. * remote.c (struct packet_config): Update. (update_packet_config): Update. (show_packet_config_cmd): Update. (packet_ok): Update. (add_packet_config_cmd): Update. (_initialize_remote): * command.h: Update. * cli/cli-setshow.c (parse_auto_binary_operation): Update. (do_setshow_command): Update. * cli/cli-decode.c (add_set_auto_boolean_cmd): Update. * cli/cli-decode.h: Update.
2002-05-242002-05-23 Michael Snyder <msnyder@redhat.com>Michael Snyder1-5/+3
* cli/cli-dump.c (restore_command): Use parse_and_eval_long for input, rather than parse_and_eval_address.
2002-04-122002-04-12 Michael Snyder <msnyder@redhat.com>Michael Snyder1-6/+16
* cli/cli-decode.c (help_list): Allow long lines to wrap.
2002-04-122002-04-12 Don Howard <dhoward@redhat.com>Don Howard2-0/+30
* cli/cli-cmds.c (init_cli_cmds): Add new user settable value: max_user_call_depth. (init_cmd_lists): Initialize the new value; * cli/cli-script.c (execute_user_command): Limit the call depth of user defined commands. This avoids a core-dump when user commands are infinitly recursive.
2002-04-062002-04-05 Michael Snyder <msnyder@redhat.com>Michael Snyder1-5/+5
* cli/cli-dump.c (restore_section_callback): Use paddr_nz.
2002-03-29* cli/cli-dump.c (_initialize_cli_dump): Older GCC's tolerateJim Blandy1-1/+1
unescaped newlines in string literals, but newer ones don't. So escape them.
2002-03-292002-03-26 Michael Snyder <msnyder@redhat.com>Michael Snyder2-0/+863
Andrew Cagney <cagney@redhat.com> * cli/cli-dump.c: New file. Dump memory to file, restore file to memory. * cli/cli-dump.h: New file. * Makefile.in: Add rules, dependencies for cli-dump.o.
2002-03-282002-03-27 Michael Snyder <msnyder@redhat.com>Michael Snyder1-1/+1
* breakpoint.c (_initialize_breakpoint): Clean up help string. * infcmd.c (_initialize_infcmd): Ditto. * language.c (_initialize_language): Ditto. * symfile.c (_initialize_symfile): Ditto. * top.c (_init_main): Ditto. * cli/cli-cmds.c (init_cli_cmds): Ditto.
2002-03-24* command.h: Update copyright.Andrew Cagney1-66/+5
(struct cmd_list_element): Replace definition with opaque declaration. (enum cmd_types): Document that it will eventually be moved to cli/cli-decode.h (CMD_DEPRECATED, DEPRECATED_WARN_USER): Delete macros. (MALLOCED_REPLACEMENT): Delete macro. * Makefile.in (cli_decode_h): Add $(command_h). (top.o, completer.o, maint.o): Add dependency on $(cli_decode_h). * top.c: Include "cli/cli-decode.h". * completer.c: Include "cli/cli-decode.h". * maint.c: Include "cli/cli-decode.h". * cli/cli-decode.h: Include "command.h". (enum command_class): Delete. (enum cmd_types): Comment out. (enum cmd_auto_boolean): Delete. (enum var_types): Delete.
2002-03-24* cli/cli-decode.c: Include "gdb_assert.h".Andrew Cagney1-41/+43
(add_set_or_show_cmd): New static function. (add_set_cmd): Rewrite. Use add_set_or_show_cmd. (add_show_from_set): Rewrite. Use add_set_or_show_cmd. Don't copy all fields, such as func, from the set command.
2002-03-23* defs.h (error): Add printf format attribute.Andrew Cagney1-1/+1
* thread-db.c (thread_from_lwp): Fix error format string. * stack.c (parse_frame_specification): Ditto. * cli/cli-decode.c (undef_cmd_error): Ditto. * scm-lang.c (scm_lookup_name): Ditto. * tracepoint.c (trace_error): Ditto. * remote-utils.c (usage): Ditto. * remote.c (compare_sections_command): Ditto. Fix PR gdb/328.
2002-03-19* command.h (struct cmd_list_element): Add field context.Andrew Cagney2-0/+20
(set_cmd_context, get_cmd_context): Declare. * cli/cli-decode.h: Ditto. * cli/cli-decode.c (get_cmd_context): New function. (set_cmd_context): New function. (add_cmd): Initialize context. Part of fixing PR gdb/145 and PR gdb/146.
2002-03-18* cli/cli-decode.c (cmd_type): New function.Andrew Cagney1-0/+6
* command.h (cmd_type): Declare. * infrun.c (set_schedlock_func): Call function cmd_type. * kod.c (kod_set_os): Call cmd_type. * cris-tdep.c (cris_version_update): Use function cmd_type. (cris_mode_update, cris_abi_update): Ditto.
2002-03-17* command.h: (execute_cmd_post_hook): Declare.Andrew Cagney1-0/+33
(execute_cmd_pre_hook): Declare. * cli/cli-script.c (clear_hook_in_cleanup): New function. (execute_cmd_post_hook, execute_cmd_pre_hook): New functions. Execute pre/post hook while ensuring that afterwords hook_in is cleared. * top.c (execute_command): Use execute_cmd_post_hook, and execute_cmd_pre_hook to execute pre/post commands. * infrun.c (normal_stop): Pass stop_command and not pre_hook to hook_stop_stub. (hook_stop_stub): Call execute_cmd_pre_hook.
2002-03-06* cli/cli-decode.c (set_cmd_completer): New function.Andrew Cagney3-6/+16
* command.h (set_cmd_completer): Declare. * cli/cli-decode.h (set_cmd_completer): Ditto. * breakpoint.c (_initialize_breakpoint): Use set_cmd_completer. * cli/cli-cmds.c (init_cli_cmds): Ditto. * win32-nat.c (_initialize_inftarg): Ditto. * remote-rdi.c (_initialize_remote_rdi): Ditto. * proc-api.c (_initialize_proc_api): Ditto. * hppa-tdep.c (_initialize_hppa_tdep): Ditto. * source.c (_initialize_source): Ditto. * exec.c (_initialize_exec): Ditto. * solib.c (_initialize_solib): Ditto. * top.c (init_main): Ditto. * tracepoint.c (_initialize_tracepoint): Ditto. * symfile.c (_initialize_symfile): Ditto. * printcmd.c (_initialize_printcmd): Ditto. * infcmd.c (_initialize_infcmd): Ditto. * corefile.c (_initialize_core): Ditto.
2002-02-23* cli/cli-decode.c (cmd_cfunc_eq): New function.Andrew Cagney4-3/+15
* command.h (cmd_cfunc_eq): Declare. * cli/cli-decode.h (cmd_cfunc_eq): Ditto. * cli/cli-cmds.h (is_complete_command): Change parameter to a ``struct cmd_list_element *''. * cli/cli-cmds.c (is_complete_command): Update. Use cmd_cfunc_eq. * top.c (execute_command): Pass the command to is_complete_command. * tracepoint.c: Replace function.cfunc with cmd_cfunc_eq.
2002-02-18 * cli/cli-cmds.c (compare_strings): New function.Tom Tromey1-6/+39
(complete_command): Only print each unique item once. * completer.h (complete_line): Declare. * completer.c (complete_line): New function. (line_completion_function): Use it.
2002-02-05* cli/cli-decode.c (do_cfunc, set_cmd_cfunc): New functions.Andrew Cagney4-19/+78
(do_sfunc, set_cmd_sfunc): New functions. * command.h (struct cmd_list_element): Add field func. * cli/cli-decode.h (struct cmd_list_element): Ditto. * command.h (set_cmd_sfunc, set_cmd_cfunc): Declare. * cli/cli-decode.h: Ditto. * cli/cli-decode.c (help_cmd): Test for func not cfunc/sfunc. (help_all, help_cmd_list): Ditto. (find_cmd, complete_on_cmdlist): Ditto. * top.c (execute_command): Ditto. * cli/cli-setshow.c (do_setshow_command): Call func instead of function.sfunc. * infcmd.c (notice_args_read): Fix function signature. * cli/cli-cmds.c (init_cli_cmds): Use set_cmd_sfunc. * cli/cli-decode.c (add_set_cmd): Ditto. * utils.c (initialize_utils): Ditto. * maint.c (_initialize_maint_cmds): Ditto. * infrun.c (_initialize_infrun): Ditto. * demangle.c (_initialize_demangler): Ditto. * remote.c (add_packet_config_cmd): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * cris-tdep.c (_initialize_cris_tdep): Ditto. * proc-api.c (_initialize_proc_api): Ditto. * kod.c (_initialize_kod): Ditto. * valprint.c (_initialize_valprint): Ditto. * top.c (init_main): Ditto. * infcmd.c (_initialize_infcmd): Ditto. * corefile.c (_initialize_core): Ditto. * arm-tdep.c (_initialize_arm_tdep): Ditto. * arch-utils.c (initialize_current_architecture): Ditto. (_initialize_gdbarch_utils): Ditto. * alpha-tdep.c (_initialize_alpha_tdep): Ditto. * cli/cli-decode.c (add_cmd): Use set_cmd_cfunc. * wince.c (_initialize_inftarg): Ditto. * symfile.c (_initialize_symfile): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * language.c (_initialize_language): Ditto. * arc-tdep.c (_initialize_arc_tdep): Ditto.
2002-02-02s/NO_FUNCTION/NULL/Andrew Cagney3-18/+15
2002-01-17Remove else clause to #if UI_OUT.Andrew Cagney5-196/+13
2002-01-10 * completer.c (command_completer): New function.Eli Zaretskii1-1/+2
* completer.h <command_completer>: Add prototype. * cli/cli-cmds.c (init_cli_cmds): Make command_completer be the completer for the "help" command.
2001-12-25* cli/cli-script.c (execute_control_command): Replace value_ptrAndrew Cagney1-2/+2
with a struct value pointer. * ch-lang.c (evaluate_subexp_chill): Ditto. * printcmd.c (printf_command): Ditto. * tracepoint.c (set_traceframe_context): Ditto. (encode_actions): Ditto. * eval.c (evaluate_subexp_standard): Ditto.
2001-12-20 * cli/cli-decode.c (add_cmd): Initialize pre_show_hook inJeff Law1-0/+1
the new command.
2001-12-13gdb/ChangeLogJackie Smith Cashion1-7/+5
2001-12-13 Jackie Smith Cashion <jsmith@redhat.com> * cli/cli-script.c (print_command_lines): Remove extra "if", "else", "while", and "end" from show user output. testsuite/ChangeLog 2001-12-13 Jackie Smith Cashion <jsmith@redhat.com> * gdb.base/commands.exp (user_defined_command_test): Make "show user" test expect string more specific.
2001-11-22 Fix for PR gdb/209, PR gdb/156:Tom Tromey2-1/+9
* gdbarch.c, gdbarch.h: Rebuilt. * gdbarch.sh: Added `construct_inferior_arguments'. * cli/cli-decode.h (cmd_list_element): Added pre_show_hook. Typo fix. * cli/cli-setshow.c (do_setshow_command): Call the pre_show_hook. * infcmd.c (_initialize_infcmd): Set sfunc on `set args' command. (inferior_argc, inferior_argv): New globals. (notice_args_set): New function. (set_inferior_args): Clear inferior_argc and inferior_argv. (set_inferior_args_vector): New function. (get_inferior_args): Handle inferior argument vector. (run_command): Use get_inferior_args(). (notice_args_read): New function. (_initialize_infcmd): Don't call set_inferior_args. * command.h: Typo fix. (cmd_list_element): Added pre_show_hook. * main.c (captured_main): Added --args option. (print_gdb_help): Document --args. * inferior.h (construct_inferior_arguments): Declare. (set_inferior_args_vector): Likewise. * fork-child.c (construct_inferior_arguments): New function.
2001-09-30* cli/cli-decode.c (add_set_boolean_cmd): Define.Andrew Cagney2-0/+25
* cli/cli-decode.h (add_set_boolean_cmd): Declare. * command.h (add_set_boolean_cmd): Ditto. * remote.c (_initialize_remote): Use add_set_boolean_cmd for "set remotebreak"
2001-09-01Make GDB use libiberty regex implementation.Mark Kettenis2-2/+2
* gdb_regex.h: Normalize protection against multiple inclusion. Include "xregex.h" instead of "gnu-regex.h". * cli/cli-cmds.c: Include "gdb_regex.h" instead of "gnu-regex.h". * cli/cli-decode.c: Likewise. * Makefile.in (REGEX): Remove. (GDB_CFLAGS): Remove reference to gnu-regex.h in comment. (ADD_FILES, ADD_DEPS): Remove $(REGEX). (POSSLIBS): Remove. (TAGFILES_NO_SRCDIR): Remove $(POSSLIBS). (irix5-nat.o, solib.o, solib-svr4.o, source.o, symtab.o, xcoffsolib.o, cli-decode.o, cli-cmd.o): Replace gnu-regex.h with gdb_regex.h in list of dependencies. (gnu-regex.o): Remove rule. * gnu-regex.c, gnu-regex.h: Remove files.
2001-08-02* cli/cli-decode.h: Include "gdb_regex.h" instead ofMark Kettenis1-1/+1
"gnu-regex.h".
2001-07-162001-07-16 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-1/+5
* top.c (is_complete_command, init_cmd_lists, init_cli_cmds, execute_user_command, do_setshow_command, get_prompt, init_proc, serial_log_command): Remove extern declarations. Include cli/cli-cmds.h, cli/cli-script.h, cli/cli-setshow.h, serial.h. * gdbcmd.h (execute_user_command): Remove declaration, it's already in cli/cli-script.h. * command.h (do_setshow_command): Remove declaration, it's already in cli/cli-setshow.h. * infrun.c: Include "cli/cli-script.h" for execute_user_command. * Makefile.in (infrun.o): Update dependencies. (top.o): Ditto. * cli/cli-setshow.h: Add comment for do_setshow_command.
2001-07-16 * cli/cli-cmds.c (shell_escape) [GLOBAL_CURDIR]: Condition theEli Zaretskii1-6/+1
call to chdir on this symbol rather than on __DJGPP__. (CANT_FORK) [__MSDOS__]: Move from here... * defs.h (CANT_FORK) [__MSDOS__]: ...to here. (GLOBAL_CURDIR) [__MSDOS__]: Define.
2001-06-172001-06-17 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-0/+1
From 2001-06-15 Eirik Fuller <eirik@hackrat.com> * cli/cli-script.c (free_command_lines): Reset list pointer.
2001-06-06 * source.c (mod_path, openp): Use #ifdef HAVE_DOS_BASED_FILE_SYSTEMEli Zaretskii1-2/+2
instead of #if HAVE_DOS_BASED_FILE_SYSTEM. * completer.c: Ditto. * cli/cli-cmds.c (cd_command): Ditto.
2001-06-04 * source.c (mod_path, openp): Use HAVE_DOS_BASED_FILE_SYSTEMEli Zaretskii1-10/+12
instead of system-specific define's like _WIN32 and __MSDOS__. Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. (top-level): #include "filenames.h". * solib.c (solib_open): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_CHAR, ROOTED_P and SLASH_P. (top-level): #include "filenames.h". * defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions. (SLASH_STRING): Define only for _WIN32. * completer.c: Use HAVE_DOS_BASED_FILE_SYSTEM instead of __MSDOS_. * cli/cli-cmds.c (cd_command): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. Replace system-specific ifdefs with HAVE_DOS_BASED_FILE_SYSTEM. (top-level): #include "filenames.h".
2001-05-12s/ui_out_list/ui_out_tupple/Andrew Cagney1-6/+6
2001-03-28* config/pa/xm-hppah.h (malloc): Really delete declarationAndrew Cagney1-1/+1
(MALLOC_INCOMPATIBLE): Really delete macro. * cli/cli-cmds.c (apropos_command): Use xcalloc.
2001-03-19Zap __STDC__ references.Andrew Cagney1-8/+0
2001-03-132001-03-13 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-2/+2
From Steven Johnson <sjohnson@neurizon.net> * cli/cli-script.c (define_command): Fix setting of post hooks.
2001-03-06Update/correct copyright notices.Kevin Buettner7-7/+9
2001-02-19 * demangle.c (demangling_style_names): New variable.Eli Zaretskii1-4/+6
(_initialize_demangler): Fill demangling_style_names with the names of known demangling styles from libiberty_demanglers[]. Use add_set_enum_cmd instead of add_set_cmd, to get completion on demangling style names. * proc-api.c (_initialize_proc_api): Make `procfs-file' use file-name completion. * remote-rdi.c (_initialize_remote_rdi): Ditto for `rdilogfile'. * solib.c (_initialize_solib): Ditto for `solib-search-path' and `solib-absolute-prefix'. * tracepoint.c (_initialize_tracepoint): Ditto for `save-tracepoints'. * win32-nat.c (_initialize_inftarg): Ditto for `dll-symbols'. * cli/cli-cmds.c (init_cli_cmds): Make `shell' and `make' use file-name completion. * infcmd.c (_initialize_infcmd): Make the following commands use the file-name completer: `tty', `args', `path', `paths', and `run'.