Commit Graph

160 Commits

Author SHA1 Message Date
Elena Zannoni 0191bed77d 2001-04-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From  Jimmy Guo  <guo@cup.hp.com>
        * top.c (init_main): set prompt if annotation_level>1,
        this is necessary when annotation_level is set to 2 via
        --annotate=2 command line option.
2001-04-05 15:19:42 +00:00
Eli Zaretskii 7a1bd56a08 * top.c (init_main): Make `set history file name' complete on file
names.
2001-03-07 07:21:13 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
J.T. Conklin 042be3a9b3 * signals.h: Removed.
* event-top.c (#include <signal.h>): Changed from signals.h.
* inflow.c: Likewise.
* mac-xdep.c: Likewise.
* ser-pipe.c: Likewise.
* ser-tcp.c: Likewise.
* standalone.c: Likewise.
* top.c: Likewise.
* utils.c: Likewise.
* Makefile.in: Removed signals.h from dependencies.
2001-02-06 04:17:03 +00:00
Fernando Nasser 388e1ff2e5 2001-01-24 Fernando Nasser <fnasser@redhat.com>
* top.c (print_gdb_version): Update Copyright year.
2001-01-25 15:19:30 +00:00
Fernando Nasser b4df4f6849 2000-12-20 Fernando Nasser <fnasser@redhat.com>
* Makefile.in (UIOUT_CFLAGS): New macro. CFLAGS needed for uiout code
        to be compiled.  Defines UI_OUT.
        (SUBDIR_MI_CFLAGS): Defines MI_OUT, not UI_OUT.
        (INTERNAL_WARN_CFLAGS): Also include UIOUT_CFLAGS.
        * configure.in (UIOUT_CFLAGS): New configuration variable.
        (--with-uiout): New configuration option.  Causes uiout code to
        be compiled, instead of the old *printf one.
        * configure: Regenerate.
        * top.c (print_gdb_version): Test for and print MI_OUT, not UI_OUT.
        * testsuite/lib/mi-support.exp (mi_gdb_start): Test for MI_OUT,
        not UI_OUT.
2000-12-20 21:24:28 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Fernando Nasser d318976c46 2000-12-01 Fernando Nasser <fnasser@redhat.com>
* 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-12-01 18:01:38 +00:00
Fernando Nasser c5f0f3d0c8 2000-11-30 Fernando Nasser <fnasser@redhat.com>
* linespec.h: New file. Declarations for linespec.c.
        * linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c,
        symtab.c, tracepoint.c: Include the above.
        * completer.c: New file. Line completion stuff for GDB.
        (get_gdb_completer_word_break_characters,
        get_gdb_completer_quote_characters): New functions. Accessors for
        useful completer internal data.
        (filename_completer, line_completion_function, skip_quoted): Moved
        here from top.c.
        * completer.h: New file. Declarations for the above.
        * linespec.c (decode_line_1): Use
        get_gdb_completer_word_break_characters and
        get_gdb_completer_quote_characters.
        * top.c: Include completer.h.
        (filename_completer, line_completion_function, skip_quoted):
        Moved to completer.c.
        * corefile.c, exec.c, source.c, symfile.c, linespec.c: Include
        completer.h.
        * Makefile.in (SFILES): Add completer.c.
        (COMMON_OBS): Add completer.o.
        (completer.o): New target.
        (linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o,
        symtab.o, tracepoint.o): Add linespec.h to dependencies list.
        (corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h
        to dependencies list.
2000-12-01 00:43:47 +00:00
Andrew Cagney 7f7e9482db * remote.c (remote_write_bytes): Add default case to switch
initializing ``todo''. Ditto for ``nr_bytes''.
* top.c (catch_errors): Always initialize ``val''.
* solib.c (info_sharedlibrary_command): Handle bfd_get_arch_size
returning an unknown size.
* gdbtypes.c (count_virtual_fns): Always initialize ``vfuncs''.
* breakpoint.c (break_at_finish_at_depth_command_1): Initialise
extra_args to NULL.
(break_at_finish_command_1): Ditto.
2000-11-27 02:18:44 +00:00
David Taylor 0e828ed163 * tracepoint.c (trace_find_tracepoint_command): Replace call to
parse_and_eval_address with a call to parse_and_eval_long as
	we are evaluating an integer, not an address.
	* top.c (show_commands): Ditto.
2000-11-16 14:51:50 +00:00
Fernando Nasser 73bc900df9 2000-11-06 Fernando Nasser <fnasser@cygnus.com>
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.
2000-11-06 22:44:34 +00:00
Kevin Buettner 10689f25cd Protoization. 2000-10-31 05:49:55 +00:00
David Anderson e26cc3490a Corrected spelling errors in comments 2000-10-23 22:49:29 +00:00
Andrew Cagney 710b33bd11 * top.c (get_prompt_1), tracepoint.c (replace_comma): Update
function signatures so that they match catch_errors and
make_cleanup callbacks.
* tracepoint.c (encode_actions): Fix arguments passed to
stringify_collection_list.
2000-08-01 05:06:03 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Andrew Cagney e2273c6d9d Replace command_loop_marker() with null_cleanup(). 2000-07-05 10:36:41 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney e41a3b1ac5 Eliminate make_cleanup_func from top.c 2000-05-22 05:43:39 +00:00
Philippe De Muyter c13c43fdda * ax-gdb.c (agent_command): Remove now useless cast of
`free_current_contents' when passed to `make_cleanup'.
	* coffread.c (coff_symfile_read): Ditto.
	* dwarf2read.c (dwarf2_add_member_fn, read_array_type): Ditto.
	(dwarf_decode_lines): Ditto.
	* eval.c (parse_and_eval_address, parse_and_eval_address_1): Ditto.
	(parse_and_eval, parse_to_comma_and_eval): Ditto.
	* parse.c (parse_exp_1): Ditto.
	* printcmd.c (print_command_1, output_command, set_command): Ditto.
	(x_command, print_frame_args, printf_command): Ditto.
	* top.c (execute_control_command): Ditto.
	* tracepoint.c (validate_actionline): Ditto.
	* typeprint.c (whatis_exp, ptype_command): Ditto.
	(maintenance_print_type): Ditto.
