Commit Graph

458 Commits

Author SHA1 Message Date
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Joel Brobecker 636265b635 * top.c (print_gdb_version): Update copyright year. 2008-01-01 04:27:43 +00:00
Maciej W. Rozycki 49d03eab05 * target.c (update_current_target): Inherit to_log_command.
* target.h (struct target_ops). Add to_log_command.
(target_log_command): New macro.
* top.c (execute_command): Call target_log_command() rather than
serial_log_command().
* monitor.c (init_base_monitor_ops): Initialize to_log_command.
* remote-m32r-sdi.c (init_m32r_ops): Likewise.
* remote-mips.c (_initialize_remote_mips): Likewise.
* remote.c (init_remote_ops): Likewise.
2007-12-07 15:02:12 +00:00
Daniel Jacobowitz 57ee890f2f * top.c (command_loop): Fix output for shrinkage. 2007-10-22 16:11:13 +00:00
Jan Kratochvil 0b93d57c33 * top.c (print_gdb_version): Fixed a string end-of-line compiler error. 2007-09-02 21:13:56 +00:00
Daniel Jacobowitz b8533aeca8 * top.c (print_gdb_version): Update for GPL version 3.
* gdb.texinfo: Update the FSF's Back-Cover Text.
2007-09-02 20:02:12 +00:00
Joel Brobecker a9762ec78a Switch the license of all .c files to GPLv3.
Switch the license of all .h files to GPLv3.
        Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Michael Snyder 91d2803c32 2007-08-08 Michael Snyder <msnyder@access-company.com>
* top.c (command_line_input): Memory leak.
2007-08-08 18:34:28 +00:00
Daniel Jacobowitz 1b05479a47 2007-07-01 Daniel Jacobowitz <dan@codesourcery.com>
* top.c (gdb_readline_wrapper_line): Call rl_callback_handler_remove.
	(struct gdb_readline_wrapper_cleanup): Remove prompt_orig.
	(gdb_readline_wrapper_cleanup): Do not reset the prompt.
	(gdb_readline_wrapper): Do not save the prompt.  Pass our prompt
	to display_gdb_prompt.

2007-07-01  Nick Roberts  <nickrob@snap.net.nz>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.base/annota3.exp: Test for if construct.
2007-07-01 22:37:52 +00:00
Daniel Jacobowitz 3adda9d8c4 * defs.h (deprecated_registers_changed_hook): Delete declaration.
* interps.c (clear_interpreter_hooks): Do not clear
	deprecated_registers_changed_hook.
	* regcache.c (registers_changed): Do not call it.
	* top.c (deprecated_registers_changed_hook): Do not define it.
	* mi/mi-interp.c (mi_command_loop): Do not clear it.
	* tui/tui-hooks.c (tui_install_hooks): Do not install it.
	(tui_remove_hooks): Do not remove it.
	(tui_selected_frame_level_changed_hook): Check for negative level.
	Use get_selected_frame.
	(tui_registers_changed_hook): Deleted.
2007-03-29 18:55:01 +00:00
Daniel Jacobowitz 7d900f1a0b * top.c (gdb_readline_wrapper_cleanup): Remove invalid assertion. 2007-02-28 15:55:54 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 2e03ee74df 2007-01-03 Jan Kratochvil <jan.kratochvil@redhat.com>
Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile.in (top.o): Update.
	* top.c (gdb_readline_wrapper_done, gdb_readline_wrapper_result)
	(saved_after_char_processing_hook, gdb_readline_wrapper_line)
	(struct gdb_readline_wrapper_cleanup, gdb_readline_wrapper_cleanup):
	New.
	(gdb_readline_wrapper): Rewrite to use asynchronous readline.

2007-01-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.base/readline.exp: Set $TERM.  Test arrow keys in
	secondary prompts.
2007-01-03 21:46:12 +00:00
Joel Brobecker 8c48ebcfed Followed the Start of New Year Procedure:
* ChangeLog-2006: New file, containing all the entries for 2006.
        * ChangeLog: Removed all 2006 entries, and changed the reference
        to the previous ChangeLog to point to ChangeLog 2006.
        * top.c (print_gdb_version): Update copyright year.
2007-01-01 05:57:49 +00:00
Andrew Stubbs 16026cd75d 2006-07-21 Andrew Stubbs <andrew.stubbs@st.com>
* cli/cli-cmds.c (source_verbose, trace_commands): New variables.
	(source_script): New function.
	(source_verbose_cleanup): New function.
	(source_command): Move old contents to source_script.
	Make function static. Parse -v option and call source_script.
	(init_cli_cmds): Update source command help.
	Add 'set trace-commands' command.
	* cli/cli-script.c (command_next_depth): New static variable.
	(suppress_next_print_command_trace): New static variable.
	(reset_command_nest_depth): New function.
	(print_command_trace): New function.
	(execute_control_command): Split the continue_control and break_control
	cases, add calls to print_command_trace and count the nest depth.
	(while_command): Set suppress_next_print_command_trace.
	(if_command): Likewise.
	* top.c (execute_command): Call print_command_trace.
	* cli/cli-cmds.h (source_verbose, trace_commands): New extern variables.
	(source_command): Change to source_script.
	* main.c (captued_main): Use source_script instead of source_command.
	* top.h (source_command): Change to source_script.
	* event-top.c (display_gdb_prompt): Call reset_command_nest_depth.
	* cli/cli-script.h (print_command_trace): Export.
	(reset_command_nest_depth): Likewise.

docs/
	* gdb.texinfo (Optional warnings and messages): Add
	'set/show trace-commands'.
	(Command files): Add '-v' to source command.

testsuite/
	* gdb.base/default.exp: Update source command error message.
	* gdb.base/help.exp: Update 'help source' message.
2006-07-21 14:46:56 +00:00
Daniel Jacobowitz 698ba9341e * Makefile.in (utils.o): Update.
* top.c (in_user_command): New.
	(command_line_input): Use input_from_terminal_p.
	(input_from_terminal_p): Don't check caution.  Handle
	stdin == NULL for Insight.
	* top.h (in_user_command, caution): New declarations.
	* utils.c: Include "top.h".
	(query, defaulted_query): Check caution here.  Move the call
	to input_from_terminal_p higher.
	* cli/cli-script.c (do_restore_user_call_depth): Only decrement
	the depth.  Update in_user_command if necessary.
	(execute_user_command): Don't clobber old_chain.  Set
	in_user_command.  Let do_restore_user_call_depth handle
	user_call_depth.
	(read_command_lines): Check whether to prompt before calling
	Insight hooks.
	* tui/tui-hooks.c (tui_query_hook): Remove newly unnecessary
	input_from_terminal_p check.
2006-03-29 22:53:33 +00:00
Daniel Jacobowitz 0ea3f30e21 * NEWS: Mention native Windows support.
* Makefile.in (gdb_select_h, ser_tcp_h): New.
	(ALLDEPFILES): Add ser-mingw.c.
	(event-loop.o, inflow.o, mingw-hdep.o, posix-hdep.o, ser-base.o)
	(ser-tcp.o, ser-unix.o): Update.
	(ser-mingw.o): New rule.
	* configure: Regenerated.
	* configure.ac: Add ser-mingw.o for mingw32.
	* ser-mingw.c: New file.
	* event-loop.c: Include "gdb_select.h".
	(gdb_select): Remove, moved to mingw-hdep.c and posix-hdep.c.
	* ser-base.c: Include "gdb_select.h".
	(ser_base_wait_for): Use gdb_select.
	* serial.c (serial_for_fd): New function.
	(serial_fdopen): Try "terminal" before "hardwire".  Initialize
	the allocated struct serial.
	(serial_wait_handle): New function.
	* serial.h (serial_for_fd, serial_wait_handle): New prototypes.
	(struct serial_ops) [USE_WIN32API]: Add wait_handle.
	* gdb_select.h: New file.
	* ser-tcp.c: Include "ser-tcp.h".  Remove unused "ser-unix.h" include.
	(net_close, net_read_prim, net_write_prim): Make global.
	(net_open): Likewise.  Pass an exception set to select.  Whitespace fix.
	Document why we can not use gdb_select.
	(_initialize_ser_tcp) [USE_WIN32API]: Do not register TCP support here.
	* ser-tcp.h: New file.
	* inflow.c (gdb_has_a_terminal): Don't initialize stdin_serial here.
	(handle_sigio): Use gdb_select.
	(initialize_stdin_serial): New function.
	* terminal.h (initialize_stdin_serial): New prototype.
	* top.c (gdb_init): Call initialize_stdin_serial.
	* mingw-hdep.c (gdb_select): New function, moved from gdb_select in
	event-loop.c.  Add exception condition support.  Use serial_for_fd
	and serial_wait_handle.  Fix timeout handling.
	* posix-hdep.c: Include "gdb_select.h".
	(gdb_select): New function.
	* remote-st.c (connect_command): Use gdb_select.
	* ser-unix.c: Include "gdb_select.h".
	(hardwire_send_break, wait_for): Use gdb_select.
2006-02-10 22:01:43 +00:00
Eli Zaretskii 3c481fdcf1 * top.c (control_level): Remove unused variable. 2006-01-07 10:22:22 +00:00
Joel Brobecker 9b799fe64b * top.c: Add 2006 to list of copyright years in file header. 2006-01-02 05:50:11 +00:00
Joel Brobecker 0bee07125f * top.c (print_gdb_version): Update copyright year to 2006. 2006-01-02 05:45:54 +00:00
Eli Zaretskii 197e01b6dc * breakpoint.c:
* arm-tdep.c:
	* ia64-tdep.c:
	* i386-tdep.c:
	* hpread.c:
	* hppa-tdep.c:
	* hppa-hpux-tdep.c:
	* gnu-nat.c:
	* gdbtypes.c:
	* gdbarch.h:
	* gdbarch.c:
	* eval.c:
	* dwarf2read.c:
	* dbxread.c:
	* copying:
	* symfile.c:
	* stabsread.c:
	* sh64-tdep.c:
	* sh-tdep.c:
	* s390-tdep.c:
	* rs6000-tdep.c:
	* remote.c:
	* remote-mips.c:
	* mips-tdep.c:
	* mdebugread.c:
	* linux-nat.c:
	* infrun.c:
	* xcoffread.c:
	* win32-nat.c:
	* valops.c:
	* utils.c:
	* tracepoint.c:
	* target.c:
	* symtab.c:
	* c-exp.y:
	* ada-valprint.c:
	* ada-typeprint.c:
	* ada-lex.l:
	* ada-lang.h:
	* ada-lang.c:
	* ada-exp.y:
	* alphafbsd-tdep.c:
	* alphabsd-tdep.h:
	* alphabsd-tdep.c:
	* alphabsd-nat.c:
	* alpha-tdep.h:
	* alpha-tdep.c:
	* alpha-osf1-tdep.c:
	* alpha-nat.c:
	* alpha-mdebug-tdep.c:
	* alpha-linux-tdep.c:
	* alpha-linux-nat.c:
	* aix-thread.c:
	* abug-rom.c:
	* arch-utils.c:
	* annotate.h:
	* annotate.c:
	* amd64obsd-tdep.c:
	* amd64obsd-nat.c:
	* amd64nbsd-tdep.c:
	* amd64nbsd-nat.c:
	* amd64fbsd-tdep.c:
	* amd64fbsd-nat.c:
	* amd64bsd-nat.c:
	* amd64-tdep.h:
	* amd64-tdep.c:
	* amd64-sol2-tdep.c:
	* amd64-nat.h:
	* amd64-nat.c:
	* amd64-linux-tdep.c:
	* amd64-linux-nat.c:
	* alphanbsd-tdep.c:
	* block.h:
	* block.c:
	* bfd-target.h:
	* bfd-target.c:
	* bcache.h:
	* bcache.c:
	* ax.h:
	* ax-general.c:
	* ax-gdb.h:
	* ax-gdb.c:
	* avr-tdep.c:
	* auxv.h:
	* auxv.c:
	* armnbsd-tdep.c:
	* armnbsd-nat.c:
	* arm-tdep.h:
	* arm-linux-nat.c:
	* arch-utils.h:
	* charset.c:
	* call-cmds.h:
	* c-valprint.c:
	* c-typeprint.c:
	* c-lang.h:
	* c-lang.c:
	* buildsym.h:
	* buildsym.c:
	* bsd-uthread.h:
	* bsd-uthread.c:
	* bsd-kvm.h:
	* bsd-kvm.c:
	* breakpoint.h:
	* core-regset.c:
	* core-aout.c:
	* completer.h:
	* completer.c:
	* complaints.h:
	* complaints.c:
	* command.h:
	* coffread.c:
	* coff-solib.h:
	* coff-solib.c:
	* coff-pe-read.h:
	* coff-pe-read.c:
	* cli-out.h:
	* cli-out.c:
	* charset.h:
	* dink32-rom.c:
	* dictionary.h:
	* dictionary.c:
	* demangle.c:
	* defs.h:
	* dcache.h:
	* dcache.c:
	* d10v-tdep.c:
	* cpu32bug-rom.c:
	* cp-valprint.c:
	* cp-support.h:
	* cp-support.c:
	* cp-namespace.c:
	* cp-abi.h:
	* cp-abi.c:
	* corelow.c:
	* corefile.c:
	* environ.c:
	* elfread.c:
	* dwarfread.c:
	* dwarf2loc.c:
	* dwarf2expr.h:
	* dwarf2expr.c:
	* dwarf2-frame.h:
	* dwarf2-frame.c:
	* dve3900-rom.c:
	* dummy-frame.h:
	* dummy-frame.c:
	* dsrec.c:
	* doublest.h:
	* doublest.c:
	* disasm.h:
	* disasm.c:
	* fork-child.c:
	* findvar.c:
	* fbsd-nat.h:
	* fbsd-nat.c:
	* f-valprint.c:
	* f-typeprint.c:
	* f-lang.h:
	* f-lang.c:
	* expression.h:
	* expprint.c:
	* exec.h:
	* exec.c:
	* exceptions.h:
	* exceptions.c:
	* event-top.h:
	* event-top.c:
	* event-loop.h:
	* event-loop.c:
	* gdb.c:
	* gdb-stabs.h:
	* gdb-events.h:
	* gdb-events.c:
	* gcore.c:
	* frv-tdep.h:
	* frv-tdep.c:
	* frv-linux-tdep.c:
	* frame.h:
	* frame.c:
	* frame-unwind.h:
	* frame-unwind.c:
	* frame-base.h:
	* frame-base.c:
	* gdb_vfork.h:
	* gdb_thread_db.h:
	* gdb_string.h:
	* gdb_stat.h:
	* gdb_regex.h:
	* gdb_ptrace.h:
	* gdb_proc_service.h:
	* gdb_obstack.h:
	* gdb_locale.h:
	* gdb_dirent.h:
	* gdb_curses.h:
	* gdb_assert.h:
	* gdbarch.sh:
	* gdb.h:
	* hpux-thread.c:
	* hppabsd-nat.c:
	* hppa-tdep.h:
	* hpacc-abi.c:
	* h8300-tdep.c:
	* gregset.h:
	* go32-nat.c:
	* gnu-v3-abi.c:
	* gnu-v2-abi.h:
	* gnu-v2-abi.c:
	* gnu-nat.h:
	* glibc-tdep.c:
	* gdbtypes.h:
	* gdbcore.h:
	* gdbcmd.h:
	* i386nbsd-tdep.c:
	* i386nbsd-nat.c:
	* i386gnu-tdep.c:
	* i386gnu-nat.c:
	* i386fbsd-tdep.c:
	* i386fbsd-nat.c:
	* i386bsd-tdep.c:
	* i386bsd-nat.h:
	* i386bsd-nat.c:
	* i386-tdep.h:
	* i386-sol2-nat.c:
	* i386-nto-tdep.c:
	* i386-nat.c:
	* i386-linux-tdep.h:
	* i386-linux-tdep.c:
	* i386-linux-nat.c:
	* i386-cygwin-tdep.c:
	* inf-ttrace.c:
	* inf-ptrace.h:
	* inf-ptrace.c:
	* inf-loop.h:
	* inf-loop.c:
	* inf-child.h:
	* inf-child.c:
	* ia64-tdep.h:
	* ia64-linux-nat.c:
	* i387-tdep.h:
	* i387-tdep.c:
	* i386v4-nat.c:
	* i386v-nat.c:
	* i386obsd-tdep.c:
	* i386obsd-nat.c:
	* kod.c:
	* jv-valprint.c:
	* jv-typeprint.c:
	* jv-lang.h:
	* jv-lang.c:
	* irix5-nat.c:
	* iq2000-tdep.c:
	* interps.h:
	* interps.c:
	* inftarg.c:
	* inflow.h:
	* inflow.c:
	* inferior.h:
	* infcmd.c:
	* infcall.h:
	* infcall.c:
	* inf-ttrace.h:
	* m32r-tdep.h:
	* m32r-tdep.c:
	* m32r-rom.c:
	* m32r-linux-tdep.c:
	* m32r-linux-nat.c:
	* m2-valprint.c:
	* m2-typeprint.c:
	* m2-lang.h:
	* m2-lang.c:
	* lynx-nat.c:
	* linux-thread-db.c:
	* linux-nat.h:
	* linespec.c:
	* libunwind-frame.h:
	* libunwind-frame.c:
	* language.h:
	* language.c:
	* macroexp.c:
	* macrocmd.c:
	* m88kbsd-nat.c:
	* m88k-tdep.h:
	* m88k-tdep.c:
	* m68klinux-tdep.c:
	* m68klinux-nat.c:
	* m68kbsd-tdep.c:
	* m68kbsd-nat.c:
	* m68k-tdep.h:
	* m68k-tdep.c:
	* mips-linux-nat.c:
	* mips-irix-tdep.c:
	* minsyms.c:
	* memattr.h:
	* memattr.c:
	* mem-break.c:
	* mdebugread.h:
	* main.h:
	* main.c:
	* macrotab.h:
	* macrotab.c:
	* macroscope.h:
	* macroscope.c:
	* macroexp.h:
	* nbsd-tdep.c:
	* mt-tdep.c:
	* monitor.h:
	* monitor.c:
	* mn10300-tdep.h:
	* mn10300-tdep.c:
	* mn10300-linux-tdep.c:
	* mipsv4-nat.c:
	* mipsread.c:
	* mipsnbsd-tdep.h:
	* mipsnbsd-tdep.c:
	* mipsnbsd-nat.c:
	* mips64obsd-tdep.c:
	* mips64obsd-nat.c:
	* mips-tdep.h:
	* mips-mdebug-tdep.c:
	* mips-linux-tdep.c:
	* osabi.h:
	* osabi.c:
	* ocd.h:
	* ocd.c:
	* observer.c:
	* objfiles.h:
	* objfiles.c:
	* objc-lang.h:
	* objc-lang.c:
	* objc-exp.y:
	* nto-tdep.h:
	* nto-tdep.c:
	* nto-procfs.c:
	* nlmread.c:
	* nbsd-tdep.h:
	* ppcobsd-tdep.c:
	* ppcobsd-nat.c:
	* ppcnbsd-tdep.h:
	* ppcnbsd-tdep.c:
	* ppcnbsd-nat.c:
	* ppcbug-rom.c:
	* ppc-tdep.h:
	* ppc-sysv-tdep.c:
	* ppc-linux-tdep.c:
	* ppc-linux-nat.c:
	* ppc-bdm.c:
	* parser-defs.h:
	* parse.c:
	* p-valprint.c:
	* p-typeprint.c:
	* p-lang.h:
	* p-lang.c:
	* remote-fileio.h:
	* remote-fileio.c:
	* remote-est.c:
	* remote-e7000.c:
	* regset.h:
	* regset.c:
	* reggroups.h:
	* reggroups.c:
	* regcache.h:
	* regcache.c:
	* proc-why.c:
	* proc-service.c:
	* proc-events.c:
	* printcmd.c:
	* ppcobsd-tdep.h:
	* sentinel-frame.h:
	* sentinel-frame.c:
	* scm-valprint.c:
	* scm-tags.h:
	* scm-lang.h:
	* scm-lang.c:
	* scm-exp.c:
	* s390-tdep.h:
	* rom68k-rom.c:
	* remote.h:
	* remote-utils.c:
	* remote-st.c:
	* remote-sim.c:
	* remote-sds.c:
	* remote-rdp.c:
	* remote-rdi.c:
	* remote-hms.c:
	* sim-regno.h:
	* shnbsd-tdep.h:
	* shnbsd-tdep.c:
	* shnbsd-nat.c:
	* sh-tdep.h:
	* serial.h:
	* serial.c:
	* ser-unix.h:
	* ser-unix.c:
	* ser-tcp.c:
	* ser-pipe.c:
	* ser-go32.c:
	* ser-e7kpc.c:
	* ser-base.h:
	* ser-base.c:
	* solib.c:
	* solib-svr4.h:
	* solib-svr4.c:
	* solib-sunos.c:
	* solib-som.h:
	* solib-som.c:
	* solib-pa64.h:
	* solib-pa64.c:
	* solib-osf.c:
	* solib-null.c:
	* solib-legacy.c:
	* solib-irix.c:
	* solib-frv.c:
	* solib-aix5.c:
	* sol-thread.c:
	* sparc64-linux-tdep.c:
	* sparc64-linux-nat.c:
	* sparc-tdep.h:
	* sparc-tdep.c:
	* sparc-sol2-tdep.c:
	* sparc-sol2-nat.c:
	* sparc-nat.h:
	* sparc-nat.c:
	* sparc-linux-tdep.c:
	* sparc-linux-nat.c:
	* source.h:
	* source.c:
	* somread.c:
	* solist.h:
	* solib.h:
	* std-regs.c:
	* stack.h:
	* stack.c:
	* stabsread.h:
	* sparcobsd-tdep.c:
	* sparcnbsd-tdep.c:
	* sparcnbsd-nat.c:
	* sparc64obsd-tdep.c:
	* sparc64nbsd-tdep.c:
	* sparc64nbsd-nat.c:
	* sparc64fbsd-tdep.c:
	* sparc64fbsd-nat.c:
	* sparc64-tdep.h:
	* sparc64-tdep.c:
	* sparc64-sol2-tdep.c:
	* sparc64-nat.c:
	* ui-file.c:
	* typeprint.h:
	* typeprint.c:
	* tramp-frame.h:
	* tramp-frame.c:
	* trad-frame.h:
	* trad-frame.c:
	* tracepoint.h:
	* top.c:
	* tobs.inc:
	* thread.c:
	* terminal.h:
	* target.h:
	* symfile.h:
	* stop-gdb.c:
	* vaxbsd-nat.c:
	* vax-tdep.h:
	* vax-tdep.c:
	* vax-nat.c:
	* varobj.h:
	* varobj.c:
	* value.h:
	* value.c:
	* valprint.h:
	* valprint.c:
	* v850-tdep.c:
	* uw-thread.c:
	* user-regs.c:
	* ui-out.h:
	* ui-out.c:
	* ui-file.h:
	* xcoffsolib.h:
	* xcoffsolib.c:
	* wrapper.c:
	* wince.c:
	* wince-stub.h:
	* wince-stub.c:
	* vaxobsd-tdep.c:
	* vaxnbsd-tdep.c:
	* gdb_gcore.sh:
	* copying.c:
	* configure.ac:
	* aclocal.m4:
	* acinclude.m4:
	* reply_mig_hack.awk:
	* observer.sh:
	* gdb_mbuild.sh:
	* arm-linux-tdep.c:
	* blockframe.c:
	* dbug-rom.c:
	* environ.h:
	* dwarf2loc.h:
	* gdb-events.sh:
	* glibc-tdep.h:
	* gdb_wait.h:
	* gdbthread.h:
	* i386-sol2-tdep.c:
	* hppabsd-tdep.c:
	* hppa-linux-nat.c:
	* hppa-hpux-nat.c:
	* ia64-linux-tdep.c:
	* infptrace.c:
	* linespec.h:
	* maint.c:
	* mips-mdebug-tdep.h:
	* remote-m32r-sdi.c:
	* s390-nat.c:
	* rs6000-nat.c:
	* remote-utils.h:
	* sh3-rom.c:
	* sh-linux-tdep.c:
	* top.h:
	* symtab.h:
	* symmisc.c:
	* symfile-mem.c:
	* srec.h:
	* user-regs.h:
	* version.h:
	* valarith.c:
	* xstormy16-tdep.c:
	* wrapper.h:
	* Makefile.in:
	* f-exp.y:
	* cris-tdep.c:
	* cp-name-parser.y:
	* procfs.c:
	* proc-utils.h:
	* proc-flags.c:
	* proc-api.c:
	* p-exp.y:
	* m68hc11-tdep.c:
	* m2-exp.y:
	* kod.h:
	* kod-cisco.c:
	* jv-exp.y:
	* hppa-linux-tdep.c: Add (c) after Copyright.  Update the FSF
	address.
