aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
AgeCommit message (Collapse)AuthorFilesLines
2002-01-05Remove obsolete MacOS support.Andrew Cagney1-7/+4
2001-11-27 * NEWS: Updated.Tom Tromey1-0/+50
* event-loop.c (start_event_loop): Call after_char_processing_hook. * event-top.h (after_char_processing_hook): Declare. * event-top.c (rl_callback_read_char_wrapper): Call after_char_processing_hook. (after_char_processing_hook): New global. * top.c (operate_saved_history): New global. (gdb_rl_operate_and_get_next): New function. (init_main): Add the operate-and-get-next defun. (gdb_rl_operate_and_get_next_completion): New function.
2001-11-20 * top.c (gdb_init): Call init_ui_hook before initializingKeith Seitz1-4/+9
the default UI.
2001-11-10s/value_ptr/struct value */Andrew Cagney1-2/+2
2001-10-21Don't print ``(MI_OUT)'' at startup.Andrew Cagney1-5/+0
2001-10-16* value.h (value_as_address): Rename value_as_pointer.Andrew Cagney1-1/+1
* eval.c, findvar.c, gnu-v2-abi.c, gnu-v3-abi.c, jv-lang.c, jv-valprint.c, printcmd.c, stack.c, top.c, valarith.c, valops.c, values.c: Update.
2001-09-07* defs.h (enum return_reason): Renumber so that all values areAndrew Cagney1-34/+81
negative. (RETURN_MASK): Negate reason. (catch_exception_ftype): Declare. (catch_exceptions): Declare. * top.c (catcher): New function, based on catch_errors. Add in parameter func_uiout and out parameters func_val, func_caught and func_cleanup. Change type of func to catch_exceptions_ftype. Save/restore uiout. (struct catch_errors_args): Define. (do_catch_errors): New function. (catch_errors): Rewrite, use do_catch_errors and catcher. (catch_exceptions): New function, use catcher.
2001-08-27* event-top.c (async_stop_sig) [HAVE_SIGPROCMASK]: SomeMark Kettenis1-13/+9
gratuitious whitespace changes. [!HAVE_SIGPROCMASK]: Call sigsetmask if HAVE_SIGSETMASK is defined. * top.c: Remove redundant logic to define HAVE_SIGSETMASK. (sigsetmask) Don't define macro. (stop_sig) [HAVE_SIGPROCMASK]: Add bit of code snatched from async_stop_sig from event-top.c. [!HAVE_SIGPROCMASK]: Call sigsetmask if HAVE_SIGSETMASK is defined. * configure.in (AC_CHECK_FUNCS): Put functions in alphabetical order. Add sigsetmask. (AC_FUNC_VFORK, AC_FUNC_ALLOCA): Reorder such that they're in alphabetical order. * config/xm-aix4.h, config/alpha/xm-alphalinux.h, config/i386/xm-cygwin.h, config/rs6000/xm-rs6000.h (HAVE_SIGSETMASK): Remove. * aclocal.m4, config.in, configure
2001-08-14* top.c (SIGSETJMP): Protect env argument with parentheses.Christopher Faylor1-3/+3
(SIGLONGJMP): Protect env argument with parentheses.
2001-08-01* defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)Andrew Cagney1-0/+1
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT) (HOST_LONG_DOUBLE_FORMAT, DOUBLEST) (floatformat_to_doublest, floatformat_from_doublest) (floatformat_is_negative, floatformat_is_nan) (floatformat_mantissa, store_floating) (extract_floating): Move declaration from here. * doublest.h: To here. New file. * utils.c (get_field, floatformat_to_doublest, put_field) (ldfrexp, floatformat_from_doublest, floatformat_is_negative) (floatformat_is_nan, floatformat_mantissa) (FLOATFORMAT_CHAR_BIT): Move from here. * doublest.c: To here. New file. * findvar.c (store_floating, extract_floating): Move from here. * doublest.c: To here. * Makefile.in (SFILES): Add doublest.c. (COMMON_OBS): Add doublest.o. (doublest.o): Specify dependencies. (doublest_h): Define. * config/m88k/tm-m88k.h: Include "doublest.h". * config/i960/tm-i960.h: Ditto. * config/i386/tm-symmetry.h: Ditto. * rs6000-tdep.c, valarith.c: Ditto. * valprint.c, stabsread.c, sh-tdep.c: Ditto. * ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto. * values.c, arm-tdep.c, arm-linux-tdep.c: Ditto. * alpha-tdep.c, ax.h, expression.h: Ditto. * sh-tdep.c, parse.c, top.c, value.h: Ditto. * Makefile.in (arm-tdep.o): Add $(doublest_h). (i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto. (rs6000-tdep.o, stabsread.o, valarith.o): Ditto. (values.o, valprint.o, arm-linux-tdep.o): Ditto. (alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto. (parser_defs_h): Ditto. (expression_h): Add $(doublest_h) and $(symtab_h).
2001-07-172001-07-17 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-2/+2
* top.c (catch_errors): Convert PTR to void * in parameters list. (quit_cover): Ditto.
2001-07-162001-07-16 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-2/+0
* top.c (show_commands): Remove extern decl of history_get, it's already in readline/history.h.
2001-07-162001-07-16 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-21/+4
* 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-152001-07-15 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-120/+79
* top.c (quit_cover, float_handler): Move definition up before use. (gdb_init): Move to end of file, to avoid calls to not yet defined functions. Delete prototypes.
2001-07-152001-07-15 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-20/+0
* top.c (readline_line_completion_function, noop_completer): Move from here... * completer.c (readline_line_completion_function, noop_completer): ...to here. * gdbcmd.h (readline_line_completion_function, noop_completer): Move declarations from here... * completer.h (readline_line_completion_function, noop_completer): ...to here. * corefile.c: Include completer.h. * source.c: Ditto. * symfile.c: Ditto. * Makefile.in: Update dependencies.
2001-07-14 * utils.c (query): Remove tui hacks; tui must use the query_hook.Stephane Carrez1-25/+0
* top.c (command_loop): Remove tui insert_mode hacks; don't call tuiCleanUp because this must be made with atexit by tui. * symfile.c (symbol_file_command): Remove call to TUIDO * stack.c (show_and_print_stack_frame_stub): Remove tui check; not necessary when using the selected frame hooks. (print_stack_frame_stub): Likewise. (print_frame_info_base): Likewise. (print_frame_info): Likewise. (up_silently_command): Likewise. (down_silently_command): Likewise. (show_stack_frame): Likewise for TUIDO. (select_frame): Likewise. (select_and_print_frame): Likewise. (stack_publish_stopped_with_no_frame): Remove. (select_and_maybe_print_frame): Remove. * main.c (captured_main): Remove tui_fileopen and tuiInit; tui must use the initialize ui hook. * infrun.c (normal_stop): Remove call to TUIDO; tui must use the selected frame hooks. * event-top.c (command_handler): Remove tui insert_mode hack. * defs.h: Remove TUIDO; Only include tui.h. * breakpoint.c (mention): Remove calls to TUIDO. (delete_breakpoint): Remove tui hacks; tui must install the breakpoint hooks.
2001-05-17 * top.c (user_args): Remove unused declaration.Eli Zaretskii1-15/+0
2001-05-04Phase 1 of the ptid_t changes.Kevin Buettner1-3/+4
2001-04-19Obsolete MPW as host.Andrew Cagney1-5/+5
2001-04-192001-04-18 Martin M. Hunt <hunt@redhat.com>Martin Hunt1-12/+13
* top.c (gdb_init): Don't call cli_out_new() to create global uiout if init_ui_hook is set. uiout will have to be initialized there.
2001-04-052001-04-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni1-0/+6
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-03-07 * top.c (init_main): Make `set history file name' complete on fileEli Zaretskii1-5/+6
names.
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2001-02-06* signals.h: Removed.J.T. Conklin1-1/+1
* 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-01-252001-01-24 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-1/+1
* top.c (print_gdb_version): Update Copyright year.
2000-12-202000-12-20 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-2/+2
* 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-15Replace free() with xfree().Kevin Buettner1-7/+7
2000-12-012000-12-01 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-1881/+34
* 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-012000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser1-386/+1
* 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-11-27* remote.c (remote_write_bytes): Add default case to switchAndrew Cagney1-0/+2
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-16 * tracepoint.c (trace_find_tracepoint_command): Replace call toDavid Taylor1-1/+1
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-062000-11-06 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser1-9/+57
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-10-31Protoization.Kevin Buettner1-15/+9
2000-10-23Corrected spelling errors in commentsDavid Anderson1-4/+4
2000-08-01* top.c (get_prompt_1), tracepoint.c (replace_comma): UpdateAndrew Cagney1-1/+2
function signatures so that they match catch_errors and make_cleanup callbacks. * tracepoint.c (encode_actions): Fix arguments passed to stringify_collection_list.
2000-07-30Protoization.Kevin Buettner1-184/+75
2000-07-05Replace command_loop_marker() with null_cleanup().Andrew Cagney1-16/+2
2000-06-04Eliminate PARAMS from function pointer declarations.Kevin Buettner1-27/+27
2000-05-28PARAMS removal.Kevin Buettner1-50/+49
2000-05-22Eliminate make_cleanup_func from top.cAndrew Cagney1-18/+44
2000-04-26 * ax-gdb.c (agent_command): Remove now useless cast ofPhilippe De Muyter1-8/+5
`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-12 * top.c (gdb_completer_file_name_break_characters): New variable.Eli Zaretskii1-0/+12
(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-06 * top.c (filename_completer): Set subsequent_name to 1 early on,Eli Zaretskii1-1/+5
to prevent an infinite loop if the first file in the directory is a backup file.
2000-04-03Re-indent (almost). Several cases where indent was getting it wrongAndrew Cagney1-32/+36
were omitted.
2000-03-28The set debug changesDaniel Berlin1-4/+38
2000-03-28Bump copyright to 2000.Andrew Cagney1-1/+1
2000-03-232000-03-23 Fernando Nasser <fnasser@cygnus.com>Fernando Nasser1-10/+15
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-02-24 * top.c (SIGJMP_BUF, SIGSETJMP, SIGLONGJMP): Update comments.Nicholas Duffek1-57/+78
(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-23Add mi/ and testsuite/gdb.mi/ subdirectories.Andrew Cagney1-0/+11
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-09From JTC: Reduce default remote_timeout to two. Flush defunct code.Andrew Cagney1-1/+19