2000-04-26 12:41:48 +00:00
Eli Zaretskii ae678129eb * top.c (gdb_completer_file_name_break_characters): New variable.
(line_completion_function): When completing on file names, use
	gdb_completer_file_name_break_characters as word break
	characters for the readline library.
2000-04-12 16:43:27 +00:00
Eli Zaretskii bcea15ac19 * top.c (filename_completer): Set subsequent_name to 1 early on,
to prevent an infinite loop if the first file in the directory is
	a backup file.
2000-04-06 15:24:36 +00:00
Andrew Cagney eb2f494ab0 Re-indent (almost). Several cases where indent was getting it wrong
were omitted.
2000-04-03 05:30:13 +00:00
Daniel Berlin 5d161b2419 The set debug changes 2000-03-28 02:25:14 +00:00
Andrew Cagney 107b56f053 Bump copyright to 2000. 2000-03-28 02:03:53 +00:00
Fernando Nasser 5638284566 2000-03-23 Fernando Nasser <fnasser@cygnus.com>
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.
2000-03-23 23:43:19 +00:00
Nicholas Duffek 99eeeb0ff7 * top.c (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP): Update comments.
(error_return, quit_return): Merge into catch_return pointer.
	(return_to_top_level): Update comment.  Longjmp to *catch_errors,
	and communicate reason to catch_errors via setjmp return value.
	(catch_errors): Always catch both quit and error, and if a catch
	wasn't requested by caller, throw it to the next catch_error.
	Replace dual longjmp buffer memcpy with single pointer change.
	Add FIXME for possibly adding new interface to tell caller what
	event was caught.  Add extensive comments.
	* defs.h (enum return_reason): Reserve 0 for use as initial
	setjmp() return value.
	(RETURN_MASK): New public macro to generate RETURN_MASK_* from
	enum return_reason.
	(RETURN_MASK_QUIT, RETURN_MASK_ERROR): Define using RETURN_MASK.
2000-02-24 00:04:03 +00:00
Andrew Cagney fb40c20903 Add mi/ and testsuite/gdb.mi/ subdirectories.
Add --enable-gdbmi option to configury.
Add mi rules to Makefile.in
Add mi conditional output to event-top.c infrun.c main.c top.c.
Add -i=mi option.
2000-02-23 00:25:43 +00:00
Andrew Cagney ce808e9171 From JTC: Reduce default remote_timeout to two. Flush defunct code. 2000-02-09 03:28:18 +00:00
Jason Molenda 8b93c6380e import gdb-2000-02-02 snapshot 2000-02-03 04:14:45 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda da59e08184 import gdb-2000-01-31 snapshot 2000-02-01 03:19:29 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 11cf874164 import gdb-1999-11-08 snapshot 1999-11-09 01:23:30 +00:00
Jason Molenda e514a9d642 import gdb-1999-10-25 snapshot 1999-10-26 03:43:48 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda 6426a772a2 import gdb-1999-09-28 snapshot 1999-09-28 21:55:21 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda 7be570e7ce import gdb-1999-08-16 snapshot 1999-08-16 19:57:19 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda a0b3c4fd32 import gdb-1999-08-02 snapshot 1999-08-02 23:48:37 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +00:00
Jason Molenda 085dd6e638 import gdb-1999-06-28 snapshot 1999-06-28 16:06:02 +00:00
Jason Molenda 9e0b60a847 import gdb-1999-06-21 snapshot 1999-06-21 13:27:42 +00:00