2005-12-17 22:34:03 +00:00
Joel Brobecker ab83048167 * top.c (print_gdb_version): Update copyright year. 2005-11-22 19:24:03 +00:00
Andrew Stubbs f17517ea06 2005-11-07 Andrew Stubbs <andrew.stubbs@st.com>
* main.h (return_child_result, return_child_result_value): Declare.
	* infrun.c: Include main.h.
	(print_stop_reason): Remove declaration of return_child_result_value.
	* top.c: Include main.h.
	(quit_force): Remove declarations of return_child_result_value and
	return_child_result.
	* Makefile.in (top.o, infrun.o): Add main.h to dependencies.
2005-11-07 15:27:07 +00:00
Andrew Stubbs 4b0ad76243 2005-11-04 Andrew Stubbs <andrew.stubbs@st.com>
* infrun.c (print_stop_reason): Set return_child_result_value on exit.
	* main.c (return_child_result): New variable.
	(return_child_result_value): Likewise.
	(captured_main): Add option --return-child-result.
	Replace call to target_detach and exit (in batch mode) with quit_force.
	(print_gdb_help): Add option --return-child-result.
	* top.c (quit_force): Return child result if appropriate.

docs/
	* gdb.texinfo (Choosing modes): Add --return-child-result.
2005-11-04 11:49:12 +00:00
Mark Kettenis 1754f103e6 * bsd-kvm.c (bsd_kvm_open): Properly cast sentinel in concat call.
* coffread.c (patch_type, process_coff_symbol): Likewise.
* corelow.c (core_open): Likewise.
* dwarf2read.c (dwarf_decode_lines, dwarf2_start_subfile):
* language.c (set_lang_str, set_type_str, set_range_str)
(set_case_str): Likewise.
* source.c (add_path, openp): Likewise.
* stabsread.c: Likewise.
* top.c (init_history): Likewise.
* utils.c (xfullpath): Likewise.
* value.c (lookup_internalvar): Likewise.
* cli/cli-cmds.c (cd_command): Likewise.
* cli/cli-dump.c (add_dump_command): Likewise.
2005-07-04 13:29:13 +00:00
Eli Zaretskii eaae39195e * Makefile.in (go32-nat.o): Add $(top_h) to prerequisites.
* go32-nat.c: Include top.h.  Update copyright years.
	(init_go32_ops): Override the default value of gdbinit[] with
	"gdb.ini".

	* cli/cli-cmds.c (init_cli_cmds): Use gdbinit[] instead of a
	compile-time literal string GDBINIT_FILENAME.

	* top.c (PATH_MAX): Define if not defined.
	(gdbinit): Declare with a constant size PATH_MAX.

	* config/i386/go32.mh (XM_FILE): Remove.

	* config/i386/xm-go32.h: Remove file.
2005-05-12 21:23:17 +00:00
Andrew Cagney 920d2a4419 2005-02-24 Andrew Cagney <cagney@gnu.org>
Add show_VARIABLE functions, update add_setshow call.
	* varobj.c (_initialize_varobj, show_varobjdebug): Add and update.
	* valprint.c (_initialize_valprint, show_print_max)
	(show_stop_print_at_null, show_repeat_count_threshold)
	(show_prettyprint_structs, show_unionprint)
	(show_prettyprint_arrays, show_addressprint, show_input_radix)
	(show_output_radix): Ditto.
	* valops.c (_initialize_valops, show_overload_resolution): Ditto.
	* utils.c (initialize_utils, show_chars_per_line)
	(show_lines_per_page, show_demangle, show_pagination_enabled)
	(show_sevenbit_strings, show_asm_demangle): Ditto
	* tui/tui-win.c (_initialize_tui_win, show_tui_border_kind)
	(show_tui_border_mode, show_tui_active_border_mode): Ditto.
	* top.c (init_main, show_new_async_prompt)
	(show_async_command_editing_p, show_write_history_p)
	(show_history_size, show_history_filename, show_caution)
	(show_annotation_level, init_main): Ditto.
	* target.c (initialize_targets, show_targetdebug)
	(show_trust_readonly): Ditto.
	* symfile.c (_initialize_symfile, show_symbol_reloading)
	(show_ext_args, show_download_write_size)
	(show_debug_file_directory): Ditto.
	* source.c (_initialize_source, show_lines_to_list): Ditto.
	* solib.c (_initialize_solib, show_auto_solib_add)
	(show_solib_search_path): Ditto.
	* p-valprint.c (_initialize_pascal_valprint)
	(show_pascal_static_field_print): Ditto.
	* printcmd.c (_initialize_printcmd, show_max_symbolic_offset)
	(show_print_symbol_filename): Add and update.
	* parse.c (_initialize_parse, show_expressiondebug): Dito.
	* observer.c (_initialize_observer, show_observer_debug): Dito.
	* maint.c (_initialize_maint_cmds, show_watchdog)
	(show_maintenance_profile_p): Dito.
	* linux-nat.c (_initialize_linux_nat, show_debug_linux_nat): Dito.
	* infrun.c (_initialize_infrun, show_debug_infrun)
	(show_stop_on_solib_events, show_follow_fork_mode_string)
	(show_scheduler_mode, show_step_stop_if_no_debug): Ditto.
	* infcall.c (_initialize_infcall, show_coerce_float_to_double_p)
	(show_unwind_on_signal_p): Ditto.
	* gdbtypes.c (build_gdbtypes, show_opaque_type_resolution)
	(_initialize_gdbtypes, show_overload_debug): Ditto.
	* gdb-events.c, gdb-events.sh (_initialize_gdb_events)
	(show_gdb_events_debug): Ditto.
	* gdbarch.c, gdbarch.sh (show_gdbarch_debug)
	(_initialize_gdbarch): Ditto.
	* frame.c (_initialize_frame, show_backtrace_past_main)
	(show_backtrace_past_entry, show_backtrace_limit)
	(show_frame_debug): Ditto.
	* exec.c (_initialize_exec, show_write_files): Ditto.
	* dwarf2read.c (_initialize_dwarf2_read)
	(show_dwarf2_max_cache_age): Ditto.
	* demangle.c (_initialize_demangler)
	(show_demangling_style_names): Ditto.
	* dcache.c (_initialize_dcache, show_dcache_enabled_p): Ditto.
	* cp-valprint.c (show_static_field_print)
	(_initialize_cp_valprint, show_vtblprint, show_objectprint): Ditto.
	* corefile.c (_initialize_core, show_gnutarget_string): Ditto.
	* cli/cli-logging.c (_initialize_cli_logging)
	(show_logging_overwrite, show_logging_redirect)
	(show_logging_filename): Ditto.
	* cli/cli-cmds.c (show_info_verbose, show_history_expansion_p)
	(init_cli_cmds, show_baud_rate, show_remote_debug)
	(show_remote_timeout, show_max_user_call_depth): Ditto.
	* charset.c (show_host_charset_name, show_target_charset_name)
	(initialize_charset): Ditto.
	* breakpoint.c (show_can_use_hw_watchpoints)
	(show_pending_break_support, _initialize_breakpoint): Ditto.
2005-02-24 13:51:36 +00:00
Andrew Cagney 4d28ad1ece 2005-02-21 Andrew Cagney <cagney@gnu.org>
Add more uses of add_setshow_string_cmd, add_setshow_integer_cmd,
	and add_setshow_string_noescape_cmd.
	* cli/cli-setshow.c (deprecated_show_value_hack): Do not print a
	NULL command's value.
	* kod.c, language.c, ocd.c, remote-e7000.c, remote-mips.c: Update.
	* remote-sds.c, remote.c, symfile.c, top.c: Update.
2005-02-21 06:21:09 +00:00
Andrew Cagney 85c078043b 2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_zinteger_cmd through out.  Re-sync gdbarch.sh
	and gdbarch.c.
	* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.
	* gdbtypes.c, infrun.c, linux-nat.c, maint.c, monitor.c: Update.
	* pa64solib.c, parse.c, remote-mips.c, ser-go32.c: Update.
	* serial.c, solib-frv.c, somsolib.c, target.c, top.c: Update.
	* varobj.c, cli/cli-cmds.c: Update.
	* gdbarch.c, gdb-events.c: Regenerate.
2005-02-18 18:58:56 +00:00
Andrew Cagney 5bf193a2ee 2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_boolean_command through out.  Delete #ifdef 0'ed
	code adding set/show boolean commands.
	* cp-valprint.c, dcache.c, exec.c, gdbtypes.c, infrun.c: Update.
	* monitor.c, p-valprint.c, pa64solib.c, printcmd.c: Update.
	* proc-api.c, remote-mips.c, remote.c, solib.c: Update.
	* somsolib.c, symfile.c, top.c, utils.c, valops.c: Update.
	* valprint.c, win32-nat.c, wince.c, xcoffsolib.c: Update.
	* cli/cli-cmds.c: Update.
2005-02-18 15:25:32 +00:00
Andrew Cagney 1bedd21517 2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
	* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
	* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
	* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
	* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
	* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
	* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
	* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
	* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
	* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
	* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
	* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
	* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
	* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
	* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
	* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 15:49:28 +00:00
Andrew Cagney a3f171870f 2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
	* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
	* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
	* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
	* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
	* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
	* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
	* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
	* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
	* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
	* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
	* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
	* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
	* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
	* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 00:39:24 +00:00
Andrew Cagney 8a3fe4f86c 2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
	* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
	* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
	* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
	* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
	* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
	* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
	* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
	* event-top.c, exec.c, expprint.c, f-lang.c: Update.
	* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
	* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
	* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
	* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
	* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
	* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
	* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
	* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
	* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
	* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
	* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
	* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
	* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
	* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
	* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
	* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
	* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
	* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
	* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
	* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
	* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
	* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
	* remote-rdp.c, remote-sim.c, remote-st.c: Update.
	* remote-utils.c, remote-utils.h, remote.c: Update.
	* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
	* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
	* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
	* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
	* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
	* somread.c, somsolib.c, source.c, stabsread.c: Update.
	* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
	* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
	* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
	* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
	* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
	* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
	* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
	* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
	* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
	* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
	* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
	* tui/tui-win.c: Update.
2005-02-11 04:06:14 +00:00
Andrew Cagney 637537d07b 2005-01-17 Andrew Cagney <cagney@gnu.org>
* top.h (source_error, source_pre_error): Delete declaration.
	* cli/cli-script.c (source_error_allocated, source_error): Delete.
	(script_from_file, source_cleanup_lines): Do not manipulate
	source_error_allocated, error_pre_print and source_error.
	(struct source_cleanup_lines_args): Delete fields old_pre_error,
	and old_error_pre_print.
	* top.c (source_error_allocated, source_error)
	(source_pre_error): Delete.
	(command_line_input): Do not set error_pre_print.
	* event-top.c (command_line_handler): Do not set error_pre_print.
2005-01-17 16:17:36 +00:00
Andrew Cagney 60250e8b18 2005-01-12 Andrew Cagney <cagney@gnu.org>
* exceptions.h (enum return_reason, RETURN_MASK)
	(RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL)
	(return_mask, throw_exception, catch_exceptions_ftype)
	(catch_exceptions_with_msg, catch_errors_ftype, catch_errors)
	(catch_command_errors_ftype, catch_command_errors): Move to
	exceptions.h.
	* exceptions.c, exceptions.h: New files.
	* top.c: Do not include <setjmp.h>.
	(SIGJMP_BUF, SIGSETJMP, SIGLONGJMP, catch_return)
	(throw_exception, catcher, catch_exceptions)
	(catch_exceptions_with_msg, struct catch_errors_args)
	(do_catch_errors, catch_errors, struct captured_command_args)
	(do_captured_command, catch_command_errors): Move to exceptions.c.
	* wrapper.c, wince.c, win32-nat.c, utils.c: Include "exceptions.h".
	* tui/tui-interp.c, top.c, thread.c, symmisc.c: Ditto.
	* symfile-mem.c, stack.c, solib.c, rs6000-nat.c: Ditto.
	* remote-sds.c, remote-mips.c, remote-fileio.c: Ditto.
	* remote-e7000.c, objc-lang.c, ocd.c: Ditto.
	* remote.c, nto-procfs.c, monitor.c, mi/mi-main.c: Ditto.
	* main.c, m32r-rom.c, infrun.c, inf-loop.c: Ditto.
	* hppa-hpux-tdep.c, frame.c, event-top.c, event-loop.c: Ditto.
	* corelow.c, corefile.c, cli/cli-interp.c, breakpoint.c: Ditto.
	* ada-valprint.c, ada-lang.c: Ditto.
	* Makefile.in (HFILES_NO_SRCDIR, COMMON_OBS): Add exceptions.h and
	exceptions.o.  Update all dependencies.
