Commit Graph

380 Commits

Author SHA1 Message Date
Elena Zannoni 2ede629fa8 2004-02-19 Elena Zannoni <ezannoni@redhat.com>
* event-top.c (async_request_quit): Remove uses of REQUEST_QUIT
       macro, which was part of the now removed Mach 3 port.
       * utils.c (request_quit): Ditto.
2004-02-19 16:48:43 +00:00
Andrew Cagney 6a83354a43 2004-02-10 Andrew Cagney <cagney@redhat.com>
* defs.h: Do not include "tui.h".
	* gdb_curses.h: New file.
	* tui/tui-hooks.h: New file.
	* tui/tui.h (tui_update_all_exec_infos): Delete declaration.
	(tui_install_hooks, tui_remove_hooks): Delete declarations.
	(tui_initialize_io): Delete declaration.
	(tui_initialize_readline: Delete redundant declaration.
	(struct tui_point): Delete definition.
	* tui/tui-data.h (struct tui_point): Define.
	* cli/cli-decode.c [TUI]: Include "tui/tui.h".
	* utils.c: Include "tui/tui.h".
	* tui/tui-data.h: Include "tui/tui.h" and "gdb_curses.h".
	* printcmd.c [TUI]: Include "tui/tui.h".
	* cli/cli-cmds.c [TUI]: Include "tui/tui.h".
	* tui/tui-command.c: Include "gdb_curses.h".
	* tui/tui.c, tui/tui-winsource.c, tui/tui-wingeneral.c: Ditto.
	* tui/tui-windata.c, tui/tui-win.c, tui/tui-stack.c: Ditto.
	* tui/tui-source.c, tui/tui-regs.c, tui/tui-layout.c: Ditto.
	* tui/tui-io.c, tui/tui-disasm.c, tui/tui-data.c: : Ditto.
	* tui/tui-hooks.c: Include "tui-hooks.h" and "gdb_curses.h".
	* Makefile.in: Update all dependencies.
	(tui_hooks_h, gdb_curses_h): Define.
	(SUBDIR_TUI_CFLAGS): Remove -I${srcdir}/tui.
2004-02-10 19:08:19 +00:00
Eli Zaretskii ec14596596 * utils.c (init_page_info): Move declarations of `rows' and
`cols' before the __GO32__-specific code.  Move the closing brace
	outside the #ifdef __GO32__..#endif block.
	[__GO32__]: Use `rows' and `cols' to avoid compiler warnings.
2004-01-21 18:46:23 +00:00
Michael Chastain 9175c9a32c 2004-01-19 Michael Chastain <mec.gnu@mindspring.com>
* MAINTAINERS: Delete mmalloc.
	* Makefile.in: Delete MMALLOC, MMALLOC_CFLAGS, -lmmalloc, mmalloc_h.
	* NEWS: Mention removal of --with-malloc.
	* acconfig.h: Delete USE_MMALLOC, MMCHECK_FORCE.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.in: Delete MMALLOC_CFLAGS, MMALLOC, --with-mmalloc, USE_MMALLOC, MMCHECK_FORCE.
	* gdbinit.in: Remove mmalloc.
	* utils.c: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE, malloc_botch.
	* config/alpha/alpha-linux.mh: Delete MMALLOC, MMALLOC_CFLAGS.
	* config/i386/go32.mh: Likewise.
	* config/i386/interix.mh: Likewise.
	* config/powerpc/xm-linux.h: Delete MMAP_BASE_ADDRESS, MMAP_INCREMENT.

2004-01-19  Michael Chastain  <mec.gnu@mindspring.com>

	* gdbint.texinfo: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE,
	MMAP_BASE_ADDRESS, MMAP_INCREMENT.
2004-01-20 09:29:18 +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
Andrew Cagney e42c953419 2004-01-02 Andrew Cagney <cagney@redhat.com>
* utils.c (do_my_cleanups): Make static, add forward declaration.
	* defs.h (do_my_cleanups): Delete declaration.
2004-01-02 17:35:01 +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 5b03f2662b 2003-09-19 Andrew Cagney <cagney@redhat.com>
* utils.c (align_up, align_down): New functions.
	* defs.h (align_up, align_down): Declare.
	* ppc-sysv-tdep.c (align_up, align_down): Delete functions.
	* s390-tdep.c: Replace "round_up" and "round_down" with "align_up"
	and "align_down".
	(round_up, round_down): Delete functions.
	* mips-tdep.c: Replace ROUND_UP and ROUND_DOWN with "align_up" and
	"align_down".
	(ROUND_DOWN, ROUND_UP): Delete macros.
	(mips_dump_tdep): Do not print "ROUND_UP" or "ROUND_DOWN".
	* h8300-tdep.c: Replace "round_up" and "round_down" with
	"align_up" and "align_down".
	(round_up, round_down): Delete macros.
	* frv-tdep.c: Replace ROUND_UP and ROUND_DOWN with "align_up" and
	"align_down".
	(ROUND_UP, ROUND_DOWN): Delete macros.
2003-09-19 16:22:39 +00:00
Andrew Cagney aa1ee363bc 2003-09-16 Andrew Cagney <cagney@redhat.com>
* buildsym.c: Remove more occurances of "register".
	* coffread.c, dbxread.c, dcache.c, dwarf2read.c: Ditto.
	* environ.c, eval.c, f-valprint.c, findvar.c: Ditto.
	* gdbtypes.c, gnu-v2-abi.c, h8300-tdep.c, hppa-tdep.c: Ditto.
	* infcmd.c, mdebugread.c, minsyms.c, mips-tdep.c: Ditto.
	* printcmd.c, remote-vx.c, sh-stub.c, sh-tdep.c: Ditto.
	* sh64-tdep.c, source.c, stabsread.c, stack.c: Ditto.
	* standalone.c, symfile.c, symmisc.c, symtab.c: Ditto.
	* utils.c, valops.c, values.c, xcoffread.c: Ditto.
2003-09-16 18:56:35 +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
Mark Kettenis eb0d3137b1 * utils.c (set_width_command): Remove prototypes.
(set_screen_size): New prototype.
(init_page_info): Simplify by fetching the screen size from
Readline.  Call set_screen_size.
(set_screen_size): New function.
(set_width): Add missing whitespace in comment.
(set_width_command): Call set_screen_size.
(set_height_command): New function.
(initialize_utils): Fix formatting.  Make "set height" command
call set_height_command.  Remove redundant code that turns off
pagination if output isn't a terminal.  Remove redundant call to
set_width_command.
2003-08-22 20:23:15 +00:00
Andrew Cagney 9ebf4acf53 2003-08-09 Andrew Cagney <cagney@redhat.com>
* defs.h (xstrprintf): Declare.
	* utils.c (xstrprintf): New function.
	* breakpoint.c (insert_breakpoints): Replace sprintf and
	non-literal format strings, with xstrprintf and cleanups.
	(delete_breakpoint,breakpoint_re_set): Ditto.
	(commands_command, insert_breakpoints): Ditto.
	(bpstat_stop_status, break_at_finish_at_depth_command_1): Ditto.
	(break_at_finish_command_1): Ditto.
2003-08-09 14:57:30 +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
Andreas Schwab 1ad828f198 * utils.c (internal_vproblem): Use xvasprintf, not xasprintf, to
format error message.
2003-06-30 21:40:05 +00:00
Andrew Cagney 714b128219 2003-06-26 Andrew Cagney <cagney@redhat.com>
* utils.c (internal_vproblem): Print the problem to a reason
	buffer and then pass to query.  Make the msg variable more local.

VS: ----------------------------------------------------------------------
2003-06-26 17:25:25 +00:00
Andrew Cagney 25d4103164 2003-04-16 Andrew Cagney <cagney@redhat.com>
* utils.c (xmmalloc): Always allocate something, matches
	libiberty/xmalloc's semantics.
	(xmrealloc, xmcalloc): Ditto.
2003-04-16 14:43:03 +00:00
Andrew Cagney ac16bf075e 2003-04-09 Andrew Cagney <cagney@redhat.com>
* defs.h (gdb_print_host_address): Make "addr" parameter a
	pointer constant.
	* utils.c (gdb_print_host_address): Update.
2003-04-10 02:18:40 +00:00
Adam Fedor 9a3d7dfd2e * Makefile.in (c_lang.o, jv_lang.o, language.o): Add $(demangle_h).
* language.h (struct language_defn): Add la_demangle.
(language_demangle): Declare.
* language.c (language_demangle): New function.
(unk_lang_demangle): Likewise.
(unknown_language_defn, auto_language_defn, local_language_defn):
Add ukn_lang_demangle.
* ada-lang.c (ada_language_defn): Add NULL for la_demangle element.
* f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise.
* c-lang.c (c_language_defn, asm_language_defn): Likewise.
(cplus_language_defn): Add cplus_demangle for la_demangle element.
* jv-lang.c (java_demangle): New function
(java_language_defn): Use it for la_demangle element.
* objc-lang.c (objc_demangle): Add options argument
(objc_language_defn): Use objc_demangle for la_demangle element.
* maint.c (maintenance_demangle): Replace switch with
call to language_demangle.
* utils.c (fprintf_symbol_filtered): Likewise.
2003-04-02 03:02:46 +00:00
Daniel Jacobowitz 6f88d63022 Fix PR build/1097.
* utils.c (gdb_realpath): Move closing brace outwards one #endif.
2003-02-26 14:35:19 +00:00
David Carlton 0fe19209f9 2003-02-24 David Carlton <carlton@math.stanford.edu>
* symtab.c (lookup_partial_symbol): Use strcmp_iw_ordered to
	do the comparison, not strcmp.
	* symfile.c (compare_psymbols): Ditto.
	* defs.h: Declare strcmp_iw_ordered.
	* utils.c (strcmp_iw_ordered): New function.
2003-02-24 23:37:02 +00:00
Andrew Cagney 5cb316ef79 2003-02-06 Andrew Cagney <ac131313@redhat.com>
* linux-proc.c: Include "gdb_stat.h" instead of <sys/stat.h>.
	* cp-valprint.c (cp_print_value_fields): Eliminate STREQN.
	* jv-typeprint.c (java_type_print_base): Ditto.
	* typeprint.c (typedef_print): Eliminate STREQ.
	* cli/cli-script.c (define_command, define_command): Ditto.
	* main.c (captured_main): Ditto.
	* values.c (lookup_internalvar): Ditto.
	* utils.c (safe_strerror, parse_escape): Eliminate assignment
	within `if' conditional.
	* linespec.c (decode_line_2): Ditto.
	* cli/cli-dump.c (bfd_openr_with_cleanup): Ditto.
	(bfd_openw_with_cleanup): Ditto.

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

	* mi-cmd-env.c: Include "gdb_stat.h" instead of <sys/stat.h>.
2003-02-07 00:27:31 +00:00
Andrew Cagney e9be73e47f 2003-02-04 Andrew Cagney <ac131313@redhat.com>
* values.c: Delete code conditional on IS_TRAPPED_INTERNALVAR.
	* TODO: Delete reference to IS_TRAPPED_INTERNALVAR.
	* utils.c (init_page_info): Delete reference to MPW in comments.
	* main.c (captured_main): Delete #ifdef MPW.

Index: doc/ChangeLog
2003-02-04  Andrew Cagney  <ac131313@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Delete
	descrption of IS_TRAPPED_INTERNALVAR.
2003-02-04 23:59:26 +00:00
Daniel Jacobowitz 2de7ced707 * defs.h (streq): Add prototype.
* utils.c (streq): New function.

	* dwarf2read.c (new_symbol): Use SYMBOL_SET_NAMES instead of
	SYMBOL_NAME and SYMBOL_INIT_DEMANGLED_NAME.
	* mdebugread.c (new_symbol): Likewise.
	* stabsread.c (define_symbol): Likewise.
	* coffread.c (process_coff_symbol): Likewise.
	* dwarfread.c (new_symbol): Likewise.

	* minsyms.c (prim_record_minimal_symbol_and_info): Use
	SYMBOL_SET_NAMES instead of setting SYMBOL_NAME.  Set the language
	here.
	(install_minimal_symbols): Don't set SYMBOL_LANGUAGE or call
	SYMBOL_INIT_DEMANGLED_NAME.
	* objfiles.c: Include "hashtab.h".
	(allocate_objfile): Call htab_set_functions_ex for the
	demangled_names_hash.
	(free_objfile): Call htab_delete for the demangled_names_hash.
	* objfiles.h (struct htab): Add declaration.
	(struct objfile): Add demangled_names_hash.
	* symfile.c: Include "hashtab.h".
	(reread_symbols): Call htab_delete for the demangled_names_hash.
	(add_psymbol_to_list): Use SYMBOL_SET_NAMES instead of putting
	SYMBOL_NAME in the bcache.
	* symtab.c: Include "hashtab.h".  Update comments.
	(create_demangled_names_hash, symbol_set_names): New functions.
	(symbol_find_demangled_name): New function, broken out from
	symbol_init_demangled_names.
	(symbol_init_demangled_names): Use it.
	* symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Add missing parentheses.
	(SYMBOL_SET_NAMES): New macro.
	(symbol_set_names): Add prototype.
2003-02-04 18:07:01 +00:00
Andrew Cagney 9a043c1d0c 2003-02-01 Andrew Cagney <ac131313@redhat.com>
* defs.h (host_pointer_to_address): Delete declaration.
	(address_to_host_pointer): Delete declaration.
	* utils.c (host_pointer_to_address): Delete function.
	(address_to_host_pointer): Delete function.
	* procfs.c (procfs_address_to_host_pointer): New function.
	* procfs.c (proc_set_watchpoint): Use.
	(procfs_can_use_hw_breakpoint): Update comments.
	* somsolib.c (hpux_address_to_host_pointer_hack): New function.
	(som_solib_add): Use.
	* hppa-tdep.c (hppa_pointer_to_address_hack): New function.
	* hppa-tdep.c (unwind_command): Use.
2003-02-01 23:34:05 +00:00
Andrew Cagney 8dbb1c6595 2003-01-31 Andrew Cagney <ac131313@redhat.com>
* objc-exp.y, c-exp.y, f-exp.y: Remove PTR casts.
	* utils.c: Update comments documenting legitimate uses of PTR.
2003-01-31 23:22:07 +00:00
Andrew Cagney 8731e58ec7 Re-indent utils.c. 2003-01-31 22:45:22 +00:00
Jim Blandy 5b5d99cf4d gdb/ChangeLog:
2003-01-23  Alexander Larsson <alexl@redhat.com>
	    Jim Blandy  <jimb@redhat.com>

	Add support for executables whose debug info has been separated
	out into a separate file, leaving only a link behind.
	* objfiles.h (struct objfile): New fields: separate_debug_objfile
	and separate_debug_objfile_backlink.
	(put_objfile_before): New declaration.
	* symfile.c: #include "filenames.h".
	(symbol_file_add_with_addrs_or_offsets): If this objfile has its
	debug info in a separate file, read that, too. Save the addrs
	argument, so we can use it again to read the separated debug info;
	syms_from_objfile modifies the table we pass it.
	(reread_symbols): After re-reading an objfile, call
	reread_separate_symbols to refresh its separate debug info
	objfile, if it has one.
	(reread_separate_symbols, find_separate_debug_file,
	get_debug_link_info, separate_debug_file_exists): New functions.
	(debug_file_directory): New global var.
	(_initialize_symfile): Initialize debug_file_directory, and
	provide the new `set debug-file-directory' command to let the user
	change it.
	* objfiles.c (free_objfile): If this objfile has its debug info in
	a separate objfile, free that one too.  If this is itself a
	separate debug info objfile, clear our parent's backlink.
	(put_objfile_before): New function.
	* utils.c (gnu_debuglink_crc32): New function.
	* defs.h (gnu_debuglink_crc32): New declaration.
	* Makefile.in (symfile.o): Note dependency on "filenames.h".
	* configure.in: Handle --with-separate-debug-dir config option.
	* acinclude.m4 (AC_DEFINE_DIR): New macro.
	* acconfig.h (DEBUGDIR): New macro.
	* configure, aclocal.m4, config.in: Regenerated.

gdb/doc/ChangeLog:
2003-01-23  Jim Blandy  <jimb@redhat.com>

	* gdb.texinfo (Separate Debug Files): New section.
2003-01-23 23:03:32 +00:00
Andrew Cagney 1bac305b72 2003-01-13 Andrew Cagney <ac131313@redhat.com>
* ax-gdb.c, c-valprint.c, charset.c, corefile.c: Update copyright.
	* demangle.c, disasm.c, dwarf2cfi.c, dwarfread.c: Update copyright.
	* elfread.c, eval.c, expprint.c, expression.h: Update copyright.
	* f-typeprint.c, findvar.c, gcore.c, gdb_mbuild.sh: Update copyright.
	* gdbtypes.h, gnu-v2-abi.c, inferior.h, inftarg.c: Update copyright.
	* language.c, language.h, m32r-tdep.c: Update copyright.
	* mn10200-tdep.c, scm-lang.c, scm-lang.h: Update copyright.
	* somsolib.c, somsolib.h, symfile.c, symtab.h: Update copyright.
	* thread-db.c, typeprint.c, utils.c, valarith.c: Update copyright.
	* values.c, win32-nat.c, x86-64-linux-nat.c: Update copyright.
	* x86-64-linux-tdep.c, z8k-tdep.c: Update copyright.
	* cli/cli-decode.h, config/h8500/tm-h8500.h: Update copyright.

Index: mi/ChangeLog
2003-01-13  Andrew Cagney  <ac131313@redhat.com>

	* mi-cmd-env.c: Update copyright.
2003-01-14 00:49:06 +00:00
Andrew Cagney 1b831c9308 2003-01-02 Andrew Cagney <ac131313@redhat.com>
* valarith.c (value_binop): Delete obsolete code and comments.
	* configure.host: Ditto.
	* buildsym.h (make_blockvector): Ditto.
	* buildsym.c (make_blockvector): Ditto.
	* defs.h (enum language): Ditto.
	(chill_demangle): Ditto.
	* elfread.c (elf_symtab_read): Ditto.
	* dwarfread.c (CHILL_PRODUCER): Ditto.
	(set_cu_language): Ditto.
	(handle_producer): Ditto.
	* expprint.c (print_subexp): Ditto.
	* gdbtypes.c (chill_varying_type): Ditto.
	* gdbtypes.h (builtin_type_chill_bool): Ditto.
	(builtin_type_chill_char, builtin_type_chill_long): Ditto.
	(builtin_type_chill_ulong, builtin_type_chill_real): Ditto.
	(chill_varying_type): Ditto.
	* language.h (_LANG_chill): Ditto.
	* language.c (binop_result_type, integral_type): Ditto.
	(character_type, string_type, structured_type): Ditto.
	(lang_bool_type, binop_type_check): Ditto.
	* stabsread.h (os9k_stabs): Ditto.
	* stabsread.c (os9k_type_vector, dbx_lookup_type): Ditto.
	(define_symbol, read_type, read_struct_fields): Ditto.
	(read_array_type, read_enum_type, read_huge_number): Ditto.
	(read_range_type, start_stabs): Ditto.
	* symfile.c (init_filename_language_table): Ditto.
	(add_psymbol_with_dem_name_to_list): Ditto.
	* symtab.c (symbol_init_language_specific): Ditto.
	(symbol_init_demangled_name, symbol_demangled_name): Ditto.
	* symtab.h (struct general_symbol_info): Ditto.
	(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
	* typeprint.c (typedef_print): Ditto.
	* utils.c (fprintf_symbol_filtered): Ditto.
	* valops.c (value_cast, search_struct_field, value_slice): Delete
	obsolete code.
	(varying_to_slice): Delete function.
	* value.h (COERCE_VARYING_ARRAY): Delete obsolete macro contents.
	(varying_to_slice): Delete declaration.
	* MAINTAINERS: Update.
2003-01-02 14:27:27 +00:00
Andrew Cagney 020cc13c3a 2002-11-30 Andrew Cagney <cagney@redhat.com>
* exec.c (xfer_memory): Replace boolean with int.
	* p-exp.y: Use 0 instead of false.
	* corelow.c (gdb_check_format): Change return type to int from
	boolean.
	* utils.c: Don't include <curses.h> or <term.h> first.
2002-11-30 16:33:55 +00:00
Andrew Cagney 6411e720c0 Wed Nov 13 19:51:05 2002 Andrew Cagney <cagney@redhat.com>
* utils.c (gdb_realpath): Add comment mentioning realpath with a
 	NULL buffer.
2002-11-14 00:50:04 +00:00
Andrew Cagney 82c0260ec6 2002-11-12 Andrew Cagney <ac131313@redhat.com>
* utils.c (gdb_realpath): Make rp a constant pointer.
2002-11-12 20:26:05 +00:00
Andrew Cagney 70d358198f 2002-11-12 Andrew Cagney <ac131313@redhat.com>
* utils.c (gdb_realpath): Rewrite.  Try, in order: realpath() with
	a constant buffer; cannonicalize_file_name(); realpath() with a
	pathconf() defined buffer, xstrdup().
2002-11-12 17:19:06 +00:00
Martin Hunt e8d96a5d56 2002-10-24 Martin M. Hunt <hunt@redhat.com>
* utils.c (string_to_core_addr): Revert patch from 11 Oct.
2002-10-24 23:46:09 +00:00
Adam Fedor 4a351cef15 utils.c (puts_filtered_tabular): New function.
(fprintf_symbol_filtered): Get ObjC demangled name.
defs.h (puts_filtered_tabular): Declared.
2002-10-15 02:16:51 +00:00
Martin Hunt d5dc79609d 2002-10-11 Martin M. Hunt <hunt@redhat.com>
* utils.c (string_to_core_addr): After turning string into
	a number, convert to a CORE_ADDR using INTEGER_TO_ADDRESS
	which will do necessary sign-extension, etc.
2002-10-11 17:50:10 +00:00
Kevin Buettner 234b45d446 Add support for distinct host and target character sets. 2002-09-20 00:24:01 +00:00
Andrew Cagney 389e51db10 Revert previous change. Not obvious. 2002-09-19 03:58:41 +00:00
Michael Snyder 3b4efeaa2d 2002-09-18 Michael Snyder <msnyder@redhat.com>
Preliminary support for Objective-C:
	* defs.h (language_objc): New enum value.
	(puts_filtered_tabular): Declaration only, exported from utils.c.
	(skip_quoted): Delete, declared in completer.h.
	* c-exp.y: Include completer.h.
	* p-exp.y: Ditto.
	* jv-exp.y: Ditto.
	* expression.h (OP_MSGCALL, OP_SELECTOR, OP_SELF, OP_NSSTRING):
	New operator enum values.
	* language.h (CAST_IS_CONVERSION): Test for language_objc.
	* language.c (binop_result_type): Handle language_objc case.
	(integral_type, character_type, string_type, boolean_type,
	structured_type, binop_type_check): Ditto.
	* symtab.h (SYMBOL_OBJC_DEMANGLED_NAME): Define.
	(struct objc_specific): Add to general_symbol_info.
	(SYMBOL_INIT_LANGUAGE_SPECIFIC): Add objc initialization.
	(SYMBOL_DEMANGLED_NAME): Handle objc case.
	* parser-defs.h (struct objc_class_str): New struct type.
	(start_msglist, end_msglist, add_msglist): Declaration only,
	exported from objc-lang.c.
	* value.h (value_of_local, value_nsstring,
	call_function_by_hand_expecting_type): Exported from valops.c.
	* valops.c (find_function_addr): Export.
	(call_function_by_hand_expecting_type): New function.
	(value_of_local): New function.
	* symfile.c (init_filename_language_table): Add ".m" extension
	for Objective-C.
	* utils.c (puts_filtered_tabular): New function.
	(fprintf_symbol_filtered): Add objc demangling support (disabled).
	(set/show demangle): Extend help-string to refer to ObjC.
	* elfread.c (elf_symtab_read): Skip Objective-C special symbols.
	* stabsread.c (symbol_reference_defined): Objective-C symbols
	may contain colons: make allowances when scanning stabs strings
	for colons.
	(objc_find_colon): New function.
	* printcmd.c (address_info): If language == objc then print
	"self" instead of "this".
	* parse.c (length_of_subexp): Handle new operators OP_MSGCALL,
	OP_NSSTRING, and OP_SELF.
	(prefixify_subexp): Ditto.
	* source.c (print_source_lines): Mention objc in comment.
	* breakpoint.c (parse_breakpoint_sals): Recognize Objective-C
	method names.
2002-09-19 01:34:51 +00:00
Andrew Cagney dec43320d9 2002-09-18 Andrew Cagney <ac131313@redhat.com>
* maint.c (maintenance_internal_error): Print the parameter as the
	error message.
	(maintenance_internal_warning): New function.
	(_initialize_maint_cmds): Add command `maint internal-warning'.

	* defs.h (internal_warning, internal_vwarning): Declare.
	* utils.c (struct internal_problem): Define.
	(internal_vproblem): New function.
	(internal_warning): New function.
	(internal_vwarning): New function.
	(internal_warning_problem, internal_error_problem): New variables.
	(internal_verror): Just call internal_vproblem.

Index: testsuite/ChangeLog
2002-09-18  Andrew Cagney  <ac131313@redhat.com>

	* gdb.base/maint.exp: Check `help maint internal-warning'.
2002-09-18 23:53:52 +00:00
Andrew Cagney db034ac512 2002-08-01 Andrew Cagney <cagney@redhat.com>
* NEWS: Menion that CHILL has been made obsolete.

* gdbtypes.c (chill_varying_type): Make chill references obsolete.
* gdbserver/Makefile.in: Ditto.
* stabsread.c (read_range_type): Ditto.
* gdbtypes.h: Ditto.
* language.c (binop_type_check): Ditto.
(binop_result_type): Ditto.
(integral_type): Ditto.
(character_type): Ditto.
(string_type): Ditto.
(boolean_type): Ditto.
(structured_type): Ditto.
(lang_bool_type): Ditto.
(binop_type_check): Ditto.
* language.h (_LANG_chill): Ditto.
* dwarfread.c (set_cu_language): Ditto.
* dwarfread.c (CHILL_PRODUCER): Ditto.
* dwarfread.c (handle_producer): Ditto.
* expression.h (enum exp_opcode): Ditto.
* eval.c: Ditto for comments.
* typeprint.c (typedef_print) [_LANG_chill]: Ditto.
* expprint.c (print_subexp): Ditto.
(print_subexp): Ditto.
* valops.c (value_cast): Ditto.
(search_struct_field): Ditto.
* value.h (COERCE_VARYING_ARRAY): Ditto.
* symfile.c (init_filename_language_table): Ditto.
(add_psymbol_with_dem_name_to_list): Ditto.
* valarith.c (value_binop): Ditto.
(value_neg): Ditto.
* valops.c (value_slice): Ditto.
* symtab.h (union language_specific): Ditto.
(SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
(SYMBOL_DEMANGLED_NAME): Ditto.
(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
* defs.h (enum language): Ditto.
* symtab.c (got_symtab): Ditto.
* utils.c (fprintf_symbol_filtered): Ditto.

* ch-typeprint.c: Make file obsolete.
* ch-valprint.c: Make file obsolete.
* ch-lang.h: Make file obsolete.
* ch-exp.c: Make file obsolete.
* ch-lang.c: Make file obsolete.

* Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
CHILL_LIB.
(TARGET_FLAGS_TO_PASS): Ditto.
(CHILLFLAGS): Obsolete.
(CHILL): Obsolete.
(CHILL_FOR_TARGET): Obsolete.
(CHILL_LIB): Obsolete.
(SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
ch-valprint.c.
(HFILES_NO_SRCDIR): Remove ch-lang.h.
(COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
ch-lang.o.
(ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
targets.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* stabs.texinfo, gdb.texinfo, gdbint.texinfo: Obsolete references
to CHILL.

2002-08-01  Andrew Cagney  <cagney@redhat.com>

* Makefile.in (TARGET_FLAGS_TO_PASS): Remove CHILLFLAGS, CHILL,
CHILL_FOR_TARGET and CHILL_LIB.
* configure.in (configdirs): Remove gdb.chill.
* configure: Regenerate.
* lib/gdb.exp: Obsolete references to chill.
* gdb.fortran/types.exp: Ditto.
* gdb.fortran/exprs.exp: Ditto.
2002-08-01 17:18:35 +00:00
Kevin Buettner c6caf09098 * utils.c (host_pointer_to_address, address_to_host_pointer):
Use gdb_assert() instead of explicit call to internal_error().
2002-07-31 17:01:01 +00:00
Kevin Buettner 790c9cf039 * utils.c (host_pointer_to_address, address_to_host_pointer):
Change internal_error() message to indicate function responsible
	for the error.
2002-07-27 02:03:45 +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
Joel Brobecker 303c8ebdfe (xfullpath): New function. 2002-04-05 16:39:11 +00:00
Andrew Cagney 520f6ade4a From veksler at il.ibm.com:
* utils.c (gdb_realpath): If canonicalize_file_name fails, return
the xstrduped original path.
Fix PR gdb/417.
2002-03-28 03:43:37 +00:00
Andrew Cagney 349c5d5f6c * defs.h (XMALLOC): Define.
* gdb-events.sh (XMALLOC): Delete macro.
* gdb-events.c, gdb-events.h: Regenerate.
* gdbarch.sh (XMALLOC): Delete macro.
* gdbarch.c: Regenerate.
* serial.c (XMALLOC): Delete macro.
* ui-file.c (XMALLOC): Ditto.
* ser-unix.h (XMALLOC): Ditto.
* sh-tdep.c (XMALLOC): Ditto.
* ui-out.c (XMALLOC): Ditto.
* utils.c (XMALLOC): Ditto.
* i386-tdep.c (XMALLOC): Ditto.
* gdb-events.c (XMALLOC): Ditto.
* d10v-tdep.c (XMALLOC): Ditto.
* cli-out.c (XMALLOC): Ditto.

* cli-out.c, d10v-tdep.c, gdb-events.c: Update copyright.
* gdb-events.sh, i386-tdep.c, ser-unix.h, serial.c: Ditto.
* ui-file.c, ui-out.c: Ditto.
2002-03-19 02:51:09 +00:00
Richard Henderson a4db0f0748 * configure.in: Detect declaration for canonicalize_file_name.
* utils.c (canonicalize_file_name): Declare, if needed.
        (gdb_realpath): Prefer realpath if available and usable.
        * config.in, configure: Rebuild.
2002-03-15 00:44:49 +00:00
Andrew Cagney f33c6cbfe5 Add FIXME explaining include problem. 2002-03-01 06:19:28 +00:00
Rodney Brown b84911e820 2002-02-27 Rodney Brown <rbrown64@csc.com.au>
* utils.c (gdb_realpath): Add pathconf fallback for sco3.2v5.
2002-02-27 12:29:43 +00:00
Andrew Cagney 6972bc8bef * utils.c (perror_with_name): Make string parameter constant.
(print_sys_errmsg): Ditto.
(query): Ditto.
* defs.h (perror_with_name): Update.
(print_sys_errmsg): Update.
(query): Update.
2002-02-26 03:29:55 +00:00
Andrew Cagney 27aac7ff48 * configure.in: (AC_CHECK_FUNCS) Added test for
canonicalize_file_name Regenerated.
* config.in, configure: Regenerated.
* utils.c: (gdb_realpath) If HAVE_CANONICALIZE_FILE_NAME is
defined use canonicalize_file_name.
2002-02-23 21:54:25 +00:00
Keith Seitz 49b563f9d8 * defs.h (core_addr_to_string_nz): New function.
* utils.c (core_addr_to_string): Use phex instead of phex_nz.
	(core_addr_to_string_nz): New function.
2002-02-13 06:06:26 +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
Daniel Jacobowitz 4e8f7a8b27 2002-02-08 Daniel Jacobowitz <drow@mvista.com>
* utils.c: Include <curses.h> before "bfd.h".
        * tui/tui-hooks.c: Likewise.
        * tui/tui.c: Likewise.
        * tui/tuiCommand.c: Likewise.
        * tui/tuiData.c: Likewise.
        * tui/tuiDataWin.c: Likewise.
        * tui/tuiDisassem.c: Likewise.
        * tui/tuiGeneralWin.c: Likewise.
        * tui/tuiIO.c: Likewise.
        * tui/tuiLayout.c: Likewise.
        * tui/tuiRegs.c: Likewise.
        * tui/tuiSource.c: Likewise.
        * tui/tuiSourceWin.c: Likewise.
        * tui/tuiStack.c: Likewise.
        * tui/tuiWin.c: Likewise.
2002-02-08 15:54:32 +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 fffee0be3f * utils.c (do_write): New function.
(error_stream): Rewrite combining the code from error_begin and
verror.
(verror): Rewrite using error_stream.
(error_begin): Delete function.
2002-02-02 15:39:33 +00:00
Andrew Cagney 255e7dbf2e * utils.c (error_begin): Make static.
* defs.h (error_begin): Delete declaration.

* linespec.c (cplusplus_error): Replace cplusplus_hint.
(decode_line_1): Use cplusplus_error instead of error_begin,
cplusplus_hint and return_to_top_level.
* coffread.c (coff_symfile_read): Use error instead of error_begin
and return_to_top_level.
* infrun.c (default_skip_permanent_breakpoint): Ditto.
2002-02-02 03:42:59 +00:00
Andrew Cagney f5a96129d2 * defs.h (vwarning): Declare.
(warning_begin): Delete declaration.
* utils.c (vwarning): New function.
(warning): Call vwarning.
(warning_begin): Delete function.

* rs6000-nat.c (vmap_ldinfo): Use the function warning to print
the warning message.
* d10v-tdep.c (d10v_address_to_pointer) [0]: Delete call to
warning_begin.
2002-01-31 04:10:51 +00:00
Andrew Cagney 826000345c Eliminate MALLOC_INCOMPATIBLE. 2002-01-20 04:23:29 +00:00
Andrew Cagney 2d1b2124ee Use MAXPATHLEN when no PATH_MAX. 2002-01-20 00:44:47 +00:00
Andrew Cagney 375fc98382 Change behavour of internal-error to quit and dump core by default. 2002-01-17 23:33:39 +00:00
Andrew Cagney a752853e6e Remove obsolete MacOS support. 2002-01-05 05:54:31 +00:00
Tom Tromey 58d370e0e6 * configure, config.in: Rebuilt.
* configure.in: Check for realpath.
	* defs.h (gdb_realpath): Declare.
	* symtab.h (partial_symtab): Added fullname field.
	* source.c (openp): Use gdb_realpath.
	(forget_cached_source_info): Clear full name of each partial
	symtab.
	* utils.c (gdb_realpath): New function.
	* symtab.c (lookup_symtab): Removed.
	(lookup_symtab_1): Renamed to lookup_symtab.
	(lookup_symtab): Look for real path.
	(lookup_partial_symtab): Likewise.
2001-12-21 22:32:37 +00:00
Andrew Cagney ed1801dfff Eliminate global #include of "mmalloc.h". 2001-12-06 20:59:11 +00:00
Andrew Cagney 45a1e86678 Correctly handle phex(*,0) and phex_nz(*,0). 2001-11-15 18:35:05 +00:00
Andrew Cagney faf833caca * utils.c (phex_nz): For default case, set str to phex_nz return
value.
2001-11-15 18:24:17 +00:00
Andrew Cagney 5c7dd74823 * utils.c (internal_verror): Restore calls to abort().
Fix PR gdb/219.
2001-11-02 21:46:52 +00:00
Andrew Cagney 03dd37c302 Functions to convert to/from CORE_ADDR and a string. Use in Insight. 2001-10-17 20:35:31 +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
Stephane Carrez 5ecb18062a * utils.c (init_page_info): Use tui_get_command_dimension.
* printcmd.c (disassemble_command): Simplify tui specific code,
	use tui_is_window_visible, tui_show_assembly.
2001-07-21 22:31:14 +00:00
Andrew Cagney 2cd58942b9 * serial.h (SERIAL_ASYNC): Delete.
(DEPRECATED_SERIAL_FD): Delete.
(SERIAL_DEBUG): Delete.
(SERIAL_DEBUG_P): Delete.
(SERIAL_DRAIN_OUTPUT): Delete.
(SERIAL_FLUSH_OUTPUT): Delete.
(SERIAL_FLUSH_INPUT): Delete.
(SERIAL_SEND_BREAK): Delete.
(SERIAL_RAW): Delete.
(SERIAL_GET_TTY_STATE): Delete.
(SERIAL_SET_TTY_STATE): Delete.
(SERIAL_PRINT_TTY_STATE): Delete.
(SERIAL_NOFLUSH_SET_TTY_STATE): Delete.
(SERIAL_SETBAUDRATE): Delete.
(SERIAL_SETSTOPBITS): Delete.
(SERIAL_CAN_ASYNC_P): Delete.
(SERIAL_IS_ASYNC_P): Delete.
(SERIAL_UN_FDOPEN): Delete.
(SERIAL_READCHAR): Delete.
(SERIAL_CLOSE): Delete.
(SERIAL_FDOPEN): Delete.
(SERIAL_OPEN): Delete.
2001-07-15 20:34:14 +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
Andrew Cagney 819cc32466 s/typedef serial_t/struct serial */ 2001-07-11 17:52:32 +00:00
Andrew Cagney 090a2205b5 * gdbtypes.h (builtin_type_void_data_ptr): Rename
builtin_type_ptr.
* gdbtypes.c (builtin_type_void_data_ptr): Update.
(build_gdbtypes): Update.
(_initialize_gdbtypes): Update.
* values.c (value_as_pointer): Update.
* utils.c (host_pointer_to_address): Update.
(address_to_host_pointer): Update.
2001-07-08 20:42:15 +00:00
Christopher Faylor 0b6a968ee6 * gnu-regex.c: Eliminate obsolete check for _MSC_VER.
* utils.c (notice_quit): Remove dummy function only used for _MSC_VER.
* values.c (unpack_double): Remove obsolete check for _MSC_VER.
* defs.h: Ditto.
* m32r-rom.c: Ditto.
* p-exp.y: Ditto.
* ser-e7kpc.c: Ditto.  Define WIN32_LEAN_AND_MEAN under _WIN32, for faster
compilation.
(get_ds_base): Remove _MSC_VER version of this function.
* nindy-share/ttyflush.c: Ditto.  X
* rdi-share/host.h: Ditto.  X
* ser-go32.c (dos_readchar): Remove call to obsolete function.
* remote-sim.c (gdb_os_poll_quit): Ditto.
* remote-e7000.c (expect): Remove obsolete #if 0'ed code.
* main.c (captured_main): Eliminate special Cygwin checks.
* ser-tcp.c: Remove unneeded __CYGWIN__ guard against system include.
2001-06-10 16:25:51 +00:00
Andrew Cagney d036b4d9cf Obsolete MPW as host. 2001-04-19 23:56:14 +00:00
Andrew Cagney c0e61796d0 * defs.h (xfree, mcalloc, mmalloc, mrealloc, mfree, xmmalloc,
xmrealloc): Move existing declarations to the one place and
re-order to be consistent.
(xmcalloc, xmfree): Declare.
(xmmalloc, xmrealoc): Assume ISO-C - use size_t and void* in
declaration.

* utils.c (size_t): Delete #ifdef defining size_t.
(mmalloc, mrealloc, mcalloc, mfree): Re-order.
(mmalloc, mrealloc, mcalloc): Document as only calls in GDB
corresponding malloc, realloc, calloc.
(mfree): Call free directly.
(xmmalloc, xmrealloc): Clean up. Assume ISO-C.
(xmcalloc, xmfree): New functions. Copy old xcalloc and xfree
function bodies to here.
(xcalloc, xfree): Call xmcalloc and xmfree respectfully.
2001-03-23 23:39:57 +00:00
Andrew Cagney 3c37485b16 malloc() -> xmalloc.
Move malloc() decl to utils.c
2001-03-20 01:37:10 +00:00
Andrew Cagney 0e52036f1f Move realoc() decl to utils.c. s/realloc()/xrealloc()/. 2001-03-20 00:54:43 +00:00
Andrew Cagney 81b8eb809e Move free() decl to utils.c. 2001-03-20 00:28:23 +00:00
Kevin Buettner d7fa9de08d Committed. 2001-03-10 01:22:11 +00:00
Mark Kettenis 39424bef91 * defs.h: Provide prototypes for floatformat_is_negative,
floatformat_is_nan and floatformat_mantissa.
* utils.c: Include "gdb_assert.h".
(floatformat_is_negative): New function.
(floatformat_is_nan): New function.
(floatformat_mantissa): New function.
* valprint.c: Include "floatformat.h".
(print_floating): Get rid of the Linux-specific
TARGET_ANALYZE_FLOATING macro and rewrite NaN detection with the
help these new functions.  Print NaN's in a format conforming to
ISO C99.
2001-03-07 16:09:03 +00:00
J.T. Conklin 5565b5569b 2001-03-06 J.T. Conklin <jtc@redback.com>
* symtab.h (decode_line_1): Removed declaration.

        * symfile.c (#include <assert.h>): Removed.

        * arch-utils.c (#include <ctype.h>): Removed.
        * c-typeprint.c: Likewise.
        * dbxread.c: Likewise.
        * gdbtypes.c: Likewise.
        * target.c: Likewise.
        * os9kread.c: Likewise.

        * c-valprint.c (#include "demangle.h"): Removed.
        * ch-typeprint.c: Likewise.
        * eval.c: Likewise.
        * f-typeprint.c: Likewise.
        * f-valprint.c: Likewise.
        * m2-typeprint.c: Likewise.
        * typeprint.c: Likewise.
        * p-typeprint.c: Likewise.
        * valarith.c: Likewise.
        * valprint.c: Likewise.

        * m2-typeprint.c (#include "gdb_string.h"): Removed.
        * nlmread.c: Likewise.

        * mdebugread.c (#include "gdb-stabs.h"): Removed.
        * minsyms.c: Likewise.
        * mipsread.c: Likewise.
        * nlmread.c: Likewise.

        * m2-typeprint.c (#include "obstack.h"): Removed.
        * m2-valprint.c: Likewise.

        * event-loop.c (#include <setjmp.h>): Removed.
2001-03-07 02:57:08 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Kevin Buettner e1e9e218c1 Replace calls to abort() with calls to internal_error(). 2001-02-25 04:45:12 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Andrew Cagney f042532cc4 * sol-thread.c (restore_inferior_pid): Save the PID in a freshly
allocated buffer.
(save_inferior_pid): Restore the PID from that tempoary
buffer. Delete the buffer.
* utils.c (make_cleanup_close, do_close_cleanup): Ditto for FD.
2001-02-07 03:44:24 +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
Andrew Cagney d1f4cff847 Move putchar_filtered() to utils.c. 2001-01-31 03:46:23 +00:00
Andrew Cagney 4fcf66da88 Replace strsave() with xstrdup(). 2001-01-31 01:24:03 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Michael Snyder 62fd9fad96 2000-12-04 Michael Snyder <msnyder@cleaver.cygnus.com>
* utils.c (internal_verror): Fix typo in error msg.
2000-12-05 03:15:31 +00:00
Andrew Cagney 76995688e8 Replace asprintf() / vasprintf() with xasprintf() xvasprintf(). 2000-11-20 02:06:19 +00:00
David Taylor 79496e2fad * utils.c (strlen_paddr, paddr, paddr_nz): Use TARGET_ADDR_BIT,
not TARGET_PTR_BIT, since we are dealing with addresses, not
	pointers.
2000-11-15 14:33:50 +00:00
Kevin Buettner 74f832daf0 Protoization. 2000-11-04 00:46:46 +00:00
David Anderson e26cc3490a Corrected spelling errors in comments 2000-10-23 22:49:29 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Michael Snyder cbfbd72afe 2000-06-15 Michael Snyder <msnyder@cygnus.com>
* utils.c: Fix comment typo.
2000-06-15 20:40:29 +00:00
Andrew Cagney ac2e2ef7e2 Add host_pointer_to_address() and address_to_host_pointer(). Add
signed_pointer_to_address() etc.  Rename generic_pointer_to_address()
to unsigned_pointer_to_address() etc.
2000-06-04 13:46:37 +00:00
Andrew Cagney 8e6a3c35b9 Eliminate safe_strsignal(). 2000-06-04 01:58:49 +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 f5ff8c83c8 Add make_cleanup_close() function. 2000-05-23 14:48:13 +00:00
Andrew Cagney 5683e87aa5 Replace preg() with phex(). Cleanup monitor.c. 2000-05-22 02:07:19 +00:00
Andrew Cagney e2f9c47491 Make free_current_contents more robust. Use in MI. 2000-05-16 04:57:49 +00:00
Andrew Cagney 5c65bbb629 Cleanup bfd_close() cleanups. 2000-05-16 02:43:39 +00:00
Andrew Cagney 3339cf8b68 Move core_addr_lessthan and core_addr_greaterthan to arch-utils. 2000-05-15 03:56:30 +00:00
Michael Snyder 4261bedc92 2000-04-26 Michael Snyder <msnyder@seadog.cygnus.com>
* utils.c (internal_verror): Call target_terminal_ours.
2000-04-27 00:15:14 +00:00
Andrew Cagney 2f9429aea3 * defs.h, utils.c (free_current_contents): Change parameter to
void*.

From Philippe De Muyter  <phdm@macqel.be>:
* printcmd.c (print_address_symbolic): Call `make_cleanup' with
`(free_current_contents, &x)', not `(free, x)'.
* utils.c (free_current_contents): Do not `free (NULL)'.

* printcmd.c (print_address_symbolic): Cleanup after a failed
call to build_address_symbolic.
2000-04-21 04:10:18 +00:00
Michael Snyder 57e687d9ad 2000-03-30 Michael Snyder <msnyder@cleaver.cygnus.com>
* defs.h (struct continuation_arg): make 'data' a union, to avoid
        casting problems when int and pointer are not the  same size.
        * event-top.c (command_handler): use data as a union.
        (command_line_handler_continuation): ditto.
        * infcmd.c (step_1_continuation): use data as a union.  Re-indent.
        (step_once): ditto.  (finish_command_continuation): ditto.
        (finish_command): ditto.
        * breakpoint.c (until_break_command): use data as a union.
        (until_break_command_continuation): ditto.
        * utils.c (add_intermediate_continuation): fix typo in comment.
2000-03-30 18:54:28 +00:00
Kevin Buettner ba8966d6c3 Fixes for floatformat_from_doublest(). 2000-03-20 22:15:58 +00:00
Andrew Cagney 082faf240e Make mmalloc functions consistent. Some need ISO-C others need PTR :-(. 2000-03-04 02:23:06 +00:00
Andrew Cagney e400552667 Convert make_cleanup functions to ISO-C. 2000-03-04 00:40:40 +00:00
Andrew Cagney 9d271fd8b3 From Eli. Warning fixes. 2000-02-29 07:45:13 +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 0fda6bd286 import gdb-2000-01-24 snapshot 2000-01-25 02:40:50 +00:00
Jason Molenda ed9a39ebf9 import gdb-1999-12-21 snapshot 1999-12-22 21:45:38 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 4ce44c668d import gdb-1999-11-16 snapshot 1999-11-17 02:31:06 +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 43e526b9b4 import gdb-1999-07-12 snapshot 1999-07-12 11:15:22 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 9846de1bb5 import gdb-1999-07-07 pre reformat 1999-07-07 17:31:57 +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 0f71a2f66f import gdb-1999-06-14 snapshot 1999-06-14 18:08:47 +00:00
Jason Molenda ac9a91a77c import gdb-1999-06-01 snapshot 1999-06-01 15:44:41 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +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
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
David Taylor 776fb68dfc print_spaces -- fix arg to strcat (broken by 1.165.6.4 change to utils.c). 1999-01-11 18:58:07 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Jason Molenda adcb1e06ef 1998-12-30 Jason Molenda (jsm@bugshack.cygnus.com)
* utils.c: <readline/readline.h> instead of "readline/readline.h".

        * configure.in (TERM_LIB): Search for the appropriate term library
        on the host system.
        * configure: Regenerated.
        * Makefile.in (TERMCAP): Set based on autoconf check.
        * config/*/*.mh: Don't override TERMCAP setting.
1998-12-31 01:30:52 +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
John Metzler c66e3d6479 * utils.c (fmthex): A formatting function for hexdumps 1998-04-10 17:59:12 +00:00
Mark Alexander 7e9576e098 * dve3900-rom.c: New file to support Densan DVE-R3900/20 board.
* monitor.c (monitor_debug): Move to utils.c, rename to puts_debug.
	(monitor_write_memory, monitor_read_memory, monitor_insert_breakpoint,
	monitor_remove_breakpoint): Remove useless address bits if current
	monitor has MO_ADDR_BITS_REMOVE flag.
	* monitor.h (MO_ADDR_BITS_REMOVE): Define.
	* utils.c (puts_debug): Formerly monitor_debug from monitor.c;
	move here and make public.  Add better support for carriage returns.
	* defs.h (puts_debug): Declare.
	* dsrec.c (load_srec): Use puts_debug to print remotedebug information.
	Output header record correctly.
	(make_srec): Output a header record instead of a termination record
	if sect is non-NULL (value is ignored), but abfd is NULL.
	* config/mips/tm-tx39.h (DEFAULT_MIPS_TYPE): Remove definition.
	(REGISTER_NAMES): Define to add R3900-specific registers.
	* config/mips/tm-tx39l.h: Ditto.
	* config/mips/tx39.mt (TDEPFILES): Add dve3900-rom.o and support files.
	* config/mips/tx39l.mt: Ditto.
1997-12-29 21:50:10 +00:00
Felix Lee ce4450fa09 * Makefile.in (init.c): don't try to scan mswin for _initialize
funcs.  (generates misleading error message because files have
 	.cpp suffix, not .c suffix)

	* ser-e7kpc.c: <w32sut.h> -> "mswin/w32sut.h"

	* mon960-rom.c: removed unused #includes; no ioctl.h in Windows.
	* nindy-share/ttyflush.c: find sleep() for _MSC_VER.
	* remote-array.c: #include <ctype.h> for isascii().
	* utils.c (notice_quit,pollquit): cleanup.  _WIN32 -> _MSC_VER.
1997-07-28 22:34:36 +00:00
Mark Alexander 9b91bc2295 * utils.c (floatformat_from_doublest): Improve test for infinity. 1997-06-19 15:18:13 +00:00
Fred Fish 40b647e9e2 * config/i386/nm-linux.h: Enable prototypes that were #ifdef out.
* config/tm-sysv4.h (in_plt_section): Add prototype.

	* maint.c (maintenance_translate_address): Avoid assignment
	inside if, per GNU coding standards.
	* symfile.c (simple_read_overlay_table): Avoid assignments inside if, per
	GNU coding standards.

	* monitor.c (parse_register_dump): Is really a void function.
	Add prototype.
	(monitor_read_memory): Remove unused variable "name".
	(monitor_read_memory): Remove unused variable "regbuf".
	(monitor_open): Remove unused variable "i".
	(get_hex_word): Apparently unused, #if away for now.
	(from_hex): Ditto.

	* i386v4-nat.c (supply_fpregset): Remove unused variable "regi".
	(fill_fpregset): Remove unused variables "regi", "to", "from" and
	"registers".

	* remote-e7000.c (ctype.h): Include.
	(e7000_insert_breakpoint): #if away unused arg used by unused expr.
	* frame.h (generic_get_saved_register): Add prototype.
	(enum lval_type): Add partial forward decl.
	* dsrec.c (make_srec): Remove unused variable "type_code".
	* remote-sim.c (gdbsim_wait): Handle sim_running and sim_polling
	cases by just ignoring them.
	(command.h): Include.

	* java-exp.y (parse_number): Remove unused variable "unsigned_p".
	* java-lang.c (gdbcore.h): Include for prototypes.
	(type_from_class): Remove unused variable "ftype".
	(type_from_class): Remove unused variable "name_length".
	(evaluate_subexp_java): Add default case to handle remaining
	enumerations.
	* java-valprint.c (c-lang.h): Include for prototypes.

	* symfile.c (simple_read_overlay_region_table): #if away
	unused function.
	(simple_free_overlay_region_table): Ditto.
	(overlay_is_mapped): Add default case to switch.
	(simple_read_overlay_region_table): Ditto.
	(simple_read_overlay_region_table): Add prototype.

	* symtab.c (fixup_symbol_section): Remove unused msym variable.
	(fixup_psymbol_section): Ditto.
	(find_pc_sect_symtab): Make distance a CORE_ADDR.

	* utils.c: Add comment about t_addr being either unsigned long or
	unsigned long long.
	(paddr): Change formats to match actual types args are cast to.
	(preg): Ditto.
	(paddr_nz): Ditto.
	(preg_nz): Ditto.
1997-06-13 17:30:24 +00:00
Fred Fish 56e327b302 * defs.h (perror_with_name): Is a NORETURN function.
* utils.c (perror_with_name): Is a NORETURN function.
	(error): Is NORETURN independently of ANSI_PROTOTYPES.

	* symtab.c (fixup_symbol_section): Remove prototype.
	* symtab.h: (fixup_symbol_section): Add prototype.
	* m32r-rom.c (report_transfer_performance): Add prototype.
	* sparclet-rom.c: Ditto.
	* dsrec.c: Ditto.

	* c-exp.y (parse_number): Cast args to float* or double* as
	appropriate for conversion format.
	* java-exp.y (parse_number): Ditto.

	* Makefile.in (c-exp.tab.c): Remove #line lines that refer
	to nonexistant y.tab.c file.
	(java-exp.tab.c): Ditto.
	(f-exp.tab.c): Ditto.
	(m2-exp.tab.c): Ditto.
start-sanitize-gdbtk

	* gdbtk.c (gdbtk_init): Make truth value test explicit.
	Remove unused static variable "Gdbtk_Library".
end-sanitize-gdbtk
1997-06-13 14:51:32 +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
Dawn Perchik 28444bf3a1 * mips-tdep.c, remote-mips.c, values.c, mdebugread.c,
config/mips/tm-mips.h: Add/fix bugs for 64-bit mips support.
	* defs.h: Cleanup; add prototypess
	* corefile.c: Change FIXME #ifdef
	* win32-nat.c: Include windefs instead of windows.h.
	* utils.c: Add routines for printing addresses and registers
	based on type size.
1996-11-11 21:02:55 +00:00
Ian Lance Taylor 03e2a8c8a0 * utils.c: Always ensure that size_t is defined. Check
HAVE_STDDEF_H rather than __STDC__
	(xmalloc, xrealloc): Use size_t rather than long.
1996-10-15 22:24:17 +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
Fred Fish 5410991408 * Makefile.in (MMALLOC_CFLAGS): Eliminate intermediate MMALLOC_DISABLE
and MMALLOC_CHECK macros, and add comment indicating how host dependent
	makefile fragment should modify MMALLOC_CFLAGS to not use mmalloc, or
	to use it but to not do heap corruption checking.
	* gdbserver/Makefile.in: Ditto.
	* utils.c (init_malloc): Replace warning() use with direct call of
	fprintf_unfiltered, since current_target has not yet been set and thus
 	we cannot use warning().  If we try to use mmcheck and it fails,
	suggest that this configuration needs NO_MMCHECK or MMCHECK_FORCE
 	defined.  Other small mmalloc related cleanups.
	* config/sparc/sun4os4.mh (MMALLOC_CFLAGS): Define MMCHECK_FORCE to 1.
	* config/alpha/alpha-osf2.mh (MMALLOC_CFLAGS): Set to -DNO_MMCHECK.

	* config/sparc/xm-sun4os4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/i386/xm-i386v4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/i386/xm-linux.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/m68k/xm-hp300hpux.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/m68k/xm-m68kv4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT);
	* config/m68k/xm-sun3os4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/pa/xm-hppah.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/sparc/xm-sun4sol2.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	Remove obsolete defines.

	* config/alpha/alpha-linux.mh (MMALLOC_DISABLE):
	* config/alpha/alpha-osf1.mh (MMALLOC_DISABLE):
	* config/rs6000/rs6000.mh (MMALLOC_DISABLE):
	* config/rs6000/aix4.mh (MMALLOC_DISABLE):
	* config/powerpc/aix4.mh (MMALLOC_DISABLE):
	* config/powerpc/aix.mh (MMALLOC_DISABLE):
	* config/ns32k/ns32km3.mh (MMALLOC_DISABLE):
	* config/mips/mipsm3.mh (MMALLOC_DISABLE):
	* config/mips/decstation.mh (MMALLOC_DISABLE):
	* config/m88k/cxux.mh (MMALLOC_DISABLE):
	* config/i386/i386mk.mh (MMALLOC_DISABLE):
	* config/i386/i386m3.mh (MMALLOC_DISABLE):
	* config/i386/i386gnu.mh (MMALLOC_DISABLE):
	Use MMALLOC_CFLAGS instead.
1996-07-11 07:41:51 +00:00
Stu Grossman 449abd8900 * remote-nindy.c (nindy_open): Acquire more target state so that
user can attach to a previously running program.
	* (nindy_fetch_registers nindy_store_registers):  Get rid of fp
	conversion code.  That's all handled in {extract store}_floating
	now.
	* utils.c (floatformat_to_double):  Don't bias exponent when
	handling zero's, denorms or NaNs.
	* config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
	REGISTER_CONVERT_TO_RAW):  Change to using DOUBLST and
	FLOATFORMAT_TO/FROM_DOUBLEST macros.
	* config/i960/tm-nindy960.h:  Undefine
	REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, and
	REGISTER_CONVERTIBLE.  These are no longer necessary now that all
	the magic happens in extract/store_floating.
1996-04-13 21:33:59 +00:00
Stu Grossman a243a22f43 * dcache.c: Add prototypes. Make many functions static.
* (dcache_peek dcache_fetch dcache_poke):  Make dcache_fetch and
	dcache_poke call dcache_xfer_memory directly in order to fix
	problems with turning off dcache.  dcache_peek is now unnecessary,
	so it goes away.

	* defs.h:  Define new macros HOST_{FLOAT DOUBLE	LONG_DOUBLE}_FORMAT
	and TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT to specify a pointer
	to a struct floatformat.  This allows for better handling of
	targets whose floating point formats differ from the host by more
	than just byte order.
	* (floatformat_to_long_double floatformat_from_long_double):
	Prototypes for new functions in utils.c.
	* (floatformat_to_doublest floatformat_from_doublest):  Prototypes
	for pointers to floating point conversion functions.  The actual
	function uses either double or long double if the host supports it.
	* findvar.c (floatformat_to_doublest floatformat_from_doublest):
	Initialize to point at correct function depending on HAVE_LONG_DOUBLE.
	* (extract_floating store_floating):  Rewrite.  Now, if host fp
	format is the same as the target, we just do a copy.  Otherwise,
	we call floatformat_{to from}_doublest.
	* remote-nindy.c (nindy_xfer_inferior_memory):  Change param
	`write' to `should_write'.
	* utils.c (floatformat_to_long_double
	floatformat_from_long_double):  New routines that implement long
	double versions of functions in libiberty/floatformat.c.
	* config/i960/tm-i960.h (TARGET_LONG_DOUBLE_FORMAT):  Define this for
	i960 extended real (80 bit) numbers.
	* nindy-share/nindy.c (ninMemGet ninMemPut):  Return number of bytes
	actually read or written.
1996-04-11 21:17:45 +00:00
Steve Chamberlain 686941a9cb Sat Oct 28 23:51:48 1995 steve chamberlain <sac@slash.cygnus.com>
* defs.h: Test on name __WIN32__ rather than WIN32.
	* inflow.c (new_tty): Likewise
	* terminal.h: Likewise.
	* utils.c (initialize_utils): Likewise.
	* win32-nat.c (child_create_inferiror): Print error code when failing.
	* config/i386/win32.mh (XM_CLIBS): Need -lkernel32.
1995-10-29 06:58:26 +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
Steve Chamberlain dedcc91de6 Thu Sep 28 14:32:11 1995 steve chamberlain <sac@slash.cygnus.com>
* callback.[ch]: New files.
	* remote-rdp.c: Support for the ARM RDP monitor.
	* Makefile: Update.
	* arm-tdep.c (arm_othernames): New.
	(_initialize_arm_tdep): install 'othernames' command.
	(arm_nullified_insn, shifted_reg_val, arm_get_next_pc): New.
	* configure.in: Check for termios.h, termio.h and sgtty.h.
	(i[345]86-*-win32*): New host.
	* configure: Regenerated.
	* inflow.c: Clean up inclusions.
	* main.c (main): Check for WINGDB, not WIN32.
	* printcmd.c (do_examine): Put QUIT test in loop.
	* remote-hms.c (e7000_load): Delete.
	(hms_ops): Point to generic_load instead.
	* remote-hms.c (hms_ops): Point to generic_load.
	* remote-sim.c (sim_callback_write_stdout): Becomes
	gdbsim_write_stdout.
	(gdbsim_load): Call generic_load.
	* remote-utils.c (gr_load_image): Delete.
	* ser-unix.c (terminal.h): Include instead of havig
	own #if tree.
	(hardwire_flush_input): Reset input buffer too.
	* source.c (openp): If WIN32 then open file in binary mode.
	* terminal.h: Configure IO mechanism using autoconf defines if available and
	not overriden.
	* utils.c (quit, pollquit, notice_quit): WIN32 check becomes WINGDB check.
	* config/arm/arm.mt (TDEPFILES): Add remote-rdp.o
	* config/arm/tm-arm.h (TARGET_BYTE_ORDER): becomes TARGET_BYTE_ORDER_SELECTABLE.
	(ADDR_BITS_REMOVE): New.
	(ORIGINAL_REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): New.
	(INST_xx): New
	(FRAME_FIND_SAVED_REGS): Pass the right argument.
	(arm_get_next_pc): Declare.
	* mswin/prebuilt/*/bfdtarget.h (SELECT_ARCHITECTURES): Need leading &.
1995-09-29 00:14:01 +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
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
J.T. Conklin 85c613aaa7 * utils.c (fprintf_filtered, fprintf_unfiltered, fprintfi_filtered,
printf_filtered, printf_unfiltered, printfi_filtered, query, warning,
          error, fatal, fatal_dump_core): Use stdarg.h macros when compiling
          with an ANSI compiler.
        * complain.c (complain): Likewise.
        * language.c (type_error, range_error): Likewise.
        * monitor.c (monitor_printf, monitor_printf_noecho): Likewise.
        * remote-array.c (printf_monitor, debuglogs): Likewise.
        * remote-mips.c (mips_error): Likewise.
        * remote-os9k.c (printf_monitor): Likewise.
        * remote-st.c (printf_stdebug): Likewise.
        * gdbtk.c (gdbtk_query): Likewise.

        * defs.h, complain.h, language.h, monitor.h: Add prototypes to
          match above changes.

        * printcmd.c: Remove uneeded #include <varargs.h>.
        * remote-e7000.c: Likewise.

        * f-typeprint.c (f_type_print_base): Fix typo found by above
          changes.
1995-05-18 23:45:31 +00:00
Jim Kingdon 8989d4fc4b * utils.c, defs.h (warning_begin): Renamed from warning_setup, for
consistency with error_begin.  Also print warning_pre_print.
	Document it better.
	* utils.c (warning): Use it.
	* utils.c (error_begin): Doc fix.
	* rs6000-nat.c (vmap_ldinfo): If symfile_objfile is not part of
	any vmap, nuke it.
1995-04-11 22:26:14 +00:00
Stan Shebs 49073be098 Always keep MPW support 1995-04-11 02:08:59 +00:00
Jim Kingdon a7f6f40b3c * utils.c, defs.h (putchar_unfiltered, fputc_unfiltered): Make
argument be an int, not a char.  Using a prototype followed by an
	old-style function definition in a case where an argument is
	widened is a GCC-ism not supported by the native AIX compiler.
1995-03-15 23:24:24 +00:00
Jim Kingdon 0d172a2ef4 * utils.c [_AIX]: Include stddef.h instead of #defining size_t. 1995-03-03 21:38:54 +00:00
Stu Grossman cad1498f8a * Makefile.in: Add stuff to build nlmstub.
* Add rule for annotate.o to keep Sun make happy.
	* configure.in:  Add config for powerpc/Netware.

	* partial-stab.h (near N_SO):  Don't call START_PSYMTAB with null
	filename.  This speeds up handling of trailing N_SO stabs (they
	mark the end of a .o file).

	* target.c, target.h:  Change the way pushing and popping of
	targets work to support target overlays and inheritance.
	* corelow.c, hppa-tdep.c, inflow.c, remote-nindy.c, utils.c:
	Fixup references to current_target, due to previous changes.

	* config/i386/tm-i386nw.h:  Enable longjmp support.  More work is
	needed to get the address of longjmp out of the target.
1994-07-23 00:53:28 +00:00
Jim Kingdon 9c036bd836 * utils.c (vfprintf_maybe_filtered, vfprintf_unfiltered): Call
fputs_unfiltered and exit directly, rather than fatal.  The latter
	calls vfprintf_unfiltered!

	* gdbtypes.h, gdbtypes.c (can_dereference): New function.
	* value.h, printcmd.c (print_value_flags): Move from here...
	* annotate.c: ...to here, and make it use can_dereference.
1994-05-17 20:13:50 +00:00
Stan Shebs 16d2cc8084 Sat May 14 15:13:52 1994 Stan Shebs (shebs@andros.cygnus.com)
* inflow.c (job_control, attach_flag, generic_mourn_inferior):
	Remove, needed for both native and cross.
	* target.c (attach_flag, generic_mourn_inferior): Put here.
	* utils.c (job_control): Put here.
	(terminal.h): Don't include anymore.
1994-05-14 23:12:29 +00:00
Jim Kingdon d8fc877318 * source.c (find_source_lines): Always use code that was #ifdef
BROKEN_LARGE_ALLOCA.  Do the cleanup before returning, rather than
	leaving it on the chain.  Reindent much of this function.
	* config/sparc/{xm-sun4sol2.h,xm-sun4os4.h},
	config/i386/{xm-sun386.h,xm-i386m3.h,xm-i386mach.h},
	config/m68k/{sun3os4.h,xm-news.h,xm-hp300hpux.h},
	config/ns32k/xm-ns32km3.h: Remove all references to
	BROKEN_LARGE_ALLOCA; with the above change it is no longer needed.
	* main.c, fork-child.c, many config files: Remove all
	SET_STACK_LIMIT_HUGE code; with the above changes it should no
	longer be needed.

	* symtab.c (lookup_partial_symbol): Use if and abort, not assert.
	This avoids __eprintf troubles.

	* main.c (main): Surround in #ifndef MAIN_OVERRIDE.  Move
	initialization code which needs to be called even if we bypass the
	command line stuff into gdb_init.
	* utils.c (fputs_unfiltered): Surround in #ifndef
	FPUTS_UNFILTERED_OVERRIDE.
	* Makefile.in (libgdb.a): New target.

	* utils.c: Rearrange I/O stuff a bit so that all output goes
	through fputs_unfiltered.  Use vasprintf; removes arbitrary limit
	which made %s not work with arbitrarily large strings.
	* printcmd.c (printf_command): Use printf_filtered, not
	printf_unfiltered and printf, now that arbitrary limit is gone.
1994-05-14 19:37:57 +00:00
Jim Kingdon 1c95d7ab2e gcc -Wall lint:
* breakpoint.c (watchpoint_check): Remove unused variable b.
	* stack.c (print_frame_info): Move sp and buf inside #if.
	* eval.c (evaluate_subexp): Remove unused variables pp,
	mangle_ptr, ptr, and mangle_tstr.
	* valarith.c (value_x_binop): Remove unused variables mangle_tstr
	and mangle_ptr.
	* symtab.c (lookup_symtab): Put variable copy inside #if.
	(decode_line_1): Put variable q1 inside #if 0.
	* target.h: Declare target_link.
	* infrun.c (wait_for_inferior): Remove unused variables signame.
	* remote.c (remote_resume): Remove unused variable name.
	* c-exp.y (parse_number): Parenthesize operand of shift.
	* dbxread.c (record_minimal_symbol): Parenthesize operand of &&
	(this is a semantic change, the warning seems to have detected a bug).
	* dbxread.c (end_psymtab): Move variable p1 inside #if.
	* coffread.c: Move variable temptype inside #if.
	* ch-typeprint.c (chill_type_print_base): Remove unused variable
	name.
	* ch-valprint.c: #include typeprint.h and ch-lang.h.
	(chill_val_print): Remove unused variable in_range.
	(chill_val_print): Remove statement "length > TYPE_LENGTH (type);".
	(chill_val_print): Add default case for switch.
	* stabsread.h: Declare stabsect_build_psymtabs.
	* os9kread.c (read_minimal_symbols): Make this return void.
	(os9k_symfile_read): Remove unused variables stb_exist and val.
	(os9k_symfile_init): Remove unused variable val.
	(fill_sym): Remove unused variable id.
	(read_os9k_psymtab): Put variable back_to inside #if 0.  Remove
	unused variable nsl.
	Remove unused variable symfile_bfd.
	#if 0 unused variables lbrac_unmatched_complaint and
	lbrac_mismatch_complaint.
	Remove declaration for non-existent function os9k_next_symbol_text.

	* annotate.c, annotate.h: New files, containing a function for
	each annotation which outputs it.
	* Move breakpoints_changed from breakpoint.c to annotate.c.
	* breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c,
	printcmd.c, source.c, stack.c, utils.c, valprint.c:
	Use annotate.c functions to output annotations.
	* Makefile.in (OBS): Add annotate.o.
1994-05-13 18:18:57 +00:00
Stan Shebs a6b26c4431 Changes for MacGDB:
Thu May 12 17:04:58 1994  Stan Shebs  (shebs@andros.cygnus.com)

	* mpw-make.in (INCLUDE_CFLAGS): Add readline source dir.
	(READLINE_CFLAGS, READLINE_SRC, READLINE_DIR): Uncomment.
	(TSOBS): Don't compile inflow.c.
	(all, install): Add MacGDB.
	* main.c (main): Do Mac-specific init and command loop if a
	standalone app, skip full option help message if compiling
	with MPW C.
	(gdb_readline): If MPW, add a newline after the (gdb) prompt.
	* utils.c (_initialize_utils): If MPW, don't try to use termcap to
	compute the window size.
	* config/m68k/xm-mpw.h (printf, fprintf, fputs, fputc, putc,
	fflush): Define as macros that expand into hacked_... versions.
	(StandAlone, mac_app): Declare.
	* macgdb.r (SIZE): Set the default partition to 4000K.
	* mac-xdep.c (readline.h, history.h): Include.
	(terminal.h): Don't include.
	(mac_app): Define.
	(gdb_has_a_terminal): Define Mac-specific version.
	(do_keyboard_command): Simplify search for command string.
	(readline): Define as gdb_readline.
	Add other history/readline stubs to make main gdb link.
	(hacked_fprintf, hacked_printf, hacked_vfprintf, hacked_fputs,
	hacked_fputc, hacked_fflush): New functions, intercept output to
	stdout and stderr, send to console window.
1994-05-13 00:31:31 +00:00
Jim Kingdon a0cf46812c * utils.c, defs.h (error_begin): New function.
(quit): Print annotation before printing the error message.
	* main.c (return_to_top_level): Print annotation before doing the
	longjmp.
	* symtab.c (decode_line_1): Call error not warning and then
	return_to_top_level.  Call error_begin and printf_unfiltered
	rather calling warning (before calls to return_to_top_level).
	* core.c (memory_error): Use error_begin, printf_unfiltered,
	print_address_numeric and return_to_top_level instead of error.
	Cleans up a FIXME-32x64.
	* language.c (type_error, range_error): Call error_begin
	not just target_terminal_ours.
1994-04-28 21:38:15 +00:00
Jim Kingdon 4dd876ac2e (prompt_for_continue): Likewise for prompt-for-continue annotation. 1994-04-28 16:04:36 +00:00
Jim Kingdon d8742f4673 * utils.c (query): Change syntax of query annotations to be
consistent with other input annotations.
1994-04-28 15:48:15 +00:00
Jim Kingdon a94100d198 * utils.c (prompt_for_continue): Call readline, not gdb_readline. 1994-03-19 06:36:18 +00:00
Steve Chamberlain 8eec331072 * utils.c (prompt_for_continue): Call readline, not gdb_readline. 1994-03-19 03:16:10 +00:00
Jim Kingdon f29351d98b * utils.c (fputs_unfiltered): Call fputs, not fputs_maybe_filtered. 1994-01-15 20:14:43 +00:00
Jim Kingdon 44a09a68f2 * utils.c (request_quit): Re-establish signal handler regardless
of USG.

	* config/mips/xm-irix4.h: Define HAVE_TERMIOS.
1994-01-15 03:43:01 +00:00
Thomas Lord 69fb299ec3 Don't let printf_unfiltered functions inherit a fixed-size buffer
from their _filtered counterparts.
1993-11-02 23:03:41 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Jim Kingdon 159dd2aa93 * main.c, utils.c: Add comments about immediate_quit. 1993-09-28 16:23:44 +00:00
Fred Fish 5aefc1ca23 Remove chill sanitizations, which are no longer necessary. 1993-04-16 23:22:41 +00:00
John Gilmore 65ce5df44f * dbxread.c (unknown_symchar_complaint): Add new complaint.
* stabsread.c:  Declare it.
* partial-stab.h:  Use it.

* utils.c (malloc_botch):  Don't forward-declare if NO_MMALLOC.
1993-04-15 09:41:59 +00:00
Fred Fish bd5d07d94c * utils.c (fputs_demangled): Complete rewrite to clean up and
add a language parameter that is used to select the demangling
	algorithm.
	* defs.h (enum language):  Move further up in file so enum can
	be used in prototypes.
	* defs.h (fputs_demangled):  Update prototype to add lang arg.
	* c-typeprint.c (cp_type_print_method_args):  Add language arg
	to fputs_demangled calls, remove DMGL_PARAMS flag.
	* stack.c (print_frame_info):  Remove obsolete code so we don't
	have to update fputs_demangled usage in it.
	* stack.c (print_frame_info, frame_info):  Add language variable
	to pass to fputs_demangled and initialize it from the symbol's
	language.  Call fputs_demangled with language arg.
	* symtab.c (find_methods):  Add language arg to fputs_demangled
	call.
1993-03-11 17:44:39 +00:00
Fred Fish 2e4964adfc * defs.h (STRCMP, STREQ, STREQN): New macros.
* defs.h (demangle_and_match):  Remove prototype.
	* dwarfread.c (STREQ, STREQN):  Remove macros, replaced with STREQ
	  and STREQN defined in defs.h.
	* dwarfread.c (set_cu_language):  For completely unknown languages,
	  try to deduce the language from the filename.  Retain behavior
	  that for known languages we don't know how to handle, we use
	  language_unknown.
	* dwarfread.c (enum_type, symthesize_typedef):  Initialize language
	  and demangled name fields in symbol.
	* dwarfread.c, mipsread.c, partial-stab.h:  For all usages of
	  ADD_PSYMBOL_TO_LIST, add language and objfile parameters.
	* dwarfread.c (new_symbol):  Attempt to demangle C++ symbol names
	  and cache the results in SYMBOL_DEMANGLED_NAME for the symbol.
	* elfread.c (STREQ):  Remove macro, use STREQ defined in defs.h.
	  Replace usages throughout.
	* elfread.c (demangle.h):  Include.
	* elfread.c (record_minimal_symbol):  Remove prototype and function.
	* gdbtypes.h, symtab.h (B_SET, B_CLR, B_TST, B_TYPE, B_BYTES,
	  B_CLRALL):  Moved from symtab.h to gdbtypes.h.
	* infcmd.c (jump_command):  Remove code to demangle name and add
	  it to a cleanup list.  Now just use SYMBOL_DEMANGLED_NAME.
	* minsyms.c (demangle.h):  Include.
	* minsyms.c (lookup_minimal_symbol):  Indent comment to match code.
	* minsyms.c (install_minimal_symbols):  Attempt to demangle symbol
	  names as C++ names, and cache them in SYMBOL_DEMANGLED_NAME.
	* mipsread.c (psymtab_language):  Add static variable.
	* stabsread.c (demangle.h):  Include.
	* stabsread.c (define_symbol):  Attempt to demangle C++ symbol
	  names and cache them in the SYMBOL_DEMANGLED_NAME field.
	* stack.c (return_command):  Remove explicit demangling of name
	  and use of cleanups.  Just use SYMBOL_DEMANGLED_NAME.
	* symfile.c (demangle.h):  Include.
	* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):  Fix
	  to match macros in symfile.h and allow them to be compiled
	  if INLINE_ADD_PSYMBOL is not true.
	* symfile.h (INLINE_ADD_PSYMBOL):  Default to true if not set.
	* symfile.h (ADD_PSYMBOL_*):  Add language and objfile parameters.
	  Add code to demangle and cache C++ symbol names.  Use macro form
	  if INLINE_ADD_PSYMBOL is true, otherwise use C function form.
	* symmisc.c (add_psymbol_to_list, add_psymbol_addr_to_list):
	  Remove, also defined in symfile.c, which we already fixed.
	* symtab.c (expensive_mangler):  Remove prototype and function.
	* symtab.c (find_methods):  Remove physnames parameter and fix
	  prototype to match.
	* symtab.c (completion_list_add_symbol):  Name changed to
	  completion_list_add_name.
	* symtab.c (COMPLETION_LIST_ADD_SYMBOL):  New macro, adds both
	  the normal symbol name and the cached C++ demangled name.
	* symtab.c (lookup_demangled_partial_symbol,
	  lookup_demangled_block_symbol):  Remove prototypes and functions.
	* symtab.c (lookup_symbol):  Remove use of expensive_mangler,
	  use lookup_block_symbol instead of lookup_demangled_block_symbol.
	  Remove code to try demangling names and matching them.
	* symtab.c (lookup_partial_symbol, lookup_block_symbol):
	  Fix to try matching the cached demangled name if no match is
	  found using the regular symbol name.
	* symtab.c (find_methods):  Remove unused physnames array.
	* symtab.c (name_match, NAME_MATCH):  Remove function and macro,
	  replaced with SYMBOL_MATCHES_REGEXP from symtab.h.
	* symtab.c (completion_list_add_symbol):  Rewrite to use cached
	  C++ demangled symbol names.
	* symtab.h:  Much reformatting of structures and such to add
	  whitespace to make them more readable, and make them more
	  consistent with other gdb structure definitions.
	* symtab.h (general_symbol_info): New struct containing fields
	  common to all symbols.
	* symtab.h (SYMBOL_LANGUAGE, SYMBOL_DEMANGLED_NAME,
	  SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME,
	  SYMBOL_MATCHES_REGEXP, MSYMBOL_INFO, MSYMBOL_TYPE):  New macros.
	* symtab. (struct minimal_symbol, struct partial_symbol, struct
	  symbol): Use general_symbol_info struct.
	* utils.c (demangle_and_match):  Remove, no longer used.
	* valops.c (demangle.h):  Include.
	* xcoffexec.c (eq):  Remove macro, replace usages with STREQ.
	* blockframe.c, breakpoint.c, c-exp.y, c-valprint.c, dbxread.c,
	  infcmd.c, m2-exp.y, minsyms.c, objfiles.h, solib.c, stack.c,
	  symmisc.c, symtab.c, valops.c:  Replace references to minimal
	  symbol fields with appropriate macros.
	* breakpoint.c, buildsym.c, c-exp.y, c-typeprint.c, c-valprint.c,
	  coffread.c, command.c, convex-tdep.c, cp-valprint.c, dbxread.c,
	  demangle.c, elfread.c, energize.c, environ.c, exec.c,
	  gdbtypes.c, i960-tdep.c, infrun.c, infrun-hacked.c, language.c,
	  main.c, minsyms.c, mipsread.c, partial-stab.h, remote-es1800.c,
	  remote-nindy.c, remote-udi.c, rs6000-tdep.c, solib.c, source.c,
	  sparc-pinsn.c, stabsread.c, standalone.c, state.c, stuff.c,
	  symfile.c, symmisc.c, symtab.c, symtab.h, tm-sysv4.h,
	  tm-ultra3.h, values.c, xcoffexec.c, xcoffread.c:  Replace strcmp
	  and strncmp usages with STREQ, STREQN, or STRCMP as appropriate.
	* breakpoint.c, buildsym.c, c-typeprint.c, expprint.c, findvar.c,
	  mipsread.c, printcmd.c, source.c, stabsread.c, stack.c,
	  symmisc.c, tm-29k.h, valops.c, values.c:  Replace SYMBOL_NAME
	  references with SYMBOL_SOURCE_NAME or SYMBOL_LINKAGE_NAME as
	  appropriate.
	* buildsym.c (start_subfile, patch_subfile_names):  Default the
	  source language to what can be deduced from the filename.
	* buildsym.c (end_symtab):  Update the source language in the
	  allocated symtab to match what we have been using.
	* buildsym.h (struct subfile):  Add a language field.
	* c-typeprint.c (c_print_type):  Remove code to do explicit
	  demangling.
	* dbxread.c (psymtab_language):  Add static variable.
	* dbxread.c (start_psymtab):  Initialize psymtab_language using
	  deduce_language_from_filename.
1992-12-23 06:34:57 +00:00
Fred Fish 51b80b0072 * complaints.c: New file, code moved from utils.c.
* complaints.c (complain):  Made into a varargs function.
	* complaints.h:  New file, code moved from symfile.h.
	* Makefile.in (SFILES_MAINDIR):  Add complaints.c.
	* Makefile.in (HFILES):  Add complaints.h.
	* Makefile.in (OBS):  Add complaints.o.
	* symfile.c (complaint_root, stop_whining, complaint_series,
	complain, clear_complaints, add_show_from_set for stop_whining):
	Moved to complaints.c.
	* symfile.h (struct complaint, complaint_root decl, complain
	prototype, clear_complaints prototype):  Moved to complaints.h.
	* buildsym.c, coffread.c, dbxread.c, dwarfread.c, elfread.c,
	gdbtypes.c, mipsread.c, stbsread.c, symfile.c:  Include
	complaints.h.  Remove casts from arguments to complain(),
	which is now a varargs function, and remove unnecessary
	placeholder zero args.
	* defs.h (begin_line):  Add prototype.
	* defs.h (vprintf_filtered):  Add prototype.
	* dwarfread.c (varargs.h):  Remove, no longer needed.
	* dwarfread.c (dwarfwarn):  Remove prototype and function.
	* dwarfread.c (complaints):  Define a bunch of complaints.
	* dwarfread.c (SQUAWK):  Remove macro defs, convert all
	usages to standard complain() calls.
	* utils.c (begin_line):  New function that ensures that
	whatever gets filter-printed next starts on its own line.
	* utils.c (vprintf_filtered):  New func, like vfprintf_filtered,
	but to stdout (calls vfprintf_filtered internally).
1992-12-15 12:18:53 +00:00
John Gilmore d974236f80 * utils.c (prompt_for_continue): Reinitialize more-counts
before printing anything, and again afterward.  Fix comments.
(vfprintf_filtered):  Eliminate static buffer; use auto buffer,
or alloca() if needed.

* rs6000-xdep.c:  Use correct conditional (IBM6000_TARGET) to
detect native versus cross-host.
1992-09-17 10:58:53 +00:00
Stu Grossman a8e033f2a2 * breakpoint.c, core.c, exec.c, language.c, main.c, printcmd.c,
symfile.c, target.c, valprint.c:  Use _filtered form of *printf.
defs.h, utils.c:  Make vfprintf_filtered global.
1992-09-15 06:27:18 +00:00
Stu Grossman b36e3a9b49 Oops! Retract last change. Didn't mean to pollute things with energize just
yet!
1992-09-15 05:11:52 +00:00
Stu Grossman 3e3b0eb9d9 * utils.c (query): Remove test for energize from top. Now
handled in input_from_terminal_p().
1992-09-15 05:04:08 +00:00
Per Bothner 546014f750 * utils.c (strcmp_iw): Add a hack to allow "FOO(ARGS)" to
match "FOO".  This allows 'break Foo' to work when Foo is
	a mangled C++ function.  (See comment before function.)
1992-09-03 05:03:47 +00:00
Fred Fish 4ed3a9ea66 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
	eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
	i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
	infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
	putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
	sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
	tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
	values.c, xcoffread.c:
	Remove "(void)" casts from function calls where the return value
	is ignored, in accordance with GNU coding standards.
1992-07-04 03:22:08 +00:00
John Gilmore 0f552c5fc6 * buildsym.c (scan_file_globals): Beware the null file.
Fix from Jim Williams.

* stack.c (return_command):  Evaluate expression *before* popping
off the stack frames!  Fix inspired by Jim Williams.
(up_silently_command, down_silently_command):  No sel frame is error.

* defs.h (memcpy, memset):  Conditionalize decls on
#ifndef MEM_FNS_DECLARED, since DECstation differs.
(alloca):  Break out the STDC and non-STDC alloca cases, to make
it work on old preprocessors as well as "picky ANSI" ones.
* xm-mips.h (memcpy, memset):  Declare, and set MEM_FNS_DECLARED.

* mips-tdep.c (heuristic_proc_start):  Zero arg produces zero.
* utils.c (fputs_demangled):  Rename SLOP since DECstation system
header files define it!
1992-06-30 08:53:28 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
1992-06-29 23:34:38 +00:00