2005-01-12 18:31:35 +00:00
Mark Kettenis ad4c72d283 * top.c (gdb_readline): Always accept "rn" as a line-ending.
* event-top.c (gdb_readline2): Likewise.
2004-10-14 12:44:24 +00:00
Andrew Cagney 362646f517 2004-09-13 Andrew Cagney <cagney@gnu.org>
Eliminate event_loop_p, always has the value 1.
	* defs.h (event_loop_p): Delete macro.
	* breakpoint.c (until_break_command): Simplify.
	* utils.c (prompt_for_continue): Simplify.
	* tracepoint.c (read_actions): Simplify.
	* top.c (throw_exception, execute_command, gdb_readline_wrapper)
	(gdb_rl_operate_and_get_next, command_line_input, get_prompt)
	(set_prompt, init_main): Simplify.
	(init_signals, disconnect): Delete, unused.
	* remote.c (remote_async_resume)
	(extended_remote_async_create_inferior): Simplify.
	* mi/mi-interp.c (mi_input): Delete, unused.
	(mi_interpreter_resume, mi_command_loop): Simplify.
	* interps.c (current_interp_command_loop): Simplify.
	* infrun.c (proceed): Simplify.
	* infcmd.c (run_command, continue_command, step_1, jump_command)
	(until_command, advance_command, finish_command)
	(interrupt_target_command): Simplify.
	* event-top.c (gdb_setup_readline, gdb_disable_readline): Simplify.
2004-09-13 18:26:31 +00:00
Mark Kettenis c40d0d10b1 * defs.h (deprecated_error_hook): Remove RETURN and ATTR_NORETURN
from declaration.
* top.c (deprecated_error_hook): Remove RETURN and ATTR_NORETURN
from definition.
2004-08-14 13:37:51 +00:00
Andrew Cagney cb1a6d5f51 2004-07-26 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (deprecated_add_show_from_set): Deprecate.
	* xcoffsolib.c (_initialize_xcoffsolib): Update.
	* wince.c (_initialize_wince): Update.
	* win32-nat.c (_initialize_win32_nat): Update.
	* varobj.c (_initialize_varobj): Update.
	* valops.c (_initialize_valops): Update.
	* utils.c (initialize_utils, initialize_utils): Update.
	* tui/tui-win.c (_initialize_tui_win): Update.
	* top.c (init_main): Update.
	* symfile.c (_initialize_symfile): Update.
	* source.c (_initialize_source): Update.
	* somsolib.c (_initialize_som_solib): Update.
	* solib.c (_initialize_solib): Update.
	* solib-frv.c (_initialize_frv_solib): Update.
	* serial.c (_initialize_serial): Update.
	* ser-go32.c (_initialize_ser_dos, _initialize_ser_dos): Update.
	* remote.c (_initialize_remote, _initialize_remote): Update.
	* remote-vx.c (_initialize_vx): Update.
	* remote-utils.c (_initialize_sr_support): Update.
	* remote-sds.c (_initialize_remote_sds): Update.
	* remote-mips.c (_initialize_remote_mips): Update.
	* remote-e7000.c (_initialize_remote_e7000): Update.
	* proc-api.c (_initialize_proc_api): Update.
	* printcmd.c: Update.
	* parse.c (_initialize_parse): Update.
	* pa64solib.c (_initialize_pa64_solib): Update.
	* p-valprint.c (_initialize_pascal_valprint): Update.
	* monitor.c (_initialize_remote_monitors): Update.
	* mips-tdep.c (_initialize_mips_tdep): Update.
	* mcore-tdep.c (_initialize_mcore_tdep): Update.
	* maint.c (_initialize_maint_cmds): Update.
	* lin-lwp.c (_initialize_lin_lwp): Update.
	* language.c (_initialize_language): Update.
	* kod.c (_initialize_kod): Update.
	* infrun.c (set_schedlock_func, _initialize_infrun): Update.
	* i386-tdep.c (_initialize_i386_tdep): Update.
	* gdbtypes.c (build_gdbtypes, _initialize_gdbtypes): Update.
	* gdbarch.sh: Update.
	* gdbarch.c: Re-generate.
	* gdb-events.sh: Update.
	* gdb-events.c: Re-generate.
	* frame.c (_initialize_frame): Update.
	* exec.c: Update.
	* demangle.c (_initialize_demangler): Update.
	* dcache.c (_initialize_dcache): Update.
	* cris-tdep.c (_initialize_cris_tdep, cris_version_update): Update.
	* cp-valprint.c (_initialize_cp_valprint): Update.
	* corefile.c (_initialize_core): Update.
	* command.h: Update.
	* cli/cli-decode.h: Update.
	* cli/cli-cmds.c (init_cli_cmds): Update.
	* charset.c (_initialize_charset): Update.
	* breakpoint.c (_initialize_breakpoint): Update.
	* arm-tdep.c (_initialize_arm_tdep_initialize_arm_tdep): Update.
	* alpha-tdep.c (_initialize_alpha_tdep): Update.
	* aix-thread.c (_initialize_aix_thread): Update.
2004-07-26 14:53:06 +00:00
Andrew Cagney 98bbd631cc 2004-06-25 Andrew Cagney <cagney@gnu.org>
* defs.h (deprecated_ui_loop_hook): Deprecated.
	* wince.c (child_wait): Update.
	* win32-nat.c (child_wait): Update.
	* v850ice.c (v850ice_wait): Update.
	* top.c (deprecated_ui_loop_hook): Update.
	* serial.h: Update.
	* ser-unix.c (do_hardwire_readchar, do_hardwire_readchar)
	(do_unix_readchar): Update.
	* ser-tcp.c (net_open): Update.
	* remote-sim.c (gdb_os_poll_quit): Update.
	* rdi-share/ardi.c (angel_RDI_ExecuteOrStep): Update.
2004-06-25 19:46:08 +00:00
Andrew Cagney 9a4105ab85 2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
	(deprecated_annotate_stopped_hook)
	(deprecated_annotate_exited_hook)
	(deprecated_annotate_signal_hook)
	(deprecated_annotate_signalled_hook): Deprecate.
	* tracepoint.h (deprecated_create_tracepoint_hook)
	(deprecated_delete_tracepoint_hook)
	(deprecated_modify_tracepoint_hook)
	(deprecated_trace_find_hook)
	(deprecated_trace_start_stop_hook): Deprecate.
	* target.h (deprecated_target_new_objfile_hook): Deprecate.
	* remote.h (deprecated_target_resume_hook)
	(deprecated_target_wait_loop_hook): Deprecate.
	* gdbcore.h (deprecated_exec_file_display_hook)
	(deprecated_file_changed_hook): Deprecate.
	* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
	* defs.h (deprecated_modify_breakpoint_hook)
	(deprecated_command_loop_hook, deprecated_show_load_progress)
	(deprecated_print_frame_info_listing_hook)
	(deprecated_query_hook, deprecated_warning_hook)
	(deprecated_flush_hook, deprecated_create_breakpoint_hook)
	(deprecated_delete_breakpoint_hook)
	(deprecated_interactive_hook, deprecated_registers_changed_hook)
	(deprecated_readline_begin_hook, deprecated_readline_hook)
	(deprecated_readline_end_hook, deprecated_register_changed_hook)
	(deprecated_memory_changed_hook, deprecated_init_ui_hook)
	(deprecated_context_hook, deprecated_target_wait_hook)
	(deprecated_attach_hook, deprecated_detach_hook)
	(deprecated_call_command_hook, deprecated_set_hook)
	(deprecated_error_hook, deprecated_error_begin_hook)
	(deprecated_ui_load_progress_hook): Deprecate.
	* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
	* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
	* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
	* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
	* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
	* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
	* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
	* annotate.c, aix-thread.c: Update.
2004-04-21 23:52:21 +00:00
Andrew Cagney dbda997201 2004-02-28 Andrew Cagney <cagney@redhat.com>
* utils.c: Use "", instead of <>, to include readline.
	tui/tui-win.c, tui/tui.c, tui/tui-hooks.c: Ditto.
	* tracepoint.c, top.c, symmisc.c, symfile.c: Ditto.
	* source.c, solib.c, exec.c, event-top.c: Ditto.
	* corelow.c, completer.c, cli/cli-setshow.c: Ditto.
	* cli/cli-dump.c, cli/cli-cmds.c: Ditto.
	* Makefile.in: Update all dependencies.
	(readline_tilde_h, readline_history_h): Define.
	(readline_headers): Delete.
2004-02-28 18:04:37 +00:00
Jeff Johnston 4fcef00ad0 2004-01-19 Jeff Johnston <jjohnstn@redhat.com>
* linespec.c (decode_variable, symtab_from_filename):  Call
        error_silent with error message instead of throwing an exception
        directly.
        * defs.h (error_silent, error_output_message): Add prototypes.
        (catch_exceptions_with_msg): Ditto.
        * utils.c (error_silent, error_output_message): New functions.
        * top.c (catch_exceptions_with_msg): New function.
2004-01-20 02:04:19 +00:00
Michael Chastain 0bc2134ec9 2004-01-02 Michael Chastain <mec.gnu@mindspring.com>
* top.c (print_gdb_version): Update year to 2004.
2004-01-02 20:53:11 +00:00
Andrew Cagney 6314a34934 2003-11-07 Andrew Cagney <cagney@redhat.com>
* top.c (print_gdb_version): Replace STREQ with strcmp.
	* valops.c (value_struct_elt_for_reference): Ditto.
	(value_struct_elt_for_reference): Ditto.
	* symtab.c (gdb_mangle_name): Ditto.
	(find_line_symtab): Ditto.
	* symmisc.c (maintenance_print_symbols): Ditto.
	* symfile.c (symbol_file_command): Ditto.
	* stabsread.c (define_symbol, read_type): Ditto.
	(cleanup_undefined_types, scan_file_globals): Ditto.
	* solib.c (solib_map_sections): Ditto.
	* solib-svr4.c (bfd_lookup_symbol): Ditto.
	* rs6000-tdep.c (skip_prologue): Ditto.
	* p-valprint.c (pascal_value_print): Ditto.
	(pascal_object_is_vtbl_ptr_type): Ditto.
	* objfiles.c (in_plt_section): Ditto.
	* minsyms.c (lookup_minimal_symbol): Ditto.
	(compact_minimal_symbols): Ditto.
	(find_solib_trampoline_target): Ditto.
	* mdebugread.c (parse_type): Ditto.
	* language.c (set_language_command): Ditto.
	(set_type_command, set_range_command): Ditto.
	* f-lang.c (add_common_block): Ditto.
	(add_common_block): Ditto.
	(find_first_common_named): Ditto.
	(patch_all_commons_by_name): Ditto.
	* elfread.c (elf_locate_sections): Ditto.
	(elf_locate_sections): Ditto.
	(elfstab_offset_sections): Ditto.
	* dwarf2read.c (dwarf2_locate_sections): Ditto.
	* dbxread.c (add_old_header_file): Ditto.
	(find_corresponding_bincl_psymtab): Ditto.
	(read_dbx_symtab, process_one_symbol): Ditto.
	* coffread.c (patch_opaque_types): Ditto.
	* cli/cli-decode.c (delete_cmd): Ditto.
	* cli/cli-cmds.c (pwd_command, list_command): Ditto.
	* c-typeprint.c (c_type_print_base): Ditto.
	* breakpoint.c (bpstat_stop_status): Ditto.
	(clear_command, breakpoint_re_set_one): Ditto.
2003-11-08 00:13:03 +00:00
Andrew Cagney bf896cb059 2003-11-06 Andrew Cagney <cagney@redhat.com>
* valops.c (destructor_name_p): Replace STREQN with strncmp.
	* top.c (command_line_input): Ditto.
	* objc-exp.y (yylex): Ditto.
	* minsyms.c (prim_record_minimal_symbol_and_info): Ditto.
	* jv-exp.y (yylex): Ditto.
	* f-exp.y (yylex): Ditto.
	* event-top.c (command_line_handler): Ditto.
	* environ.c (get_in_environ): Ditto.
	(set_in_environ): Ditto.
	* dwarfread.c (handle_producer): Ditto.
	* dbxread.c (process_one_symbol): Ditto.
	* c-typeprint.c (c_type_print_base): Ditto.
	* c-exp.y (yylex): Ditto.

2003-11-06  Andrew Cagney  <cagney@redhat.com>

	* mi-cmd-var.c (mi_cmd_var_set_format): Replace STREQN with
	strncmp.
2003-11-06 22:54:02 +00:00
Elena Zannoni d8fe84e397 2003-11-05 Elena Zannoni <ezannoni@redhat.com>
* top.c (execute_command): Fix broken logic for command execution
       while inferior is running in async mode.
2003-11-05 23:50:12 +00:00
Andrew Cagney f1c07ab0ca 2003-10-22 Andrew Cagney <cagney@redhat.com>
* target.c (target_close): New function.
	(debug_to_close): Use "target_close".
	(push_target): Use "target_close".
	(unpush_target): Use "target_close".
	(pop_target): Use "target_close".
	* target.h (struct target_ops): Add "to_xclose".
	(target_open): Delete macro.  Move comment to "to_open".
	(target_close): Replace macro with function that takes a target.
	* top.c (quit_target): Pass "current_target" to "target_close".
2003-10-22 21:39:09 +00:00
Kazuhiro Inaoka 85a453d541 2003-10-10 Kei Sakamoto <sakamoto.kei@renesas.com>
* NEWS: Replace "Hitachi" and "Mitsubishi" with "Renesas".
	* README: Ditto.
	* d10v-tdep.c: Ditto.
	* h8300-tdep.c: Ditto.
	* remote-e7000.c: Ditto.
	* remote-hms.c: Ditto.
	* ser-e7kpc.c: Ditto.
	* sh-stub.c: Ditto.
	* sh-tdep.c: Ditto.
	* sh-tdep.h: Ditto.
	* sh3-rom.c: Ditto.
	* sh64-tdep.c: Ditto.
	* top.c: Ditto.
	* wince.c: Ditto.
	* config/d10v/d10v.mt: Ditto.
	* config/sh/embed.mt: Ditto.
	* config/sh/linux.mt: Ditto.
	* config/sh/tm-linux.h: Ditto.
	* config/sh/tm-sh.h: Ditto.
	* config/sh/wince.mt: Ditto.
2003-10-10 07:13:11 +00:00
Joel Brobecker 51065942b4 * completer.h (get_gdb_completer_word_break_characters): Delete.
* completer.c: include language.h.
        (gdb_completer_word_break_characters): Delete.
        (get_gdb_completer_word_break_characters): Delete.
        (location_completer): Use the word break characters of the current
        language.
        (complete_line): Likewise.
        (line_completion_function): Likewise.
        (skip_quoted_chars): Likewise.
        * Makefile.in (completer.o): Add dependency on language.h.
        * top.c (init_main): Set the readline word break characters
        to GDB's default word break characters.
2003-10-06 22:41:17 +00:00
Jeff Johnston 365c70b126 2003-09-22 Jeff Johnston <jjohnstn@redhat.com>
* top.c (quit_force): Fix indirect call to quit_target so
        a struct qt_args pointer is passed.
2003-09-22 17:46:28 +00:00
Andrew Cagney deafb06122 2003-09-20 Andrew Cagney <cagney@redhat.com>
* breakpoint.c: Eliminate ARGSUSED.
	* buildsym.c, cli/cli-cmds.c, cli/cli-script.c: Ditto.
	* coffread.c, corelow.c, dwarf2read.c, event-top.c: Ditto.
	* exec.c, gcore.c, hpux-thread.c, infcmd.c, inflow.c: Ditto.
	* infrun.c, inftarg.c, maint.c, ocd.c, printcmd.c: Ditto.
	* procfs.c, regcache.c, remote-rdi.c, remote-sds.c: Ditto.
	* remote.c, sol-thread.c, source.c, stabsread.c: Ditto.
	* stack.c, symfile.c, target.c, top.c, typeprint.c: Ditto.
	* utils.c, v850ice.c, valprint.c, values.c, win32-nat.c: Ditto.
	* wince.c, remote-vx.c: Ditto.
2003-09-21 01:26:46 +00:00
Andrew Cagney 52f0bd74b2 2003-09-14 Andrew Cagney <cagney@redhat.com>
* alpha-nat.c: Remove some occurances of "register".
	* alpha-tdep.c, arm-tdep.c, blockframe.c, breakpoint.c: Ditto.
	* buildsym.c, c-typeprint.c, c-valprint.c, coffread.c: Ditto.
	* corefile.c, cp-support.c, cp-valprint.c, cris-tdep.c: Ditto.
	* dbxread.c, dcache.c, dwarf2read.c, elfread.c: Ditto.
	* environ.c, eval.c, event-top.c, f-typeprint.c: Ditto.
	* f-valprint.c, findvar.c, frame.c, gdbtypes.c: Ditto.
	* h8300-tdep.c, hppa-tdep.c, hppab-nat.c, hppah-nat.c: Ditto.
	* hppam3-nat.c, hpread.c, ia64-aix-nat.c, ia64-linux-nat.c: Ditto.
	* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Ditto.
	* infttrace.c, irix5-nat.c, jv-typeprint.c: Ditto.
	* jv-valprint.c, m68k-tdep.c, m68klinux-nat.c, main.c: Ditto.
	* mdebugread.c, minsyms.c, mips-linux-tdep.c: Ditto.
	* mips-nat.c, mips-tdep.c, mipsread.c, mipsv4-nat.c: Ditto.
	* ns32k-tdep.c, objfiles.c, p-typeprint.c: Ditto.
	* p-valprint.c, ppc-linux-nat.c, printcmd.c: Ditto.
	* remote-mips.c, remote-vx.c, rs6000-nat.c: Ditto.
	* rs6000-tdep.c, scm-exp.c, sh-tdep.c, sh64-tdep.c: Ditto.
	* solib.c, somread.c, source.c, sparc-tdep.c: Ditto.
	* stabsread.c, stack.c, standalone.c, symfile.c: Ditto.
	* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
	* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
	* values.c, vax-tdep.c, xcoffread.c: Ditto.
2003-09-14 16:32:14 +00:00
Jeff Johnston b0abbc58f0 2003-09-12 Jeff Johnston <jjohnstn@redhat.com>
* top.c (quit_target): New static helper function.
        (quit_force): Moved code to quit_target().  Call quit_target()
        via catch_errors() to catch errors during quit.
2003-09-12 15:24:24 +00:00
Andrew Cagney 7989c619f9 2003-08-16 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention that "set prompt-escape-char" was deleted.
	* top.c (get_prompt_1): Delete function.
	(gdb_prompt_escape):
	(init_main): Do not clear "gdb_prompt_escape".  Delete "set
	prompt-escape-char" command.
	(MAX_PROMPT_SIZE): Delete macro.
	(get_prompt): Simplify, do not call get_prompt_1.
2003-08-16 18:38:46 +00:00
David Carlton 306d9ac513 2003-08-04 David Carlton <carlton@kealia.com>
* charset.c (cached_iconv_convert): Add __FILE__ and __LINE__ args
	to internal_error call.
	* source.c (forward_search_command): Add "%s" format argument.
	(reverse_search_command): Ditto.
	* top.c (quit_confirm): Ditto.
	* cli/cli-setshow.c (do_setshow_command): Ditto.
	* cp-valprint.c (cp_print_class_method): Replace
	{f,}printf_{un,}filtered by {f,}puts_{un,}filtered.
	(cp_print_class_member): Ditto.
	* event-top.c (command_line_handler): Ditto.
	* linux-proc.c (linux_info_proc_cmd): Ditto.
	* p-typeprint.c (pascal_type_print_base): Ditto.
	* p-valprint.c (pascal_object_print_class_method): Ditto.
	(pascal_object_print_class_member): Ditto.
	* printcmd.c (print_scalar_formatted,printf_command): Ditto.
	* remote.c (remote_cisco_section_offsets): Ditto.
	* top.c (command_line_input): Ditto.
	* utils.c (vwarning,error_stream,quit): Ditto.
	* valprint.c (print_floating,print_binary_chars)
	(print_octal_chars,print_decimal_chars,print_hex_chars): Ditto.

2003-08-04  David Carlton  <carlton@kealia.com>

	* mi-main.c (mi_error_last_message): Add "%s" second argument to
	xasprintf call.

2003-08-04  David Carlton  <carlton@kealia.com>

	* generic/gdbtk.c (gdbtk_source_start_file): Add "%s" first
	argument to error call.
	(tk_command): Ditto.
	(view_command): Ditto.
2003-08-04 17:08:24 +00:00
Andrew Cagney b9362cc7a8 2003-06-08 Andrew Cagney <cagney@redhat.com>
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
	from GCC's acinclude.m4.
	* configure.in: Check for getopt's delcaration.
	* aclocal.m4, config.in, configure: Re-generate.
	* main.c (error_init): Delete declaration.
	* defs.h (error_init): Declare.
	* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
	(rs6000_convert_from_func_ptr_addr): Make static.
	(_initialize_rs6000_tdep): Add declaration.
	* cli/cli-cmds.c (dont_repeat): Delete declaration.
	(show_commands, set_verbose, show_history): Delete declaration.
	* top.h (set_verbose): Add declaration.
	(show_history, set_history, show_commands): Add declaration.
	(do_restore_instream_cleanup): Add declaration.
	* objc-lang.c (specialcmp): Make static.
	(print_object_command): Make static.
	(find_objc_msgsend): Make static.
	(find_objc_msgcall_submethod_helper): Make static.
	(find_objc_msgcall_submethod): Make static.
	(_initialize_objc_language): Add declaration.
	(find_implementation_from_class): Make static.
	(find_implementation): Make static.
	* objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
	* objc-lang.h (lookup_struct_typedef): Add declaration.
	* cli/cli-interp.c (_initialize_cli_interp): Add declaration.
	* cli/cli-script.c (clear_hook_in_cleanup): Make static.
	(do_restore_user_call_depth): Make static.
	(do_restore_instream_cleanup): Delete declaration.
	(dont_repeat): Delete declaration.
	* cli/cli-decode.c (add_abbrev_cmd): Delete function.
	* cli/cli-dump.c (_initialize_cli_dump): Add declaration.
	* reggroups.c (_initialize_reggroup): Add declaration.
	* cp-support.c (_initialize_cp_support): Add declaration.
	* cp-abi.c (_initialize_cp_abi): Add declaration.
	* hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
	* gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
	(_initialize_gnu_v3_abi): Add declaration.
	* gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
	(_initialize_gnu_v2_abi): Add declaration.
	* frame-base.c (_initialize_frame_base): Add declaration.
	* doublest.c (floatformat_from_length): Make static.
	* frame-unwind.c (_initialize_frame_unwind): Add declaration.
	* frame.c (create_sentinel_frame): Make static.
	(_initialize_frame): Add declaration.
	* top.c (do_catch_errors): Make static.
	(gdb_rl_operate_and_get_next_completion): Make static.
	* typeprint.c: Include "typeprint.h".
	* sentinel-frame.c (sentinel_frame_prev_register): Make static.
	(sentinel_frame_this_id): Make static.
	* p-valprint.c (_initialize_pascal_valprint): Add declaration.
	* ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
	* dwarf2-frame.c (dwarf2_frame_cache): Make static.
	* p-exp.y (push_current_type, pop_current_type): ISO C declaration.
	* dwarf2expr.h (dwarf_expr_context): ISO C declaration.
	* maint.c (maintenance_print_architecture): Make static.
	* signals/signals.c (_initialize_signals): Add declaration.
	* std-regs.c (_initialize_frame_reg): Add declaration.
	* jv-exp.y (push_variable): ISO C definition.
	(push_qualified_expression_name): Ditto.
	* memattr.c (_initialize_mem): Add declaration.
	* remote.c (remote_check_watch_resources): Make static.
	(remote_stopped_by_watchpoint): Make static.
	(remote_stopped_data_address): Make static.
	* d10v-tdep.c (nr_dmap_regs): Make static.
	(a0_regnum): Make static.
	(d10v_frame_unwind_cache): Make static.
	(d10v_frame_p): Make static.
	* osabi.c (show_osabi): Make static.
	(_initialize_gdb_osabi): Add extern declaration.
	* gdbtypes.c (make_qualified_type): Make static.
	(safe_parse_type): Make static.
	* macrocmd.c (_initialize_macrocmd): Add extern declaration.
	* macrotab.c (macro_bcache_free): Make static.
	* interps.c (interp_set_quiet): Make static.
	(interpreter_exec_cmd): Make static.
	* stack.h (select_frame_command): New file.
	* stack.c: Include "stack.h".
	(select_frame_command_wrapper): Delete function.
	(select_frame_command): Make global.
	* infcall.c: Include "infcall.h".
	* linespec.c: Include "linespec.h".
	* symfile.c (sections_overlap): Make static.
	* cp-support.h (cp_initialize_namespace): ISO C declaration.
	* charset.c (_initialize_charset): Add missing prototype.
	* regcache.c (init_legacy_regcache_descr): Make static.
	(do_regcache_xfree): Make static.
	(regcache_xfer_part): Make static.
	(_initialize_regcache): Add missing prototype.
	* breakpoint.c (parse_breakpoint_sals): Make static.
	(breakpoint_sals_to_pc): Make static.
	* interps.h (clear_interpreter_hooks): ISO C declaration.
	* Makefile.in (stack_h): Define.
	(stack.o, typeprint.o, mi-main.o): Update dependencies.
	(mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.

Index: mi/ChangeLog
2003-06-08  Andrew Cagney  <cagney@redhat.com>

	* mi-parse.c (_initialize_mi_parse): Delete function.
	* mi-main.c: Include "mi-main.h".
	* mi-interp.c (_initialize_mi_interp): Add declaration.
	* mi-cmd-stack.c: Include "stack.h".
	(select_frame_command_wrapper): Delete extern declaration.
	(mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
	with select_frame_command.
2003-06-08 18:27:14 +00:00
Richard Henderson 6dd77b815f * top.h (lim_at_start): Declare.
* main.c (captured_main): Set it.
        * top.c (lim_at_start): Define.
        (command_loop): Use it instead of &environ.
        * event-top.c (command_handler): Likewise.

        * gdb.base/selftest.exp: Next over lim_at_start initialization.
2003-06-02 16:02:59 +00:00
Andrew Cagney 4389a95abb 2003-02-05 Jim Ingham <jingham@apple.com>
Keith Seitz  <keiths@redhat.com>
            Elena Zannoni  <ezannoni@redhat.com>
            Andrew Cagney  <ac131313@redhat.com>

	* Makefile.in (SUBDIR_CLI_OBS): Add "cli-interp.o".
	(SUBDIR_CLI_SRCS): Add "cli/cli-interp.c".
	(SUBDIR_MI_OBS): Add "mi-interp.o".
	(SUBDIR_MI_SRCS): Add "mi/mi-interp.c".
	(SFILES): Add "interps.c".
	(COMMON_OBS): Add "interps.o".
	(interps_h, mi_main_h): Define.
	(interps.o, cli-interp.o, mi-interp.o): Add dependencies.
	(mi-main.o, main.o, event-top.o): Update dependencies.
	* cli/cli-interp.c: New file.
	* interps.h, interps.c: New files.
	* top.c: (gdb_init): Don't install the default interpreter, handed
	by captured_main.
	* main.c: Include "interps.h".
	(interpreter_p): Note that it should malloc'ed.
	(captured_command_loop): Call current_interp_command_loop.
	(captured_main): Initialize interpreter_p to INTERP_CONSOLE.  Use
	xfree and xstrdup when updating interpreter_p.  Install the
	default interpreter.  Add hack to stop mi1's copyright notice
	being encoded.
	* event-top.h (gdb_setup_readline): Declare.
	(gdb_disable_readline): Declare.
	* event-top.c: Include "interps.h".
	(display_gdb_prompt): Call current_interp_display_prompt_p.
	(gdb_setup_readline): Initialize gdb_stdout, gdb_stderr,
	gdb_stdlog, and gdb_stdtarg.
	(_initialize_event_loop): Don't call gdb_setup_readline.
	* cli-out.c (cli_out_set_stream): New function.
	* cli-out.h (cli_out_set_stream): Declare.
2003-02-06 01:19:12 +00:00
Michael Chastain 751ceeb4f3 2003-01-12 Michael Chastain <mec@shout.net>
* top.c (print_gdb_version): Bump copyright year to 2003.
2003-01-12 21:38:16 +00:00
Elena Zannoni 38017ce81c 2002-12-08 Elena Zannoni <ezannoni@redhat.com>
More cleanup from import of readline 4.3.
	* completer.h (complete_line, readline_line_completion_function):
	Update prototypes.
	(line_completion_function): Removed, not used outside of completer.c.
	* completer.c (readline_line_completion_function,
	complete_function, line_completion_function): Use const for first
	parameter.
	(line_completion_function): Make static.
	(filename_completer): filename_completion_function is now called
	rl_filename_completion_function
	* corelow.c: Include <readline/readline.h>.
	* exec.c: Ditto.
	* solib.c: Ditto.
	* source.c: Ditto.
	* symfile.c: Ditto.
	* symmisc.c: Ditto.
	* top.c (init_main): No need to coerce
	readline_line_completion_function anymore.
	* cli/cli-dump.c: Include <readline/readline.h>.
2002-12-09 00:59:27 +00:00
Andrew Cagney f15ab4a7d1 2002-09-26 Andrew Cagney <ac131313@redhat.com>
From Grace Sainsbury <graces@redhat.com>:
	* Makefile.in (gdbtk-main.o): New target.
	(gdb.o): New target.
	(main_h): Define.
	(main.o): Update dependencies.
	(gdb$(EXEEXT)): Add gdb.o.
	(SUBDIR_GDBTK_SRCS): Add gdbtk-main.c.
	(SUBDIR_GDBTK_ALL, SUBDIR_GDBTK_UNINSTALL): Set.
	(SUBDIR_GDBTK_CLEAN): Set.
	(install-gdbtk): Install the insight binary.
	(uninstall-gdbtk): New target.
	(all-gdbtk, clean-gdbtk): New rule.
	* top.c (use_windows): Default to zero.
	* main.c: Include "main.h".
	(main): Delete.
	(struct captured_main_args): Delete.
	(gdb_main): New function.
	* main.h: New file.
	* gdb.c: New File.

2002-09-26  Andrew Cagney  <ac131313@redhat.com>

	From Grace Sainsbury <graces@redhat.com>:
	* generic/gdbtk-main.c: New file.
2002-09-26 17:46:04 +00:00
Elena Zannoni 7cb3ec5e73 2002-09-09 Elena Zannoni <ezannoni@redhat.com>
From: Emmanuel Thome'  <thome@lix.polytechnique.fr>
	* top.c (init_main): Set rl_terminal_name.
2002-09-09 21:03:26 +00:00
Mark Kettenis b5686e99e9 * top.c (gdb_rl_operate_and_get_next): Make sure
operate-and-get-next functions correctly even when the history
list is completely filled.
2002-08-18 12:39:03 +00:00
Tom Tromey b4f5539f04 * defs.h (gdb_readline_wrapper): Declare.
* utils.c (prompt_for_continue): Use gdb_readline_wrapper.
	* tracepoint.c (read_actions): Use gdb_readline_wrapper.
	* top.c (gdb_readline_wrapper): New function.
	(command_line_input): Use it.
2002-07-24 17:58:46 +00:00
Andrew Cagney 5ae5f59288 Fix some K&R isms. 2002-07-11 13:50:50 +00:00
Martin Hunt f436dd25ca 2002-07-03 Martin M. Hunt <hunt@redhat.com>
* 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-07-03 17:35:21 +00:00
Jason Thorpe baa6f10b32 * findvar.c (extract_signed_integer): Cast printf argument
to suppress format warning.
(extract_unsigned_integer): Likewise.
* infcmd.c (registers_info): Likewise.
* top.c (get_prompt_1): Likewise.
* valops.c (value_assign): Likewise.
* valprint.c (print_decimal): Likewise.
2002-04-23 03:00:57 +00:00
Michael Snyder d4654627e1 2002-03-27 Michael Snyder <msnyder@redhat.com>
* 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-28 01:35:56 +00:00
Andrew Cagney 18a642a148 * command.h: Update copyright.
(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 00:40:35 +00:00
Andrew Cagney 5913bcb0f6 * command.h: (execute_cmd_post_hook): Declare.
(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-17 19:53:39 +00:00
Andrew Cagney 5ba2abebe7 * cli/cli-decode.c (set_cmd_completer): New function.
* 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-03-06 06:28:35 +00:00
Andrew Cagney bbaca940eb * cli/cli-decode.c (cmd_cfunc_eq): New function.
* 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-23 20:12:13 +00:00
Andrew Cagney b5a2688fa4 * defs.h (throw_exception): Rename return_to_top_level. Update
comments.
* utils.c (error_stream, internal_verror, quit): Ditto.
* top.c (throw_exception, catcher): Ditto.
* sparclet-rom.c (sparclet_load): Ditto.
* remote.c (interrupt_query, minitelnet): Ditto.
* remote-sds.c (interrupt_query): Ditto.
* remote-mips.c (mips_error, mips_kill): Ditto.
* ocd.c (interrupt_query): Ditto.
* monitor.c (monitor_interrupt_query): Ditto.
* m3-nat.c (suspend_all_threads, thread_resume_command): Ditto.
* target.h: Update comment.

* m3-nat.c, ocd.c, sparclet-rom.c: Update copyright.
2002-02-10 04:08:42 +00:00
Andrew Cagney 9f60d481c2 * cli/cli-decode.c (do_cfunc, set_cmd_cfunc): New functions.
(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-05 04:37:23 +00:00
Andrew Cagney e00d1dc8a5 s/NO_FUNCTION/NULL/ 2002-02-02 00:56:37 +00:00
Michael Chastain f86ddd7c6f 2002-01-20 Michael Chastain <mec@shout.net>
* top.c (print_gdb_version): Bump copyright year to 2002.
2002-01-20 22:05:15 +00:00
Andrew Cagney 8926118ce2 Remove else clause to #if UI_OUT. 2002-01-17 22:15:18 +00:00
Andrew Cagney a752853e6e Remove obsolete MacOS support. 2002-01-05 05:54:31 +00:00
Tom Tromey 467d85198f * NEWS: Updated.
* 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-27 04:15:09 +00:00
Keith Seitz 1ad24239ce * top.c (gdb_init): Call init_ui_hook before initializing
the default UI.
2001-11-20 16:54:39 +00:00
Andrew Cagney 3d6d86c64b s/value_ptr/struct value */ 2001-11-10 21:34:56 +00:00
Andrew Cagney d20bf2e81b Don't print ``(MI_OUT)'' at startup. 2001-10-21 19:43:41 +00:00
Andrew Cagney 1aa20aa88f * value.h (value_as_address): Rename value_as_pointer.
* 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-10-16 01:58:07 +00:00
Andrew Cagney f9c696d277 * defs.h (enum return_reason): Renumber so that all values are
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-09-07 21:33:08 +00:00
Mark Kettenis 46711df821 * event-top.c (async_stop_sig) [HAVE_SIGPROCMASK]: Some
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-27 22:39:56 +00:00
Christopher Faylor ae9d9b9660 * top.c (SIGSETJMP): Protect env argument with parentheses.
(SIGLONGJMP): Protect env argument with parentheses.
2001-08-14 20:05:48 +00:00
Andrew Cagney d16aafd8c8 * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(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-08-01 18:39:27 +00:00
Elena Zannoni d0c8cdfbfd 2001-07-17 Elena Zannoni <ezannoni@redhat.com>
* top.c (catch_errors): Convert PTR to void * in parameters list.
	(quit_cover): Ditto.
2001-07-17 17:25:14 +00:00
Elena Zannoni 314b6fb79a 2001-07-16 Elena Zannoni <ezannoni@redhat.com>
* top.c (show_commands): Remove extern decl of history_get, it's
	already in readline/history.h.
2001-07-16 15:50:51 +00:00
Elena Zannoni 210661e72f 2001-07-16 Elena Zannoni <ezannoni@redhat.com>
* 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 14:46:34 +00:00
Elena Zannoni 64cdedadad 2001-07-15 Elena Zannoni <ezannoni@redhat.com>
* 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-15 20:45:32 +00:00
Elena Zannoni d75b5104df 2001-07-15 Elena Zannoni <ezannoni@redhat.com>
* 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-15 18:57:06 +00:00
Stephane Carrez 37767e423b * utils.c (query): Remove tui hacks; tui must use the query_hook.
* 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-07-14 18:59:07 +00:00
Eli Zaretskii a577b05c32 * top.c (user_args): Remove unused declaration. 2001-05-17 15:05:32 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
Andrew Cagney d036b4d9cf Obsolete MPW as host. 2001-04-19 23:56:14 +00:00
Martin Hunt 67e1e03acb 2001-04-18 Martin M. Hunt <hunt@redhat.com>
* 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-19 05:28:12 +00:00
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
Jason Molenda 0f71a2f66f import gdb-1999-06-14 snapshot 1999-06-14 18:08:47 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Jason Molenda 9e086581c7 import gdb-1999-0519 1999-05-19 19:58:41 +00:00
Stan Shebs cd0fc7c3eb import gdb-1999-05-10 1999-05-11 13:35:55 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Martin Hunt 6925baeaa6 1999-01-29 Martin Hunt <hunt@cygnus.com>
Changes from Keith Seitz  <keiths@cygnus.com>

        * valops.c (value_assign): Add calls to register_changed_hook and
        memory_changed_hook to inform UIs that the user has changed
        the target's registers/memory.
        * findvar.c (write_register_gen): Remove call to pc_changed_hook.
        * defs.h: Remove declaration for pc_changed_hook and
        add declarations for register_changed_hook and
        memory_changed_hook.
        * top.c: Ditto.
1999-01-29 09:46:03 +00:00
Jim Ingham c98fe0c119 This is the merge of the Itcl3.0 gdbtk development branch into the
trunk.  To build it, you will have to do update -dP in the itcl
directory, and update tcl, tk, tix and libgui as well.
1999-01-28 03:50:17 +00:00
Stan Shebs b58ed18b12 From J.T. Conklin <jtc@redbacknetworks.com>:
* top.c (init_main): Fix tipo in description of the remotetimeout
	variable.
	* breakpoint.c (bpstat_stop_status): Handle systems where
	DECR_PC_AFTER_BREAK != DECR_PC_AFTER_HW_BREAK.
1999-01-22 03:09:06 +00:00
Andrew Cagney 8bdec905f1 Fix warnings from calls to catch_errors() and make_cleanup(). 1999-01-18 00:46:13 +00:00
Andrew Cagney 6e45c399c1 catch_errors() takes PTR argument/func instead of char* argument/func.
Update breakpoint.c.
Fix (?) cover_target_enable_exception_callback().  Wasn't returning a
value.
1999-01-17 23:23:42 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Per Bothner 0bf2ba41ef * Makefile.in (READLINE_CFLAGS): Search $(READLINE_SRC)/.. rather
than $(READLINE_SRC) so #include <readline/readline.h> will work.
	* top.c:  #include <readline/history.h> instead of "history.h".
	* tracepoint.c:  Likewise.
	* mac-xdep.c:  Likewise.
1998-12-23 23:06:11 +00:00
Elena Zannoni 57ac5cfff1 Tue Dec 22 10:51:33 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* top.c: specify directory name for including readline.h

	* tracepoint.c: ditto.

	* utils.c: ditto.
1998-12-22 22:06:48 +00:00
Andrew Cagney f7e85b1bc1 CARP:
Consolidate the semi-dynamic target system dependant GDB parameters
moving them all into a new file.
1998-12-14 02:37:16 +00:00
Andrew Cagney aaa3c096db CARP:
Re-do TARGET_PRINT_INSN_INFO, TARGET_PRINT_INSN, TARGET_ARCHITECTURE,
TARGET_ARCHITECTURE_AUTO, TARGET_BYTE_ORDER_SELECTABLE_P,
TARGET_BYTE_ORDER so that they can all be overriden.

Document.

Convert mn10300 and PPC targets.
1998-12-13 23:28:46 +00:00
Geoffrey Noer d836385e11 Fri Nov 13 00:15:08 1998 Geoffrey Noer <noer@cygnus.com>
Changes to account for name change from cygwin32 to cygwin and
        clean up Win32-related ifdefs.

        * configure.tgt: check for cygwin* instead of cygwin32.
        New cygwin gdb_target variable loses the "32".
        * configure.host: check for cygwin* instead of cygwin32.
        New cygwin gdb_host variable loses the "32".
        * configure.in: test __CYGWIN__ instead of __CYGWIN32__,
        rename gdb_cv_os_cygwin32 variable to drop the "32".  Call
        AM_EXEEXT instead of AC_EXEEXT since that isn't in a released
        autoconf yet.
        * configure: regenerate.

        * main.c: drop "32" from cygwin_ funcs, include sys/cygwin.h
          where
        cygwin path conv protos live, instead of adding a proto here
          for
        them here.
        * {main.c, ser-tcp.c, ser-unix.c, top.c}: check __CYGWIN__
        instead of __CYGWIN32__.
        * source.c: thoughout, check _WIN32 instead of WIN32.

        * config/i386/cygwin32.mh: delete.
        * config/i386/cygwin.mh: new file, was cygwin32.mh.
        * config/i386/cygwin32.mt: delete.
        * config/i386/cygwin.mt: new file, was cygwin32.mt.
        * config/i386/tm-cygwin32.h: delete.
        * config/i386/tm-cygwin.h: new file, was tm-cygwin32.h.
        * config/i386/xm-cygwin32.h: delete.
        * config/i386/xm-cygwin.h: new file, was xm-cygwin32.h.
        * config/i386/xm-windows.h: #include xm-cygwin.h now.
        * config/powerpc/cygwin32.mh: delete.
        * config/powerpc/cygwin.mh: new file, was cygwin32.mh.
        * config/powerpc/cygwin32.mt: delete.
        * config/powerpc/cygwin.mt: new file, was cygwin32.mt.
        * config/powerpc/tm-cygwin32.h: delete.
        * config/powerpc/tm-cygwin.h: new file, was tm-cygwin32.h.
        * config/powerpc/xm-cygwin32.h: delete.
        * config/powerpc/xm-cygwin.h: new file, was xm-cygwin32.h.

        * rdi-share/aclocal.m4: regenerate with aclocal.
        * rdi-share/configure: regenerate with autoconf.
        * rdi-share/{host.h, hostchan.c, hostchan.h, serdrv.c,
        * serpardr.c,
        unixcomm.c}: check __CYGWIN__ instead of __CYGWIN32__.
1998-11-13 08:16:08 +00:00
Christopher Faylor 3cee93ac7a * top.c (gdb_readline): Allow CRLF line termination on systems
which define CRLF_SOURCE_FILES.
* win32-nat.c: 1) Add thread support, 2) fix ability to attach to
a running process, and 3) implement limited support for cygwin
signals.
(thread_rec): New function.
(child_add_thread): Ditto.
(child_init_thread_list): Ditto.
(child_delete_thread): Ditto.
(do_child_fetch_inferior_registers): Ditto.
(do_child_store_inferior_registers): Ditto.
(handle_output_debug_string): Ditto.
(child_fetch_inferior_registers): Use do_* function to perform
operation.
(child_store_inferior_registers): Ditto.
(child_continue): Ditto.
(child_thread_alive): Ditto.
(cygwin_pid_to_str): Ditto.
(handle_load_dll): Reorganize, add first attempt at reading
dll names from attached processes.  Change info messages to provide
more information when dll is already loaded.
(handle_exception): Changes mandated by new thread-aware structures.
(child_wait): Track thread creation/destruction.  Handle cygwin
signals.
(child_create_inferior): Ditto.
(child_resume): Ditto.
(child_kill_inferior): Ditto.  Close child process handle to avoid a
handle leak.
(child_ops): Fill out child_ops fields that deal with threads.
* config/i386/tm-cygwin32.h: Declare function and macro needed
for converting a cygwin "pid" to a string.
* config/i386/xm-cygwin32.h: define HAVE_SIGSETMASK as 0 since
sigsetmask is not defined in cygwin.
1998-11-05 14:08:48 +00:00
Jason Molenda ad3b8c4a1a 1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
        possible nested-if confusion.
        * breakpoint.c (breakpoint_here_p): Ditto.
        (breakpoint_inserted_here_p): Ditto.
        (breakpoint_thread_match): Ditto.

        * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
        * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
        prototypes.

        * symtab.h: Add prototype for _initialize_source.
        * value.h: Add prototype for _initialize_value.

        * defs.h: Include sys/types.h or stddef.h to get size_t.
        (make_cleanup): Add make_cleanup_func typedef and switch to using
        a prototype for this function.
        (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
        using mmalloc.

        * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
        dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
        infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
        symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
        Cast parameters passed to make_cleanup to use the new
        make_cleanup_func typedef.


More warning cleanups.  There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system.  Bwahahaha.  You can see them
like this:

grep make_cleanup\  * | grep -v make_cleanup_func

I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
1998-10-14 01:15:00 +00:00
Tom Tromey d5adad6aa2 * top.c (context_hook): Define.
* gdbtk-hooks.c (context_hook): Don't define.
1998-08-31 22:43:21 +00:00
Keith Seitz 21b3bc779c * ser-unix.c (wait_for): Do not reset timeout_remaining for cygwin32 so
that
        we can use this member to track real timeouts.
        (hardwire_readchar): Modify for cygwin32 so that we only ever use a real
        system timeout of one second. Track the "real" timeout as a series of th
ese
        one second timeouts.
        Call ui_loop_hook to keep the gui alive.

        * top.c: Define new hook for cygwin32, "ui_loop_hook".

        * gdbtk.c (gdbtk_init): Add ui_loop_hook for CygWin32 to work around
        update problems.
1998-05-24 21:05:12 +00:00
Elena Zannoni e6e9507d63 Mon Apr 13 16:28:07 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* utils.c: (warning) added call to warning_hook

        * source.c: (find_source_lines) modified to call warning in case
        of source vs. executable time stamp mismatch. Simplified object
        file check. Initialized mtime to 0.

        * defs.h: added warning_hook prototype

        * top.c: added warning_hook prototype.

        * gdbtk.c: (perror_with_name_wrapper) new function to call
        perror_with_name safely.
        (gdb_loadfile) added source vs. executable time stamp check.
        (gdbtk_warning) new function to pass a warning message to the gui.
        (gdbtk_ignorable_warning) new function to pass a warning
        to the gui. Used only for the src. vs. exec check.
        (gdbtk_init) added warning_hook
        added include <sys/stat.h>
1998-04-13 21:54:22 +00:00
Jason Molenda bf9084c0a5 Wed Apr 8 19:21:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
* top.c (print_gdb_version): Print 1998 now.
1998-04-09 02:22:27 +00:00
Elena Zannoni 929db6e5e2 Sat Mar 21 19:34:49 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
merged changes from Foundry (list follows by file/author):

        - Tom Tromey  <tromey@cygnus.com>
        * Makefile.in (gdbres.o): New target.
        (WINDRES): New define.
        * configure: Rebuilt.
        * configure.in (WINDRES): Define.
        (CONFIG_OBS): Include gdbres.o on Windows.
        * gdbtool.ico: New file.
        * gdb.rc: New file.

        * ser-unix.c
        - Keith Seitz  <keiths@onions.cygnus.com>
        (wait_for): Don't reset the timeout_remaining for CYGWIN32,
        since we now effectively poll the serial port.
        Don't reset the current_timeout, either, since this member is used
        by hardwire_readchar to track the timeout and call the ui_loop_hook.
        (hardwire_readchar): Poll the serial port for Cygwin32. We timeout every
        second, update the UI, and loop around doing this until we have hit the real
        timeout or we get data or an error. This will allow the UI to stay active
        while gdb is "blocked" talking to the target.
        - Martin M. Hunt  <hunt@cygnus.com>
        (wait_for): Do reset current_timeout
        because it is only used to keep track of what the
        current timeout for the scb is.

        * top.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (quit_confirm): Change exit message again
        for GUI.
        (pc_changed_hook): Add prototype.
        - Tom Tromey  <tromey@cygnus.com>
        (quit_confirm): Added missing `else'.
        (quit_confirm): Special-case message if init_ui_hook is
        set.

        * symtab.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (find_pc_sect_line): If no symbol information
        is found, return correct pc anyway.
        (find_methods): Comment out an apparently
        bogus error message because it messes up Foundry.

        * serial.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (_initialize_serial): Add a description of
        "set remotelogbase".

        * findvar.c
        - Martin M. Hunt  <hunt@cygnus.com>
        (write_register_gen): Add call to
        pc_changed_hook if the PC is being changed.

        * defs.h
        - Martin M. Hunt  <hunt@cygnus.com>
        (pc_changed_hook): Define.

        * command.c
        -  Martin M. Hunt  <hunt@cygnus.com>
        (do_setshow_command): If no arguments are supplied,
        don't dump core, instead print out an error message.

        * breakpoint.c
        - Martin M. Hunt  <hunt@cygnus.com>
        Make set_raw_breakpoint, set_breakpoint_count,
        and breakpoint_count non-static so they are accessible from
        gdbtk.c.
        (enable_breakpoint): Enable breakpoint
        with same disposition instead of changing all breakpoints
        to donttouch.

        * annotate.h
	- Keith Seitz  <keiths@onions.cygnus.com>
        Add declarations for annotation hooks.

        * annotate.c
	- Keith Seitz  <keiths@onions.cygnus.com>
        Add hooks: annotate_starting_hook, annotate_stopped_hook,
        annotate_signalled_hook, annotate_exited_hook.
        (annotate_starting): If hook exists, call it instead.
        (annotate_stopped): If hook exists, call it instead.
        (annotate_exited): If hook exists, call it instead.
        (annotate_signalled): If hook exists, call it instead.

Sat Mar 21 19:34:49 1998  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>

	Merged changes from Foundry: list follows by author:

	- Tom Tromey  <tromey@cygnus.com>

	* Makefile.in (gdbres.o): New target.
	(WINDRES): New define.
	* configure: Rebuilt.
	* configure.in (WINDRES): Define.
	(CONFIG_OBS): Include gdbres.o on Windows.
	* gdbtool.ico: New file.
	* gdb.rc: New file.
        * gdbtk.c (gdbtk_init): Call ide_create_messagebox_command.
	(gdbtk_cleanup): Call ide_interface_deregister_all.
	(gdbtk_init): Pass event handle to cleanup.
	(TclDebug): Use Tcl_Merge to construct command.
	(gdbtk_init): Call ide_create_cygwin_path_command.

        - Martin M. Hunt  <hunt@cygnus.com>

	* gdbtk.c (gdb_set_bp): Set addr_string for bp.
	(gdb_get_breakpoint_info): Demangle function
	names in breakpoint info.
	Include "demangle.h".
	(gdb_loc, gdb_listfuncs): Demangle C++
	function names.
	(gdb_set_bp): Properly quote filename to fix
	problems with spaces. Send pc back as a hex string.
	(gdb_listfuncs): Remove debugging line.
	 Turn off some debugging lines.
 	(breakpoint_notify): Return correct line number.
	(gdb_get_breakpoint_info): Return correct line number.
	(gdb_set_bp): New function to provide a better way to
	set breakpoints.
	(gdbtk_readline, gdbtk_readline_begin): Memory
	allocated by tcl needs to be freed by Tcl_Free().
	(find_file_in_dir): Deleted.
	(gdb_find_file_command): Call full_lookup_symtab().
	(gdb_listfuncs): Call full_lookup_symtab().
	(full_lookup_symtab): New function.  Like lookup_symtab
	except handles multiple files with the same basename,
	full pathnames, and always sets symtab->fullname.
	(gdb_loadfile): Call full_lookup_symtab(). Clear
	realloc'd memory.
	(gdb_loadfile):  Don't tag lines without source.
	Tag source lines with source_tag.
	(gdb_find_file_command, find_file_in_dir):
 	Rewrite.  Now searches symtabs and psymtabs for a match
	on the partial or full filename.  Returns the full pathname.
	(gdb_loadfile): Realloc additional memory
	if someone loads in a file with more than 160,000
	lines.  I don't know if this really works because
	I don't have enough memory to test it.
	(gdb_sourcelines): Deleted.
	(gdb_loadfile): New function. Takes a text widget
	and loads it with the contents of a file.  Marks
	and tags source lines.
	(pc_changed): New function.
	(get_pc_register): Returns the value of
	the PC to GDB.
	(gdb_loc): If looking on the stack, return
	real pc along with calling source line.
	(gdb_loc): Return "" instead of "N/A" if
	filename is not found.
	(gdb_get_breakpoint_info): Same.
	(get_register): For Natural mode, set format to 0.
	 Minor bugfixes from keiths.
	(TclDebug): New function for debugging use.
	(gdb_loc): Return correct PC for frames
	that are not the innermost frame.
	(gdb_listfiles): Rewritten to use object
	API.  Now takes an optional dirname which will cause
	only files in that directory or its subdirectories
	to be returned.  Now returns basenames instead of
	full pathnames.
	(gdb_cmd): Set/reset load_in_progress flag.
	(call_wrapper): Don't pop up dialog for errors in
	downloads; just abort download.
	(gdbtk_load_hash): Set return value correctly.

        -  Keith Seitz  <keiths@onions.cygnus.com>

	* gdbtk.c (gdbtk_init): Define the ui_loop_hook so that it can be
	called by routines which might block, allowing us to update the GUI.
	(gdbtk_wait): Move timer calls to annotation hooks.
	(gdbtk_init): Define the annotation hooks.
	(gdbtk_annotate_starting): New function for cygwin32 hosts.
	(gdbtk_annotate_stopped): New function for cygwin32 hosts.
	(gdbtk_annotate_exited): New function for cygwin32 hosts.
	(gdbtk_annotate_signalled): New function. for cygwin32 hosts.
	(gdbtk_init): Use gdbtk_print_frame_info hook.
	(gdbtk_print_frame_info): New function which sets current_source_symtab
	based on the given symtab and line info.
	(gdb_immediate_command): New function which does
	not buffer any
	output. (Contrast to gdb_cmd.)
	(gdb_prompt_command): New function to return gdb's prompt.
	(find_file_in_dir): New functon which searches source paths
	for a given filename.
	(gdb_find_file): New function which returns path to given file -- uses
	find_file_in_dir.
	(gdbtk_init): Install "gdb_immediate", "gdb_find_file", and
	"gdb_prompt"
 	commands into interpreter.

        -  Ian Lance Taylor  <ian@cygnus.com>

	* gdbtk.c (gdbtk_timer_going): If __CYGWIN32__, new static
	variable.
	(gdb_cmd): If __CYGWIN32__, if executing the load command, call
	gdbtk_start_timer and gdbtk_stop_timer.
	(call_wrapper): If __CYGWIN32__, if the timer is going, turn it
	off.  Clear load_in_progress.
	(x_event): If load_in_progress, quit if download_cancel_ok.
	(gdbtk_start_timer): Set gdbtk_timer_going.
	(gdbtk_stop_timer): Clear gdbtk_timer_going.
	(gdbtk_wait): Call x_event.
	(gdbtk_init): Call ide_create_win_grab_command if
	__CYGIN32__.
	(gdb_clear_file): Clear stop_pc.
1998-03-22 23:02:10 +00:00
Jason Molenda 8d743926f4 * top.c (do_nothing): Remove signal handler after signal is caught.
Helpful for SYSV systems where two ^-\s will cause problems.  Should have
no effect on BSD systems.
1998-02-06 01:22:01 +00:00
Stan Shebs 59ae1b0fa9 * top.c (print_gdb_version): Restore to original message. 1998-01-19 22:31:03 +00:00
Felix Lee 23f38c9ef9 * top.c (print_gdb_version): delete stutter. 1998-01-16 20:26:57 +00:00
David Taylor 4b65fd3879 fix gdb/13620 -- control-c to interrupt gdb command only works once.
if HAVE_SIGSETJMP is not defined, nothing is changed; if it is defined
(as it now is for sysv4 based systems), then the fix is enabled.
1998-01-05 15:36:49 +00:00
Keith Seitz 018d76dddb * tracepoint.c (set_raw_tracepoint): make sure there's a trailing slash on
the directory name

        * Merge (lots) with foundry-971118-build

        * Makefile.in (install-only): install the new gdbtk, not the old

        * top.h: add declaration of get_prompt

        * top.c (get_prompt): new function

        * gdbtk.c (gdbtk_call_command): also run idle hooks for class_trace
        commands
        (gdbtk_init): add new commands "gdb_get_locals", "gdb_get_args",
        "gdb_get_function", "gdb_get_line", "gdb_get_file",
        "gdb_tracepoint_exists", "gdb_get_tracepoint_info", "gdb_actions",
        and "gdb_prompt"
        (gdb_get_vars_command): new function
        (gdb_get_line_command): new function
        (gdb_get_file_command): new function
        (gdb_get_function_command): new function
        (gdb_get_tracepoint_info): new function
        (gdbtk_create_tracepoint): new function
        (gdbtk_delete_tracepoint): new function
        (tracepoint_notify): new function
        (tracepoint_exists): new function
        (gdb_actions_command): new function
        (gdb_tracepoint_exists_command): new function
        (gdb_prompt_command): new function

        * main.tcl: initialize gdbtk_state(readline)

        * console.tcl (invoke): get realine working
        (activate): add prompt argument for readline
        (setprompt): add prompt argument for readline

        * interface.tcl (gdbtk_tcl_readline): hack to get readline working

        * lots: Merge with foundry-971118-build

        * console.tcl (setprompt): get prompt from gdb

        * prefs.tcl (pref_set_defaults): add tracepoint defaults

        * interface.tcl (gdbtk_tcl_tracepoint): new function

        * src.tcl (constructor): set default behavior of left click, make
        a tracepoint dot, too
        (fill_files): "new" function: ripped out of "location"
        (location): use fill_files instead
        (do_bp): add support for tracepoints
        (bp_line): add support for tracepoints
        (set_tracepoint): new function
        (config_win): add "Set tracepoint here" to right-click menu

        * actiondlg.tcl: new file to help with tracepoint data collection actions

        * tracedlg.tcl: new file to help with tracepoints
1997-11-26 22:38:10 +00:00
Andrew Cagney ee36741e63 Allow backends to set the architecture using bfd_architecture enum
instead of some magic name.
1997-09-03 07:31:55 +00:00
Andrew Cagney cd2c720ae2 Add ``set processor'' - an alias to ``set architecture''. 1997-09-01 03:43:08 +00:00
Andrew Cagney d0aba53f38 New commands ``set architecture'', ``show architecture'' and ``info
architecture''.  Update SH target to use new target_architecture_hook.
1997-08-28 10:20:21 +00:00
Andrew Cagney 750b794296 Only pass endianess to simulator when explicitly set by user with set
endian.
Prepend endian argument so that it can be overriden with target sim -ARGS.
1997-08-27 07:45:50 +00:00
Jeff Law 5959df8e16 * top.c (execute_command): Force cleanup of alloca areas.
* findvar.c (registers_changed): Likewise.
Fixes memory "leak" reported by HP.  Call from execute_command is for general
alloca cleanup; call from registers_changed is to fix hp's specific problem.
1997-07-25 22:47:17 +00:00
Martin Hunt 2476848aaf Thu Jul 10 00:02:41 1997 Martin M. Hunt <hunt@cygnus.com>
* Makefile.in, configure.in, aclocal.m4: Add Itcl, Tix, and
	IDE configuration information.

	* gdbtk.c (breakpoint_notify): Send address, linenumber and
	filename when a breakpoint is set.  Avoids call to bp_info.
 	(gdbtk_init): Call Tcl_FindExecutable(). Add code to handle
	Itcl, Tix and IDE initialization.

	* defs.h (init_ui_hook): Change prototype to accept one arg.

	* main.c (gdb_init): Change prototype to accept one arg.

	* top.c (gdb_init): Accepts one argument which it uses to
	call (*init_ui_hook), which will be gdbtk_init(). This is
 	used for calling Tcl_FindExecutable().

	* gdbtcl/breakpoint.tcl (gdbtk_tcl_breakpoint): Change to
	accept variable number of args for compatibility with
	cchanges in gdbtk.c.

	* configure: Regenerated.

	* gdbtcl/tclIndex: Regenerated.
1997-07-10 07:15:26 +00:00
Andrew Cagney 95edd7c167 Don't restrict the endian commands to BI-ENDIAN gdb. 1997-05-23 09:25:01 +00:00
Michael Snyder 6a85a617df Mon Apr 28 17:27:40 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
* top.c: change "to enable to enable" to "to enable" in a couple
        of help strings.
1997-04-29 00:32:03 +00:00
Stu Grossman 4ce7ba5188 * Makefile.in (SUBDIRS): Add mswin so that make cleanup cleans up
that directory.
	* defs.h utils.c (error warning):  Make message be const.
	* main.c (fputs_unfiltered):  Only send gdb_stdout and gdb_stderr
	to hook.  Otherwise send it to fputs.
	* monitor.c monitor.h (monitor_get_dev_name):  New function.  Does
	the obvious.
	* remote-e7000.c:  Remove debugify stuff.  Change printf, fprintf
	to _filtered forms to make output appear in GUIs.  Replace all
	uses of SERIAL_READCHAR with readchar, which has better error
	checking.
	* (e7000_parse_device):  Add prototype.
	* (readchar):  Improve doc.  Handle random serial errors.
	* (expect):  Disable notice_quit code.  It's busted.  Remove
	serial error handling (it's now handled in readchar).  Remove
	remote_debug echoing.  That's handled in readchar as well.
	* (e7000_parse_device):  Remove serial_flag arg.  It's not
	necessary.
	* (e7000_open):  Split into two pieces.  Second part is
	e7000_start_remote, and is error protected.  Now, when we connect
	to the target, we setup the initial frame and registers so that
	the user gets an immediate indication of where the target is.
	* (gch):  Remove debug output.  That's handled by readchar.
	* (e7000_read_inferior_memory):  Handle errors better.
	* (_initialize_remote_e7000):  Get rid of `<xxx>' things from
	command names.  They show up when doing completion and confuse
	things horribly.
	* ser-e7kpc.c:  Remove the last seven months of brain damage.  Get
	rid of the DLL's since we can access the device directly from Win32s
	and Win95.  Get rid of debugify crud.
	* serial.c:  Remove debugify cruft.
	* (serial_logchar serial_log_command serial_write serial_readchar
	serial_send_break serial_close):  Merge common functionality into
	serial_logchar.  Clean up rest of routines.
	* sparclet-rom.c:  Disembowel.  Leave only download routine.
	Download routine now switches to remote target automatically.
	* top.c (disconnect):  Only define if SIGHUP is defined.  Cleans
	up MSVC/Win32 problem.
	* utils.c (gdb_flush):  Don't call hook unless it's for gdb_stdout
	or gdb_stderr.
	* config/sh/tm-sh.h:  Define TARGET_SH for WinGDB.
	* config/sparc/tm-sparclet.h:  Remove override for prompt.
1997-04-19 01:42:34 +00:00
Peter Schauer ac7a8760f5 * breakpoint.c (insert_breakpoints, watchpoint_check,
bpstat_stop_status):  Do not disable watchpoints going out of scope.
	(insert_breakpoints):  Make sure that the current frame is valid
	before calling find_frame_addr_in_frame_chain.

	* top.c (setup_user_args):  Handle quotes and backslashes.
	(print_gdb_version):  Update copyright year.
1997-03-15 08:53:41 +00:00
Dawn Perchik 16a43bf443 * defs.h: Fix cntl-C to read from the Windows message queue.
Add prototypes for make_final_cleanup (and the other cleanup
	routines.
	* remote-e7000.c: Fix sync code to timeout if unable to sync.
	Change sync code to report status while trying to sync-up
	with hardware.  Add debugging output and document.
	* ser-e7kpc.c: Swap order of len & offset to match implementation.
	Add debugging output and document.
	* serial.c: Add debugging output.
	* top.c: Add call to do_final_cleanups.
	Remove conditionals preventing Win32 from getting SIGQUIT.
	* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
	chain as a parameter.  Extract this generic code from the cleanup
	routines into separate funtions (*_my_cleanup).  Keep old
	functionality by passing "cleanup_chain" to the new funtions.
	Define the cleanup chain "final_cleanup_chain" to be a cleanup
	chain which will be executed only when gdb exits.  Add functions
	(*_final_cleanup) to match the original (*_cleanup) functions.
	(pollquit, quit, notice_quit): Fix to read cntl-C from the
	Windows message queue.
1997-02-12 10:27:11 +00:00
Michael Snyder 62dd860e25 * top.c: Add new commands "set annotate" and "show annotate".
PR 8511
1996-10-21 21:11:31 +00:00
Jeff Law e20c36baa7 * top.c (execute_control_command): Free values from while_control
and if_control conditions after evaluation to avoid storage leaks.
        From Peter Schauer.
Fixes 10442.
1996-09-30 17:16:35 +00:00
Fred Fish 50140ab2a7 * top.c (print_gdb_version): Rewrote to comply with new GNU coding
standards for the --version option.
	(print_gnu_advertisement): Remove, now part of print_gdb_version.
	(show_version): Remove call to print_gnu_advertisement.
	* top.h (print_gnu_advertisement): Remove prototype.
	* main.c (print_gdb_help): Move help to static function and
	add prototype.
	(main): Call print_gdb_help rather than inlining it.
	(main): Remove call to print_gnu_advertisement.
	* gdbtk.tcl (create_copyright_window): Increase timeout from
	15 seconds to 30 seconds.
1996-09-27 17:53:06 +00:00
Stu Grossman d9951af428 * Makefile.in: Add mswin to SUBDIRS. Add rules for
mswin/libwingdb.a and remote-wiggler.o.
	* breakpoint.c (breakpoint_here_p):  Clean up bp enabled test.
	* (breakpoint_inserted_here_p):  New func, just like
	breakpoint_here_p, except it's honest.  Honestly.
	* breakpoint.h:  Proto for above.
start-sanitize-gdbtk
	* configure configure.in:  Add host *windows* to list of hosts
	that don't support GDBtk.
end-sanitize-gdbtk
	* configure configure.in:  Add mswin to configdirs if host is
	i[3456]86-*-windows.
	* core-aout.c (fetch_core_registers register_addr) gdbcore.h:
	Change all vars that can contain addresses to type CORE_ADDR.
	* findvar.c (supply_register):  Allow val to be NULL.  This means
	that regno is unsupported.
	* (read_pc read_pc_pid write_pc write_pc_pid):  Make non-pid forms
	just call pid forms with inferior_pid so that there's only once
	place to hack PC's and such.
	* infrun.c (proceed):  Don't skip breakpoints if user changed PC.
	* remote-wiggler.c:  New file.  Support for BDM interface from
	Macraigor Systems.
	* serial.c:  Enhance serial logging capability.  Add hex and octal
	output modes (set remotelogbase {hex|octal|ascii}.  Also log
	breaks, timeouts, errors, and eofs.
	* serial.h:  Redefine SERIAL_SEND_BREAK to go through a wrapper
	function so that we can log breaks.  Don't export serial_logfile
	or serial_logfp.
	* top.c (execute_command):  Don't test for serial_logfp here.
	Just call serial_log_comand, and let serial.c sort it out.
	* valops.c (value_of_variable):  Don't attempt to establish frames
	for static and global variables.  This makes things work a bit
	better if the stack or frame pointer is trashed.
	* config/m68k/monitor.mt (TDEPFILES):  Add remote-wiggler.o.
	* config/m68k/tm-m68k.h:  Define STACK_ALIGN.  CPU32 can't hack
	misaligned stacks during function calls.
1996-09-05 01:01:05 +00:00
Stu Grossman 9e77e83d30 * dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c
mdebugread.c os9kread.c source.c top.c utils.c:  Don't
	include param.h or sys/file.h (or unistd.h in some cases).
	* defs.h exec.c inflow.c remote-array.c remote-e7000.c
	sparcl-tdep.c terminal.h utils.c:  Replace all occurances of
	__WIN32__, WINGDB, WIN32, etc... with _WIN32.
	* main.c:  Remove #ifndef WINGDB around option processing.  Fix
	bug with passing argc==0 and argv==NULL to getopt.
	* (main) Remove calls to access() before source_command.  Let
	soure_command handle access errors.
	* maint.c (maintenance_dump_me):  #ifdef out for _WIN32.
	* symtab.c (operator_chars):  Make this global for wingdb.
	* top.c (disconnect):  #ifdef out for _WIN32.
	* (source_command):  If got an error and from_tty, then call print
	error, else just return quietly.
	* utils.c (fatal_dump_core):  Can't kill ourselves under windows.
	Just exit.
	* (pollquit notice_quit):  #ifdef out stuff that doesn't exist
	under windows.
1996-08-08 02:50:22 +00:00
Fred Fish 3f550b5940 * configure.in: Add test for "long long" support.
* configure: Regenerate with autoconf.
	* acconfig.h: Add CC_HAS_LONG_LONG
	* config.in: Regenerate with autoheader.
	* config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove
	* config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	(FORCE_LONG_LONG): Remove.
	* config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version.
	* config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove.
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/pa/tm-hppa.h (GET_FIELD): Put parens around
	subtraction inside shift.  Put parens around subtraction
	in operand of bitwise and.
	(struct frame_info): Forward declare
 	if __STDC__ defined.
	(frame_saved_regs): Ditto.
	(struct value): Ditto.
	(struct type): Ditto.
	(struct inferior_status): Ditto.
	(init_extra_frame_info): Add prototype.
	(skip_prologue): Ditto.
	(frameless_function_invocation): Ditto.
	(frame_chain): Ditto.
	(frame_chain_valid): Ditto.
	(saved_pc_after_call): Ditto.
	(hppa_fix_call_dummy): Ditto.
	(hppa_push_arguments): Ditto.
	(pa_do_registers_info): Ditto.
	(in_solib_call_trampoline): Ditto.
	(in_solib_return_trampoline): Ditto.
	(push_dummy_frame): Ditto.
	* convex-tdep.c (decout): Use print_longest rather than
	fprintf_filtered.
	* defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set
	CC_HAS_LONG_LONG.
	(INT_MIN): Fix so it works correctly when assigned to a long long.
	* valprint.c (longest_to_int): Rewrite to remove dependence
	on INT_MIN and INT_MAX.
	(print_longest): Rewrite the code that falls back to synthesized
	hex output when LONGEST value is not representable as in a long and
 	printf doesn't support printing long longs.
	* ch-valprint.c (chill_val_print): Cast 2nd arg of
	chill_print_type_scalar to LONGEST.
	chill_print_type_scalar): Make static and add prototype.
	* hppa-tdep.c (get_field): Ifdef out unused function.
	(set_field): Ditto.
	(extract_3): Ditto.
	(extract_5_store): Ditto.
	(extract_11): Ditto.
	(extract_12): Ditto.
	(deposit_17): Ditto.
	(extract_14): Convert to static and add prototype.
	(deposit_14): Ditto.
	(extract_21): Ditto.
	(deposit_21): Ditto.
	(extract_17): Ditto.
	(extract_5r_store): Ditto.
	(extract_5R_store): Ditto.
	(extract_5_load): Ditto.
	(find_proc_framesize): Ditto.
	(find_dummy_frame_regs): Ditto.
	(sign_extend): Ditto.
	(find_unwind_entry): Add prototype.
	(find_return_regnum): Ditto.
	(unwind_command): Ditto.
	(find_dummy_frame_regs): Add parens around subtraction in operand
	of bitwise-and.
	(skip_prologue): Add parens around operands of logical-and inside
	operand of logical-or.
	(sign_extend): Add parens around operands of subtraction inside
	operand of shift.
	(low_sign_extend): Ditto.
	* top.c (filename_completer): Convert old style decl of
	filename_completion_function into prototype.
	* f-lang.c (patch_common_entries): Ifdef out unused function.
	* stabsread.c (read_cfront_baseclasses): Remove unused local
	variable "msg_noterm".
	(resolve_cfront_continuation): Remove unused local variable "fip".
	(read_type): Remove unused variable xtypenums.
	(read_cfront_static_fields): Remove unused variable "i".
	(read_cfront_static_fields): Remove unused variable "nfields".
	(read_cfront_member_functions): Add missing comment terminator.
	(read_cfront_static_fields): Return 1 rather than random value.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	* somsolib.c (som_solib_create_inferior_hook): Remove unused
	variable "u".
	(som_solib_create_inferior_hook): Remove unused variable
	shadow_contents.
	(language.h): Add for needed prototypes.
	(som_solib_sharedlibrary_command): Add prototype.
	* hpread.c: (hpread_read_array_type): Add prototype.
	* somread.c (hpread_build_pysmtabs): Add prototype.
	(hpread_symfile_finish): Ditto.
	(hpread_symfile_init): Ditto.
	* hppah-nat.c (fetch_register): Convert old style decl
	to prototype.
	(gdbcore.h): Include for needed prototypes.
	(fetch_register): Remove unused variable "mess".
	* remote-pa.c (get_offsets): Ifdef out unused function.
	(remote_start_remote): Remove unused variable "timeout".
	(boot_board): Add prototype.
	(reaad_frame): Add prototype.
	(getpkt): Remove unused variable "bp".
	(remote_kill): Add prototype.
	(remote_mourn): Add prototype.
	(remote_insert_breakpoint): Add prototype.
	(remote_remove_breakpoint): Add prototype.
	* valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined.
	* infcmd.c (do_registers_info): Only need prototype if
	DO_REGISTERS_INFO is not defined.
	(breakpoint_auto_delete_contents): Only need if
	CALL_DUMMY_BREAKPOINT_OFFSET is defined.
1996-07-28 06:32:48 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Dawn Perchik cb1709aeac * remote-e7000.c,remote.c,target.h,top.c:
Add set option "remote_timeout" for setting remote_timeout.
        Add set option "use_hard_breakpoints" for setting hardware
        .vs. memory breakpoints.
1996-06-28 12:27:08 +00:00
Fred Fish 41756e56ee * defs.h (read_command_lines, query_hook): Update prototypes.
(readline_begin_hook, readline_hook, readline_end_hook): Declare.
	* breakpoint.c (commands_command): Build message in temporary buffer
	and pass that, as well as tty control flag, to read_command_lines.
	* top.c (readline_begin_hook, readline_hook, readline_end_hook):
	Define here.
	(command_loop): Check for non-NULL instream before looping.
	(command_line_input): Use readline_hook when appropriate, to get
	user input from a GUI window.
	(read_next_line): Also build prompt if getting user input from a GUI.
	(recurse_read_control_structure): Fix typo in comment.
	(read_command_lines): Use passed in prompt and tty flag to decide how
	to build message.  Use readline_begin_hook when appropriate, to set
	up a GUI interaction window.  Just return head, whether NULL or not,
	after using readline_end_hook to complete GUI interaction.
	(define_command, document_command): Build message in a temporary
	buffer and pass it to read_command_lines, along with tty flag.
	* gdbtk.c (gdbtk_readline_begin, gdbtk_readline, gdbtk_readline_end):
	New functions.
	(tk_command_loop): Set instream to NULL to enable Tk user interaction.
	(gdbtk_init): Set readline_begin_hook, readline_hook,
	and readline_end_hook.
	* gdbtk.tcl (gdbtk_tcl_readline_begin, gdbtk_tcl_readline,
	gdbtk_tcl_readline_end): New functions.
	(tclsh): Pack scroll bar on right side of window, not left.
PR 9385
1996-05-20 02:05:55 +00:00
Jeff Law ecebd69348 * top.c (read_next_line): Fix thinkos. From Don Seeley.
Net buglet.
1996-05-16 04:49:12 +00:00
Jeff Law 24ecc17a04 * top.c (execute_control_command, case while_control): Allow
a while command to be interrupted.
Fixes net bug.
1996-05-13 23:53:54 +00:00
Fred Fish 38d715a4c8 * README: Update for 4.16 release.
* configure.in (AC_CHECK_FUNCS): Also check for sbrk.
	* configure: Regenerate with autoconf.
	* config.in: Regenerate with autoheader.
	* main.c (main): Only use sbrk() when HAVE_SBRK is defined.
	* top.c (command_loop): Ditto.
1996-04-13 04:38:55 +00:00
Fred Fish b52cac6b76 * core-aout.c (fetch_core_registers): Cast core_reg_size to int
before testing against reg_ptr.
	* eval.c (evaluate_subexp_standard): Cast type of
	TYPE_FN_FIELD_VOFFSET to int.
	* findvar.c (extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer): Cast type of sizeof to int.
	* values.c (unpack_field_as_long, modify_field): Ditto.
	* valops.c (value_assign, call_function_by_hand): Ditto.
	* infcmd.c (do_registers_info): Ditto.
	* ser-tcp.c (tcp_open): Ditto
	* remote.c (putpkt): Ditto.
	* dcache.c (dcache_peek): Ditto.
	* dcache.c (dcache_poke): Ditto.
	* m2-exp.y (yylex): Ditto.
	* gnu-regex.c (re_match_2): Ditto.
	* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
	out unused macro definition and variables.
	* inftarg.c (proc_wait): Move from main.c to here, and make static.
	* valprint.c (val_print_string): Change bufsize from int to unsigned.
	* main.c (wait.h): Include
	* top.c (command_line_input): Remove unused variable "c".
	* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
	value TYPE_CODE_TYPEDEF to switch statement.
	(f_type_print_varspec_suffix): Add missing enum value
	TYPE_CODE_TYPEDEF to switch statement.
	* ch-exp.c (parse_primval): Add remaining enumeration values to
	switch statement, with no specific action.
	(ch_lex): Add LOC_UNRESOLVED in switch statement.
	(pushback_token): Ifdef out, since code using it is ifdef'd out.
	* stabsread.c (cleanup_undefined_types): Remove unused label
	"badtype".
	* objfiles.h (print_symbol_bcache_statistics): Add prototype.
	* maint.c (objfiles.h): Include.
	(maintenance_print_statistics): Remove unused variable "temp".
	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
	unused variable "found_file_symbol".
	* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
	* language.c (lang_bool_type): Use existing function local type
	variable rather than create block local variables.
	* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
	* infptrace.c (wait.h, command.h): Include.
	* ser-tcp.c (gdb_string.h): Include
	* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
	(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
	* command.c (complete_on_enum): Make assignment used as truth value
	explictly check against NULL.
	(wait.h): Include.
	* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
	that uses it is ifdef'd out.
	* parser-defs.h: Add prototype for write_dollar_variable.
	* infrun.c: Add prototype for write_pc_pid.
	* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
	* symmisc.c (bcache.h): Include.
	* bcache.h: Add prototype for print_bcache_statistics.
	* symfile.c: Include <time.h>.
	* printcmd.c (print_scalar_formatted): Change len to unsigned int.
	* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
	* valarith.c (value_binop): Change result_len, promoted_len1,
 	and promoted_len2 to unsigned int.
	* valarith.c (value_subscripted_rvalue): Change elt_offs and
 	elt_size to unsigned int.
	* valops.c (value_array): Change typelength to unsigned int.
	(destructor_name_p): Change len to unsigned int.
	* scm-lang.h (scm_parse): Add prototype for scm_unpack.
	* symfile.c (decrement_reading_symtab): Change return type to void.
	* valarith.c (value_subscript): Remove unused variable "word".
	(value_subscript): Remove unused variable "tint".
	* valops.c (auto_abandon): Ifdef out, since code using it is also
	ifdef'd out.
	* eval.c (init_array_element): Remove unused variable "val".
	* Makefile.in (values.o): Depends on scm-lang.h.
	(command.o): Depends upon wait_h.
	(ser-tcp.o): Depends upon gdb_string.h.
	(infptrace.o): Depends upon wait_h and command_h.
	(maint.o): Depends on objfiles.h and symfile.h.
	* values.c (allocate_repeat_value): Remove unused variable
	"element_type".
	(scm-lang.h): Include.
	* breakpoint.c (create_longjmp_breakpoint): Enclose in
	GET_LONGJMP_TARGET define, unused otherwise.
	* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
	i386_remove_watchpoint and i386_stopped_by_watchpoint.
1996-03-30 05:45:10 +00:00
Stan Shebs f935141e4c * top.c (print_gdb_version): Update copyright year. 1996-03-05 02:13:33 +00:00
Peter Schauer 255181a9ed * dwarfread.c (read_func_scope): Avoid GDB core dumps if
AT_name tag is missing.

	* procfs.c (procfs_stopped_by_watchpoint):  Fix logic when
	FLTWATCH and FLTKWATCH are defined.

	* remote.c (remote_read_bytes):  Advance memaddr for transfers,
	return number of bytes transferred for partial reads.

	* top.c (init_signals):  Reset SIGTRAP to SIG_DFL.
1996-02-03 11:32:34 +00:00
Fred Fish e8f1ad9a8b * NEWS: Make note of new record and replay feature for
remote debug sessions.
	* serial.c (gdbcmd.h): Include.
	(serial_logfile, serial_logfp, serial_reading, serial_writing):
 	Define here, for remote debug session logging.
	(serial_log_command, serial_logchar, serial_write, serial_readchar):
	New functions for remote debug session logging.
	(serial_open): Open remote debug session log file when needed.
	(serial_close): Close remote debug session log file when needed.
	(_initialize_serial): Add set/show commands for name of remote
	debug session log file.
	* serial.h (serial_readchar): Declare
	(SERIAL_READCHAR): Call serial_readchar().
	(SERIAL_WRITE): Call serial_write().
	(serial_close): Declare as extern.
	(serial_logfile, serial_logfp): Declare.
	* top.c (execute_command): Declare serial_logfp.  Log user command
	in remote debug session log if log file is open.
	* remote-array.c (array_wait): #ifdef out echo to gdb_stdout.
	(array_read_inferior_memory): Rewrite to fix memory overwrite bug.
	* remote-array.c (SREC_SIZE): Remove, duplicates define in
	monitor.h.
	* remote-array.c (hexchars, hex2mem):  Remove, unused.
	* gdbserver/low-linux.c (store_inferior_registers): Remove
	unnecessary extern declaration of registers[].
	* gdbserver/Makefile.in (all): Add gdbreplay.
	* gdbserver/gdbreplay.c: New file.
	* gdbserver/README: Give example of recording a remote
	debug session with gdb and then replaying it with gdbreplay.
1996-01-24 21:30:37 +00:00
Ian Lance Taylor 3ecd62ca75 * top.c (set_endian_from_file): Use new bfd_big_endian macro. 1995-12-15 21:17:04 +00:00
Per Bothner f2ed3a80bb * top.c (command_line_input): Only strip out an initial #-comment.
Looking for internal comments is language-specific (breaks Scheme).
1995-11-29 23:22:32 +00:00
Jeff Law 05ee0201d1 * top.c (recurse_read_control_structure): Don't make cleanups
here.  Callers handle that correctly.
Fixes 6794.
1995-11-24 23:21:38 +00:00
Stu Grossman cd10c7e388 * breakpoint.c (breakpoint_re_set): #ifdef GET_LONGJMP_TARGET
around calls to create_longjmp_breakpoint.  Why install the
	breakpoints if we can't find the longjmp target?
	* infrun.c (wait_for_inferior):  Cleanup comments near call test.
	* remote-mips.c:  Fixed a bunch of prototypes to avoid char/int
	complaint from picky compilers.  Add comment to mips_expect.
	Replace all instances of sr_get_debug with remote_debug.
	* (mips_readchar):  Don't jam init string to monitor.
	mips_initialize() handles that.
	* (mips_receive_header):  Print better message when we get too
	much garbage.
	* (mips_request):  Allow caller to pass in buff to allow them to
	analyze the returned message.
	* (mips_initialize):  Re-do initialization to try sending a BREAK,
	a ^C, and then a download escape sequence.  Cleanup protocol
	startup.  Eliminate sleeps.  Clear breakpoints (if using monitor
	breakpoints).  Re-init frame.
	* (mips_detach):  Close down target.
start-sanitize-gm
	* (mips_resume):  Pass signal down to target.
	* (mips_create_inferior):  Start target with TARGET_SIGNAL_PWR.
end-sanitize-gm
	* (mips_wait):  Handle return status with registers, or breakpoint stuff.
	* (mips_kill):  Add ^C handling.
	* (mips_insert_breakpoint mips_remove_breakpoint):  Call new
	breakpoint stuff if enabled.
	* (calculate_mask remote_mips_set_watchpoint
	remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint):
	Hardware watchpoint/breakpoint stuff.
	* (common_breakpoint):  Common code for new monitor breakpoint commands.
	* (mips_load):  Don't use `prompt'.  It's a global variable.
	* top.c (dont_repeat_command):  New command for use in
	user-defined commands to suppress auto-repeat (by hittin return key).
start-sanitize-gm
	* utils.c (request_quit):  Call target_kill here.  Good idea.
	Needs a better implementation.
end-sanitize-gm
	* valops.c:  Add start of auto function-call abandonment capability.

start-sanitize-gm
	* c-exp.y:  Add code (currently disabled) to handle GM dynamic
	structures (it conflicts with @!).
	* eval.c (evaluate_subexp_standard):  ditto.
	* expprint.c (print_subexp dump_expression):  ditto.
	* expression.h (enum exp_opcode):  ditto.
	* parse.c (length_of_subexp):  ditto.
	* configure, configure.in:  Add mip*-*-magic* target.
	* magic.c magic.h:  Special routines to handle GM stuff (like
	stepping through dispatcher).
end-sanitize-gm
1995-10-27 17:48:36 +00:00
Stan Shebs b577652279 * top.c (execute_control_command): Use 0/1 instead of BFD's
true/false.
1995-10-07 00:27:31 +00:00
Jeff Law a25ffb081f * top.c (build_command_line): Demand arguments for if/while
commands.
1995-10-03 03:48:32 +00:00
Peter Schauer 080868b466 * mdebugread.c (parse_symbol): Handle sh.value of zero for enums.
Determine signedness of enum type from enumerators.
	(parse_type):  Handle btIndirect types, handle fBitfield for
	some non-member types.
	(upgrade_type):  Use TYPE_FLAG_TARGET_STUB for arrays with
	unknown length.
	(cross_ref):  Handle stIndirect forward reference to btTypedef.

	* stabsread.c (read_enum_type):  Determine signedness of enum
	type from enumerators.

	* top.c (execute_command):  Remove trailing whitespace from
	command arguments, except for `set' and `complete' commands.
	(validate_comname):  Allow underscores in user defined command
	names.

	* values.c (modify_field):  Change `Value does not fit in %d bits'
	error to a warning. Exclude sign extension bits of negative field
	values from fit check.
1995-08-26 07:35:13 +00:00
Stan Shebs 327332d87d * top.c (target_output_hook): Really make it match defs.h (char *
is not the same as unsigned char *).
1995-08-09 15:16:33 +00:00
Jeff Law 7aaec27bc7 * top.c (target_output_hook): Make declaration match the one
in defs.h.
1995-08-08 18:01:46 +00:00
Steve Chamberlain 764efb58e9 * top.c (target_output_hook): New definition. 1995-08-07 22:42:19 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
J.T. Conklin 1a49497348 * configure.in: Check for unistd.h.
* configure: Regenerated.

* command.c, cp-valprint.c, fork-child.c, i386-tdep.c,
i386b-nat.c, inflow.c, main.c, maint.c, objfiles.c, solib.c,
source.c, stack.c, symfile.c, top.c, utils.c: Include strings.h
and/or unistd.h to bring prototypes into scope.
1995-07-31 22:46:03 +00:00
Fred Fish 032f80d8d4 * top.c (show_endian): Cast first arg of printf_unfiltered to
correct type of "char *".
1995-07-20 22:04:37 +00:00
Stan Shebs 641c7fdfd7 From Richard Earnshaw (rearnsha@armltd.co.uk):
* infrun.c (wait_for_inferior): Set the convenience variable
	$_exitcode to the termination code of the inferior.
	* top.c (quit_command): Accept optional expression to use
	as parameter to exit().
1995-07-20 02:09:30 +00:00
Fred Fish 6b14af2bc6 * dache.c (struct dcache_block): Change data member from unsigned char
to char, since everything passed in and out of dcache is char or casted
	to appropriate type anyway.
	(dcache_alloc):  Move assignment of db out of test and combine separate
	tests into if-else.
	(dcache_peek_byte):  Change ptr from unsigned char* to char*.
	(dcache_peek_byte):  Remove now unnecessary cast in read_memory call.
	(dcache_peek):  Change cast of incoming data arg.
	(dcache_poke):  Change cast of addr of incoming data arg.
	(dcache_info):  Mask data passed to printf_filtered to lsbyte only.
	(dcache_info):  Change printf_filtered arg from "% 2x" to " %2x".
	* target.c (debug_to_thread_alive): Change return type to int and
	return zero, for type compatibility with other *_thread_alive funcs.
	(cleanup_target): Change cast of ignore function to match type of the
	to_thread_alive member.
	* defs.h (error_hook): Add ATTR_NORETURN.
	* defs.h (NORETURN, ATTR_NORETURN):  Switch from volatile to
	__attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug.
	* remote.c (remote_wait):  Cast first arg to strtol, strchr, and strncmp
	to "const char *" from "unsigned char *".
	(remote_wait):  Cast arg to putpkt and strcpy from "unsigned char *" to
	"char *".
	(remote_wait):  Change printf format for long arg from "%d" to "%ld".
	(getpkt):  Remove unused variable "bp".
	(remote_fetch_word, remote_store_word):  Ifdef out apparently unused
	functions.
	* breakpoint.c (watchpoint_check):  Removed unused variables
	"saved_level" and "saved_frame".
	* valops.c (value_arg_coerce):  Add other enum TYPE_CODE_* and
	default cases to switch for completeness.
	* infrun.c (wait_for_inferior):  Enclose "have_waited" label
	in #ifdef that matches the one in which it is referenced.
	* ser-unix.c (hardwire_noflush_set_tty_state):  Enclose otherwise
	unused variable "state" in #ifdef that matches one in which it is
	referenced.
	* eval.c (evaluate_subexp_standard):  Remove unused variable "var".
	* eval.c (evaluate_subexp_standard):  Remove unused variable "tmp_symbol".
	* valarith.c (value_subscript):  Remove unused variable "lowerbound",
	which is redeclared in a nested scope prior to use.
	* printcmd.c (print_frame_nameless_args):  Use "%ld" to print long
	arg, not "%d".
	* {mem-break.c, remote-pa.c, remote.c, saber.suppress}:
	Remove unused static var "check_break_insn_size".
	* buildsym.c (finish_block):  Add other enum LOC_* and default
	cases to switch for completeness.
	ch-lang.c (type_lower_upper):  Removed unused label "retry".
	Add other enum TYPE_* and default cases to switch for completeness.
	* f-typeprint.c (f_type_print_args):  Ifdef out unused function
	that may be used someday when Fortran support is complete.
	* ch-valprint.c (chill_print_type_scalar):  Add other enum
	TYPE_* and default cases to switch for completeness.
	(chill_val_print):  Remove unused local var "high_bound" that
	is redeclared in a nested scope prior to use.
	(chill_var_print):  Use "%ld" to print long arg, not "%d".
	* regex.c (re_compile_fastmap, re_match_2):  Add remaining enum types
	and default to switches for completeness.
	* minsyms.c (lookup_minimal_symbol_text): Delete unused variable
	"trampoline_symbol".
	(prim_record_minimal_symbol_and_info):  Return NULL rather than trash.
	* elfread.c (elf_symtab_read):  Don't dereference NULL returns from
	record_minimal_symbol_and_info.
	* f-lang.c (saved_function_list_end):  Ifdef out unused variable
	that may be used someday.
	* f-valprint.c (f_val_print):  Remove unused local variable "straddr".
1995-07-18 04:38:06 +00:00
Steve Chamberlain 45993f6118 Hmm.. The ChangeLog went in, but not the code....
* monitor.c: Turn on caching.
	(monitor_printf): If a ^C was sent, don't expect to see its
	echo.
	(monitor_open): Enable caching.
	(monitor_resume, monitor_load): Flush cache.
	(monitor_xfer_memory): Call cache routine.
	(monitor_dump_regs): New.
	(monitor_fetch_registers):  If monitor_dump_regs available
	then use it.
	(monitor_load): Don't ref exec_bfd if it's NULL.
	(monitor_load_srec): Use new monitor_make_srec calling convention.
	(monitor_make_srec): Rewrite to cope with two, three and four byte
	addresses.
	* remote-hms.c (hms_cmds): Initialze end-of-command delim.
	* dcache.h, dcache.h: Rewritten.
	* remote.c: Reenable caching.
	(getpkt): Reduce MAX_TRIES to 3.
	(remote_xfer_memory): Use dcache_xfer_memory.
	* defs.h (error_hook): New.
	* top.c (error_hook): New definition.
	* utils.c (error): Use error_hook if initialized.
	* sparcl-tdep.c (HAVE_SOCKETS): Don't define if GO32 or WIN32. Use
	HAVE_SOCKETS in place of #ifndef GO32.
1995-06-21 21:47:06 +00:00
Stan Shebs 2e1cc80191 Windows support bits from Steve Chamberlain <sac@slash.cygnus.com>.
* defs.h: Don't declare strchr and friends if WIN32.
	(DIRNAME_SEPARATOR): Move here from source.c.
	(SLASH_P, SLASH_CHAR, SLASH_STRING, ROOTED_P): New macros,
	symbolic definitions for filename bits.
	* top.c (cd_command): Use these.
	* source.c (mod_path, openp): Ditto.
	* terminal.h: Disable termio/sgtty definitions if WIN32.
	* findvar.c (registers_changed): Call registers_changed_hook
	if it is defined.
1995-06-12 20:07:45 +00:00
J.T. Conklin e3033bb086 * defs.h (ATTR_FORMAT): New macro, expands to gcc's format
attribute when compiled by gcc.
* defs.h, language.h, monitor.h: Changed many function
  declarations to use ATTR_FORMAT.

* breakpoint.c (delete_command); source.c (directory_command);
  top.c (define_command): Changed call to query() that had too
  many arguments.
* printcmd.c (address_info): Changed call to printf_filtered()
  that had too many arguments.
1995-05-19 22:44:51 +00:00
Peter Schauer 943b7032ab * mdebugread.c (parse_symbol): Do not relocate stBlock/scText
symbols, their value is the displacement from the procedure address.
	* top.c (init_main):  Add missing newlines to help strings for
	`if' and `while' commands, fix help string for `show commands'.
1995-05-16 07:12:22 +00:00
Jim Kingdon 0c0c911b03 * top.c, utils.c, defs.h: Remove error_hook. It is currently
unused and would need to hook into error_begin()/return_to_top_level(),
	instead of error(), if it were to be used.
1995-04-12 00:16:35 +00:00
Stan Shebs 49073be098 Always keep MPW support 1995-04-11 02:08:59 +00:00
Jim Kingdon dee803840d * top.c, utils.c, main.c: Replace error_pre_print with two
variables: error_pre_print (for RETURN_ERROR) and quit_pre_print
	(for RETURN_QUIT).  Fixes a bug whereby typing ^C (e.g. in "maint
	print sym") could output extraneous stuff.
	* objfiles.c: Don't declare error_pre_print; defs.h does it.
1995-04-04 20:07:21 +00:00
Stu Grossman 09374c9863 * command.h command.c top.c: Add var_enum command type. It's
like var_string but allows only only one of the specified strings.
1995-03-07 09:06:16 +00:00
Stan Shebs 7f4b4b71a2 * top.c (print_gdb_version): Update the year. 1995-02-21 20:27:41 +00:00
Stu Grossman 6131622e34 * annotate.c, breakpoint.c, defs.h, gdbtk.c, top.c: Replace
enable/disable_breakpoint_hook with modify_breakpoint_hook.
	* gdbtk.c:  General cleanups, get rid of unused variables.  Redo
	handling of stdout/stderr to just return output as the result of
	the tcl command that caused the output.  Cleanup -Wall stuff.
	* (breakpoint_notify):  Now returns just action and breakpoint
	number.
	* (gdb_get_breakpoint_list):  New routine.  Does the obvious.
	* (gdb_get_breakpoint_info):  Mostly derived from the old
	breakpoint_notify, but returns lots more info.
	* (dsprintf_append_element):  Helper routine, works like printf,
	but appends a tcl element onto the specified DString.  Good for
	building up lists as return values.
	* (gdbtk_enable/disable_breakpoint):  Go away.  Replaced with
	gdbtk_modify_breakpoint.
	* (*many routines*):  Use new result protocol.
	* (call_wrapper):  Make sure that recursive calls don't trash results.
	* gdbtk.tcl:  New windows, autocmd, and breakpoints.
	* (gdbtk_tcl_fputs):  Don't use $current_output_win redirection
	anymore.  It's not needed (in fact, this routine may not be needed
	anymore).
	* (gdbtk_tcl_breakpoint):  Change to reflect new breakpoint
	notification protocol.
	* (gdbtk_tcl_busy gdbtk_tcl_idle):  Straighten out buttons, remove
	catches.
	* (interactive_cmd):  Use this wrapper around button invocations
	of many commands.  This will catch errors and put the results into
	the command window.  It also updates all the other windows.
	* Also, change reliefs of most things to sunken.  This actually
	looks better.
	* (create_file_win):  Fix margin binding to allow breakpoints to
	work again.
	* (create_asm_win):  Use return value of gdb_disassemble instead
	of implicit I/O to the command window.
	* (create_command_window):  Use new result protocol to get output
	from commands.
1995-02-15 01:45:39 +00:00
Stu Grossman a76ef70a14 * core.c (dis_asm_read_memory), defs.h, gdbtk.c (gdb_disassemble),
top.c :  Get rid of dis_asm_read_memory_hook.  We can now call the
	disassemblers directly and have no need for this hook anymore.
	* defs.h, printcmd.c:  Make print_insn be static.

	* ser-go32.c (dos_comisr):  Make this 8 bit clean.
	* (dos_open dos_close):  Allow multiple opens to the same device.
	Use a ref count to prevent unwanted deallocations.
	* sparcl-tdep.c:  Put #ifdefs around all socket stuff to make GO32
	happy.
	* (sparclite_ops):  Switch to download_stratum.
	* target.h (enum strata):  Move download_stratum before
	process_stratum so that executable targets get pushed on top of
	download targets.
1995-02-03 19:35:54 +00:00
Stan Shebs e3be225eb4 gcc -Wall lint.
* alpha-tdep.c (alpha_in_lenient_prologue): Comment out.
	(after_prologue): Remove unused local b.
	* procfs.c (thread.h): Include.
	(pr_flag_table, pr_why_table, faults_table, siginfo_table): Use
	nested braces in initializer.
	* top.c (initialize_targets, initialize_utils): Declare.
	(locate_arg, insert_args): Add parens around tested assignments.
	* remote-utils.c (sr_scan_args): Remove decl of strtol.
	* remote.c (thread.h): Include.
	(remote_wait): Remove unused local p2.
	* sparc-tdep.c (fill_gregset, fill_fpregset): Remove decls of
	registers array.

	defs.h (stdlib.h): Include.
	(exit, perror, atoi, qsort, memcpy, memcmp): Don't declare.
	(fclose, atof, malloc, realloc, free, strchr, strrchr, strstr,
	strtok,	strerror): Don't specify parameter types in declaration.
1995-02-02 00:10:50 +00:00
Stan Shebs f22661eefd * top.c (use_windows): Clarify comments. 1995-01-28 01:38:39 +00:00
Steve Chamberlain 16041d5304 Sun Jan 15 14:36:19 1995 Steve Chamberlain <sac@splat>
* breakpoint.h (disable_breakpoint, enable_breakpoint):
	New declarations.
	(enum bpdisp): Change name of 'delete' member to 'del'.
	(struct bpstat): Changed name to 'bpstats'.
	* breakpoint.c (disable_breakpoint, enable_breakpoint,
	breakpoint_chain): Made globally visible.
	(bpstat_stop_status): Use new name for bpstat.
	(break_command_1, watch_command_1, catch_command_1,
	breakpoint_auto_delete, denable_delete_breakpoint): Use 'del'
	instead of 'delete'.
	(set_breakpoint_sal): New function.
	* defs.h (registers_changed_hook): New declaration.
	* infcmd.c (run_stack_dummy): 'delete' is now 'del'.
	* inflow.c (new_tty): Treat WIN32 in same way as __GO32__
	* main.c (main): Don't scan options when in WIN32 and exit
	without entering main loop.
	* m2-exp.y (m2_elx): Member 'class' is now 'aclass'.
	* symtab.h (struct symbol, struct partial_symbol): Changed name of
	member 'class' to 'aclass'.
	(SYMBOL_CLASS, PSYMBOL_CLASS): Reflect change.
	* top.c (registers_changed_hook): New definition.
	* utils.c (quit, notice_quit, initialize_utils): Treate WIN32
	in same way as __GO32__.
	* value.h (c_typedef_print): Rename 'new' argument.
1995-01-15 23:17:43 +00:00
Jeff Law 59528079ca * command.c (show_user_1): Use print_command_line to show a user
defined command (including control structures).

	* top.c (init_main): Change documentation for user defined
	commands to indicate they may accept up to ten arguments.
1995-01-11 07:46:44 +00:00
Stu Grossman 0972203902 * Makefile.in (install_only uninstall): Indent for clarity
* core.c (dis_asm_read_memory):  Add call to
	dis_asm_read_memory_hook to provide alternate way for disassembler
	to read memory.

	* defs.h:  Protect from multiple inclusion.  Add decl for
	dis_asm_read_memory_hook.

	* gdbtk.c (finish_saving_output):  Don't do anything if not saving
	output.
	* (breakpoint_notify):  Don't send null filename to tcl.
	* (gdb_eval):  New tcl command to eval an expression.
	* (gdb_disassemble):  New tcl command to do disassembly.  This
	allows tcl code to choose between exec file and target memeory,
	and can also do mixed source and assembly.
	* (gdbtk_init):  Move reading of gdbtk.tcl to the end to make sure
	that more of the environment is set up.  Also, create link between
	gdb and tcl vars disassemble{-_}from{-_}exec.

	* gdbtk.tcl:  New expression window support.
	* Make assembly window be 80 columns wide.
	* Use new disassembly method.  Add menu items to select
	disassembly from exec file or target.
	* Change View menubar item to Options.

	* Get rid of Stack, Breakpoints, Signals, and Variables Windows,
	since they don't exist yet.

	* Pop up a copyright window on startup.

	* top.c:  Make window startup be the default.
	* Add dis_asm_read_memory_hook.
1995-01-06 01:55:45 +00:00
Jim Kingdon fd2ae9ec28 * top.c (locate_arg): Call strchr not index. 1995-01-04 17:46:40 +00:00
Jeff Law 0f8cdd9ba4 * Allow up to 10 whitespace separated arguments to user defined
commands.
        * top.c (struct user_args): Structure for holding arguments to
        user defined commands.
        (print_command_line): Delete unused "tmp_chain" variable.  Clean
        up flow control by having cases exit in the same manner.
        Before executing a command or evaluating an expression, substitute
        the current $arg0..$arg9 values if the command/expression uses them.
        (arg_cleanup): New function.
        (setup_user_args, locate_arg, insert_args): Likewise.
        (execute_user_command): Allow arguments to user defined commands.

        * Allow if/while commands to be used within a breakpoint command
        list.
        * breakpoint.c (bpstat_do_actions): Call execute_control_command
        rather than execute_command (passes entire command structure rather
        than just the command line text).
        (breakpoint_1): Use "print_command_line" to print a breakpoint
        command line (including control structures).
        * gdbcmd.h (execute_control_command): Provide extern decl.
        (print_command_line): Likewise.
        * top.c (execute_control_command): No longer static.
        (print_command_line): New function to recursively print a command
        line, including control structures.
1994-12-30 19:53:39 +00:00
Stan Shebs 83ebf43970 * top.c (command_loop): For space usage display, show both
absolute size and the change from before command execution.
1994-12-16 01:19:40 +00:00
Stu Grossman 86db943ceb * defs.h, gdbtk.c (gdbtk_fputs), main.c (gdb_fputs), top.c: Add stream arg
to fputs_unfiltered_hook.  Differentiate stdout from stderr when
	passing text into tcl land.
	* defs.h, top.c, utils.c (error):  Add error_hook.
	* gdbtk.c:  Improve mechanism for capturing output values.
	* (full_filename):  Remove.
	* (gdb_cmd call_wrapper gdbtk_init):  Protect all calls from tcl
	land with call_wrapper.  This prevents longjmps (usually via
	error()) from jumping out of tcl/tk and leaving things in an
	indeterminate state.
	* gdbtk.tcl:  New view option to disable line numbers.  Put catch
	around most uses of gdb_cmd.  Add update button to reg config
	window.  Stop doing immediate updates when selecting registers.
	Change register view values into checkbuttons.
1994-12-16 01:07:35 +00:00
Stan Shebs e04f89015d * top.c (read_next_line): Pass annotation suffix "commands"
instead of "command", matches documentation.
1994-11-29 20:45:13 +00:00
Stan Shebs dfb14bc8f4 * top.c (command_line_input): If annotation suffix is NULL,
replace it with an empty string.
	(read_next_line): Pass "command" as annotation suffix to
	command_line_input.
1994-11-28 23:26:58 +00:00
Stan Shebs 43ab4ba582 Maintenance commands to report time and space usage.
* main.c (display_time, display_space): New globals.
	(main): Add argument --statistics to enable reporting, display
	time and space after startup is done.
	* maint.c (maintenance_time_display, maintenance_space_display):
	New commands.
	* top.c (command_loop): Display time and space after command
	execution.

	* top.c (pre_init_ui_hook): New global.
	(gdb_init): If pre_init_ui_hook set, call before all other init.
1994-11-23 03:27:40 +00:00
Peter Schauer 9ed8604f38 * top.c (line_completion_function): Renamed from
symbol_completion_function, takes the line buffer and the
	point in the line buffer as additional arguments.
	(readline_line_completion_function):  New function, interface
	between readline and line_completion_function.
	(init_main):  Use it.
	(complete_command):  Use line_completion_function instead of
	abusing rl_line_buffer. Free completion strings after printing
	them.
	* symtab.c (completion_list_add_name):  Recheck for duplicates
	if we intend to add a modified symbol.

	* gdbtypes.h (cplus_struct_type):  nfn_fields_total no longer
	includes the number of methods from the baseclasses.
	* stabsread.c (attach_fn_fields_to_type):  No longer add the
	number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
	the baseclass type might not have been completely filled in yet.
	* symtab.c (total_number_of_methods):  New function to compute
	the total number of methods for a type, including the methods
	from baseclasses.
	(decode_line_1):  Use it instead of TYPE_NFN_FIELDS_TOTAL to
	allocate the symbol array for find_methods.

	* stabsread.c (scan_file_globals):  Add default case to minimal
	symbol type switch, to avoid gcc -Wall warnings.

	* config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
	Don't test for zero backchain pointer to recognize a signal
	handler frame, if read() gets interrupted by a signal, the
	backchain will be non zero.
	(SIG_FRAME_FP_OFFSET):  Move to here from rs6000-tdep.c,
	improve comment.
	(SIG_FRAME_PC_OFFSET):  New definition.
	(FRAME_SAVED_PC):  Return saved pc from sigcontext if this
	is a signal handler frame.
	* rs6000-tdep.c (function_frame_info):  Do not error out
	if we can't access the instructions.

	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
	New definition to get the function address from a function pointer.
	* valops.c (find_function_addr):  Use it when calling a user
	function through a function pointer.
1994-10-29 09:51:32 +00:00
Stu Grossman c51975113d * defs.h, gdbtk.c, main.c, top.c: Change sense and name of
no_windows variable.  Now called use_windows, and defaults to off
	(for compatibility).
1994-10-26 22:45:13 +00:00
Stu Grossman 479f0f18d4 * defs.h, infrun.c (wait_for_inferior), top.c: Call
target_wait_hook to allow GUI to handle blocking for inferior.  Call
	call_command_hook in execute_command to provide means for wrapping
	commands with GUI state change updates.
	* gdbtk.c (gdb_cmd):  Force GUI into idle mode when errors occur.
	* (gdb_stop):  New tcl command to stop the target process.
	* (x_event, gdbtk_wait):  Allow GUI to interrupt gdb out of target
	waits.
	* (gdbtk_call_command):  Wrapper around command processing to
	alert GUI of target state changes.
	* (gdbtk_init):  Get the fd of X server for doing async
	notification of X events (via x_event).  Setup new hooks.
	* gdbtk.tcl:  Add scrollbars to assembly and command windows.
	* Change window foreground & background colors.
	* Create margin tag for breakpoints in source and assembly windows.
	* Add new routines to be invoked when target state changes to/from
	idle.
	* Add start of expression window.
	* Change bindings of mouse button 1 in assembly and source window
	to just set or clear breakpoints when in the margin tag.
	* Change shape of register window to be more vertical to better
	reflect it's contents.
	* Add stop button.
	* Cleanup some code around command window bindings.

	* infrun.c (wait_for_inferior):  Make sure
	through_sigtramp_breakpoint is non-null before deleting.
1994-10-21 00:59:20 +00:00
Ian Lance Taylor 688427fb38 whoops 1994-10-07 16:33:35 +00:00
Ian Lance Taylor b83ed01952 * top.c (target_byte_order_auto): New static variable.
(set_endian): Mention that ``auto'' is permitted.
	(set_endian_auto): New static function.
	(show_endian): Change message based on target_byte_order_auto.
	(set_endian_from_file): New function.
	(init_main): Add command ``auto'' to endianlist.
	* exec.c (exec_file_command): Call set_endian_from_file.
	* defs.h (set_endian_from_file): Declare.
1994-10-07 16:20:21 +00:00
Ian Lance Taylor b8176214a5 * defs.h: If TARGET_BYTE_ORDER_SELECTABLE is defined by tm.h,
define TARGET_BYTE_ORDER as target_byte_order, and declare
	target_byte_order as an extern int, and define BITS_BIG_ENDIAN as
	a test of TARGET_BYTE_ORDER.
	* top.c: Several additions if TARGET_BYTE_ORDER_SELECTABLE is
	defined:
	(endianlist, target_byte_order): New variables.
	(set_endian, set_endian_big, set_endian_little): New functions.
	(show_endian): New function.
	(init_cmd_lists): Initialize endianlist.
	(init_main): Add commands ``set endian big'', ``set endian
	little'', and ``show endian''.
	* a29k-pinsn.c: Rewrite uses of TARGET_BYTE_ORDER and
	BITS_BIG_ENDIAN to switch at run time rather than at compile time.
	* coffread.c, dwarfread.c, findvar.c, mips-tdep.c: Likewise.
	* remote-os9k.c, stabsread.c, valarith.c, valprint.c: Likewise.
	* values.c: Likewise.
	* mips-tdep.c: Rewrite uses of GDB_TARGET_IS_MIPS64 to switch at
	run time rather than at compile time.
1994-10-06 16:47:32 +00:00