Commit Graph

95 Commits

Author SHA1 Message Date
Dawn Perchik 16a43bf443 * defs.h: Fix cntl-C to read from the Windows message queue.
Add prototypes for make_final_cleanup (and the other cleanup
	routines.
	* remote-e7000.c: Fix sync code to timeout if unable to sync.
	Change sync code to report status while trying to sync-up
	with hardware.  Add debugging output and document.
	* ser-e7kpc.c: Swap order of len & offset to match implementation.
	Add debugging output and document.
	* serial.c: Add debugging output.
	* top.c: Add call to do_final_cleanups.
	Remove conditionals preventing Win32 from getting SIGQUIT.
	* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
	chain as a parameter.  Extract this generic code from the cleanup
	routines into separate funtions (*_my_cleanup).  Keep old
	functionality by passing "cleanup_chain" to the new funtions.
	Define the cleanup chain "final_cleanup_chain" to be a cleanup
	chain which will be executed only when gdb exits.  Add functions
	(*_final_cleanup) to match the original (*_cleanup) functions.
	(pollquit, quit, notice_quit): Fix to read cntl-C from the
	Windows message queue.
1997-02-12 10:27:11 +00:00
Geoffrey Noer cad9cd605c Mon Nov 11 17:15:59 1996 Geoffrey Noer <noer@cygnus.com>
* defs.h: modify Nov 11 12:59:00 change so _MSC_VER is checked
        instead of _WIN32
        * win32-nat.c: fix Nov 11 12:59:00 change (windows.h should
        be included instead of windefs.h for compilers other than
        VC++).
        * mswin/windefs.h: remove ^Ms and change C++ style comments
        to C style comments
1996-11-12 02:19:25 +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
Fred Fish b51843d888 * defs.h: Remove define of PRIVATE_XMALLOC. 1996-10-01 03:04:13 +00:00
Stu Grossman 9e77e83d30 * dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c
mdebugread.c os9kread.c source.c top.c utils.c:  Don't
	include param.h or sys/file.h (or unistd.h in some cases).
	* defs.h exec.c inflow.c remote-array.c remote-e7000.c
	sparcl-tdep.c terminal.h utils.c:  Replace all occurances of
	__WIN32__, WINGDB, WIN32, etc... with _WIN32.
	* main.c:  Remove #ifndef WINGDB around option processing.  Fix
	bug with passing argc==0 and argv==NULL to getopt.
	* (main) Remove calls to access() before source_command.  Let
	soure_command handle access errors.
	* maint.c (maintenance_dump_me):  #ifdef out for _WIN32.
	* symtab.c (operator_chars):  Make this global for wingdb.
	* top.c (disconnect):  #ifdef out for _WIN32.
	* (source_command):  If got an error and from_tty, then call print
	error, else just return quietly.
	* utils.c (fatal_dump_core):  Can't kill ourselves under windows.
	Just exit.
	* (pollquit notice_quit):  #ifdef out stuff that doesn't exist
	under windows.
1996-08-08 02:50:22 +00:00
Fred Fish 3f550b5940 * configure.in: Add test for "long long" support.
* configure: Regenerate with autoconf.
	* acconfig.h: Add CC_HAS_LONG_LONG
	* config.in: Regenerate with autoheader.
	* config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove
	* config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	(FORCE_LONG_LONG): Remove.
	* config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version.
	* config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove.
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/pa/tm-hppa.h (GET_FIELD): Put parens around
	subtraction inside shift.  Put parens around subtraction
	in operand of bitwise and.
	(struct frame_info): Forward declare
 	if __STDC__ defined.
	(frame_saved_regs): Ditto.
	(struct value): Ditto.
	(struct type): Ditto.
	(struct inferior_status): Ditto.
	(init_extra_frame_info): Add prototype.
	(skip_prologue): Ditto.
	(frameless_function_invocation): Ditto.
	(frame_chain): Ditto.
	(frame_chain_valid): Ditto.
	(saved_pc_after_call): Ditto.
	(hppa_fix_call_dummy): Ditto.
	(hppa_push_arguments): Ditto.
	(pa_do_registers_info): Ditto.
	(in_solib_call_trampoline): Ditto.
	(in_solib_return_trampoline): Ditto.
	(push_dummy_frame): Ditto.
	* convex-tdep.c (decout): Use print_longest rather than
	fprintf_filtered.
	* defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set
	CC_HAS_LONG_LONG.
	(INT_MIN): Fix so it works correctly when assigned to a long long.
	* valprint.c (longest_to_int): Rewrite to remove dependence
	on INT_MIN and INT_MAX.
	(print_longest): Rewrite the code that falls back to synthesized
	hex output when LONGEST value is not representable as in a long and
 	printf doesn't support printing long longs.
	* ch-valprint.c (chill_val_print): Cast 2nd arg of
	chill_print_type_scalar to LONGEST.
	chill_print_type_scalar): Make static and add prototype.
	* hppa-tdep.c (get_field): Ifdef out unused function.
	(set_field): Ditto.
	(extract_3): Ditto.
	(extract_5_store): Ditto.
	(extract_11): Ditto.
	(extract_12): Ditto.
	(deposit_17): Ditto.
	(extract_14): Convert to static and add prototype.
	(deposit_14): Ditto.
	(extract_21): Ditto.
	(deposit_21): Ditto.
	(extract_17): Ditto.
	(extract_5r_store): Ditto.
	(extract_5R_store): Ditto.
	(extract_5_load): Ditto.
	(find_proc_framesize): Ditto.
	(find_dummy_frame_regs): Ditto.
	(sign_extend): Ditto.
	(find_unwind_entry): Add prototype.
	(find_return_regnum): Ditto.
	(unwind_command): Ditto.
	(find_dummy_frame_regs): Add parens around subtraction in operand
	of bitwise-and.
	(skip_prologue): Add parens around operands of logical-and inside
	operand of logical-or.
	(sign_extend): Add parens around operands of subtraction inside
	operand of shift.
	(low_sign_extend): Ditto.
	* top.c (filename_completer): Convert old style decl of
	filename_completion_function into prototype.
	* f-lang.c (patch_common_entries): Ifdef out unused function.
	* stabsread.c (read_cfront_baseclasses): Remove unused local
	variable "msg_noterm".
	(resolve_cfront_continuation): Remove unused local variable "fip".
	(read_type): Remove unused variable xtypenums.
	(read_cfront_static_fields): Remove unused variable "i".
	(read_cfront_static_fields): Remove unused variable "nfields".
	(read_cfront_member_functions): Add missing comment terminator.
	(read_cfront_static_fields): Return 1 rather than random value.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	* somsolib.c (som_solib_create_inferior_hook): Remove unused
	variable "u".
	(som_solib_create_inferior_hook): Remove unused variable
	shadow_contents.
	(language.h): Add for needed prototypes.
	(som_solib_sharedlibrary_command): Add prototype.
	* hpread.c: (hpread_read_array_type): Add prototype.
	* somread.c (hpread_build_pysmtabs): Add prototype.
	(hpread_symfile_finish): Ditto.
	(hpread_symfile_init): Ditto.
	* hppah-nat.c (fetch_register): Convert old style decl
	to prototype.
	(gdbcore.h): Include for needed prototypes.
	(fetch_register): Remove unused variable "mess".
	* remote-pa.c (get_offsets): Ifdef out unused function.
	(remote_start_remote): Remove unused variable "timeout".
	(boot_board): Add prototype.
	(reaad_frame): Add prototype.
	(getpkt): Remove unused variable "bp".
	(remote_kill): Add prototype.
	(remote_mourn): Add prototype.
	(remote_insert_breakpoint): Add prototype.
	(remote_remove_breakpoint): Add prototype.
	* valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined.
	* infcmd.c (do_registers_info): Only need prototype if
	DO_REGISTERS_INFO is not defined.
	(breakpoint_auto_delete_contents): Only need if
	CALL_DUMMY_BREAKPOINT_OFFSET is defined.
1996-07-28 06:32:48 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Stu Grossman 91550191be * defs.h printcmd.c: Create global disassemble_info structure
tm_print_insn_info.
	* gdbtk.c (gdb_disassemble):  Setup di.mach from
	tm_print_insn_info.mach, and set endian from TARGET_BYTE_ORDER.
	* i386-tdep.c (set_assembly_language_command):  set
	tm_print_insn_info.mach to the appropriate value for 386 or 8086
	disassembly.
	* printcmd.c (print_insn):  Move init of disassembler_info to
	_initialize_printcmd.  Set endian for disassembler here.
	* sparc-tdep.c:  Set tm_print_insn_info.mach as appropriate to
	select sparc/sparclite.
	* config/sparc/{tm-sparc.h tm-sparclite.h}:  Get rid of
	TM_PRINT_INSN.  Set TM_PRINT_INSN_MACH to
	bfd_mach_sparc/bfd_mach_sparc_sparclite.
1996-07-15 23:54:39 +00:00
Stu Grossman c6fbd98bed * defs.h: Define TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT
defaults for bi-endian targets.  Replace function pointers for
	floatformat routines with macros.  No need for these to be runtime
	selectable.
	* findvar.c:  Get rid of floatformat function pointers.  Use
	macros in extract_floating and store_floating.
	* remote-nindy.c (nindy_fetch_registers nindy_store_registers):
	Use floatformat macros.
1996-04-12 16:53:08 +00:00
Fred Fish d8efbc6679 From: Miles Bader <miles@gnu.ai.mit.edu>
* configure.in (AC_CHECK_HEADERS): check for endian.h.
	Use AC_CHECK_TOOL to find AR & RANLIB.  Add AC_PROG_AWK.
	Add host & target cases for i[345]86-*-gnu*.
	* config.in: Regenerate with autoheader.
	* configure: Regenerate with autoconf.
	* Makefile.in (AR, AWK): Set from corresponding autoconf substs.
	(init.c): Don't scan mig-generated files.
	* defs.h (endian.h): Include if HAVE_ENDIAN_H defined.
	* config/nm-m3.h (ATTACH_NO_WAIT): Define.
	* infcmd.c (attach_command): Use "#ifndef ATTACH_NO_WAIT"
 	rather than "#ifndef MACH".
1996-04-12 06:14:46 +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
Fred Fish 81afee37d0 * demangle.c (is_cplus_marker): New function, checks if a
character is one of the commonly used C++ marker characters.
	* defs.h (is_cplus_marker):  Add prototype.
	* c-typeprint.c (c_type_print_base), ch-lang.c (chill_demangle),
	cp-valprint.c (cp_print_class_method), mdebugread.c (parse_symbol),
	stabsread.c (define_symbol, read_member_functions, read_struct_fields),
	symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P),
	values.c (vb_match):  Use is_cplus_marker instead of comparison
	with CPLUS_MARKER.
1996-02-16 06:14:15 +00:00
Per Bothner 0e4ca328e1 * defs.h (enum language): Add language_scm.
* expression.h (enum exp_code):  Added OP_EXPRSTRING.
	* scm-lang.c:  Preliminary support for Guile /SCM dialect of Scheme.
	* expprint.c (print_subexp):  Add OP_EXPRSTRING support.
	* parse.c (length_of_subexp, prefixify_subexp):  Likewise.
	* valops.c (find_function_in_inferior):  New function.
	(value_allocate_space_in_inferior):  New function.
	(allocate_space_in_inferior):  Redefine using previous function.
	* Makefile.in (SFILES):  Add scm-lang.c.
	(COMMON_OBS):  Add scm-lang.o
1995-09-29 01:43:54 +00:00
Steve Chamberlain 6b009ef680 Wed Sep 20 08:16:03 1995 steve chamberlain <sac@slash.cygnus.com>
* defs.h (xmalloc, xrealloc): Delete, they're declared in libiberty.h.
	(GETENV_PROVIDED, FCLOSE_PROVIDED): New.
	* doc/gdbint.texinfo (GETENV_PROVIDED, FCLOSE_PROVIDED): Document.
	* remote-sim.[ch] (gdbsim_write_stdout): New.
1995-09-20 15:32:41 +00:00
Fred Fish 031c4a7eed * defs.h: Only include mmalloc.h if NO_MMALLOC is not
defined.
1995-09-11 23:41:45 +00:00
Steve Chamberlain b6d70e158a * stack.c (gdb_string.h): Include after defs.h
* defs.h (target_output_hook): New declaration.
	* source.c (mod_path): Fix Win32 \ handling.
1995-08-07 22:39:00 +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
Jeff Law 413cba82b4 * defs.h (vprintf_filtered declaration): Add PARAMS prototype;
gcc-2.5 chokes on format attributes for unprototyped functions.
	(vfprintf_filtered declaration): Likewise.
	(vprintf_unfiltered declaration): Likewise.
	(vfprintf_unfiltered). Likewise.
1995-05-29 05:15:18 +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
J.T. Conklin eba0864375 * monitor.c (monitor_printf): Changed format specification in
error message to work with pre-ansi compilers.
  (monitor_load_srec): reduced length of s-records from 128 to 32
  bytes so download is more reliable with the rom68k monitor.

* rom68k-rom.c: Added trailing space to prompt string.

* config/i386/xm-i386sco.h (HAVE_STRSTR): Removed.
* config/i386/xm-go32.h, mswin/xm.h (SYS_SIGLIST_MISSING):
  Removed.
* defs.h, config/{xm-lynx.h, xm-nbsd.h},
  config/i386/{xm-i386bsd.h, xm-linux.h},
  config/m68k/xm-hp300bsd.h, config/mips/xm-irix4.h,
  config/ns32k/xm-ns32km3.h, doc/gdbint.texinfo
  (PSIGNAL_IN_SIGNAL_H): Removed.
1995-05-17 23:13:26 +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
Kung Hsu 66aa7cf935 * defs.h (SWAP_TARGET_AND_HOST): check endianess at runtime not
compile time.
1995-03-01 02:13:06 +00:00
Kung Hsu 75988f9412 * defs.h: fix a syntax error. 1995-03-01 00:22:46 +00:00
Kung Hsu 326ae3e292 * defs.h: define SWAP_TARGET_AND_HOST macro.
* findvar.c, monitor.c, hppa-tdep.c: remove definition of
        SWAP_TARGET_AND_HOST.
1995-02-28 23:08:06 +00:00
Stan Shebs e3be225eb4 gcc -Wall lint.
* alpha-tdep.c (alpha_in_lenient_prologue): Comment out.
	(after_prologue): Remove unused local b.
	* procfs.c (thread.h): Include.
	(pr_flag_table, pr_why_table, faults_table, siginfo_table): Use
	nested braces in initializer.
	* top.c (initialize_targets, initialize_utils): Declare.
	(locate_arg, insert_args): Add parens around tested assignments.
	* remote-utils.c (sr_scan_args): Remove decl of strtol.
	* remote.c (thread.h): Include.
	(remote_wait): Remove unused local p2.
	* sparc-tdep.c (fill_gregset, fill_fpregset): Remove decls of
	registers array.

	defs.h (stdlib.h): Include.
	(exit, perror, atoi, qsort, memcpy, memcmp): Don't declare.
	(fclose, atof, malloc, realloc, free, strchr, strrchr, strstr,
	strtok,	strerror): Don't specify parameter types in declaration.
1995-02-02 00:10:50 +00:00
Stan Shebs 18b46e7c53 General cleanup and simplication of disassembler interface.
* a29k-pinsn.c, arm-pinsn.c, convex-pinsn.c, gould-pinsn.c,
        hppa-pinsn.c, i386-pinsn.c, i960-pinsn.c, m68k-pinsn.c,
        m88k-pinsn.c, mips-pinsn.c, ns32k-pinsn.c, pyr-pinsn.c,
        rs6000-pinsn.c, sparc-pinsn.c, tahoe-pinsn.c, vax-pinsn.c: Remove.
	* gould-tdep.c, ns32k-tdep.c, tahoe-tdep.c, vax-tdep.c: New files,
	had been -pinsn.c files.
	* Makefile.in (ALLDEPFILES): Remove removed files.
	(a29k-pinsn.o, arm-pinsn.o, convex-pinsn.o, gould-pinsn.o,
        hppa-pinsn.o, i386-pinsn.o, i960-pinsn.o, m68k-pinsn.o,
        m88k-pinsn.o, mips-pinsn.o, ns32k-pinsn.o, pyr-pinsn.o,
        rs6000-pinsn.o, sparc-pinsn.o, tahoe-pinsn.o, vax-pinsn.o):
        Remove compile actions.
	* arm-tdep.o, gould-tdep.o, ns32k-tdep.o, tahoe-tdep.o,
	vax-tdep.o: Add compile actions.
	* defs.h (tm_print_insn): New global.
	* a29k-tdep.c (gdb_print_insn_a29k): New function.
	(_initialize_a29k_tdep): Rename from _initialize_29k,
	set tm_print_insn.
	* alpha-tdep.c (print_insn): Remove.
	(_initialize_alpha_tdep): Set tm_print_insn.
	* arm-tdep.c (arm_print_insn): New function, was print_insn
	in arm-pinsn.c.
	* convex-tdep.c (convex_print_insn): New function, was print_insn
	in convex-pinsn.c.
	* h8300-tdep.c (print_insn): Remove.
	(gdb_print_insn_h8300): New function.
	(_initialize_h8300_tdep): New function.
	* h8500-tdep.c (print_insn): Remove.
	(_initialize_h8500_tdep): New function.
	* hppa-tdep.c (_initialize_hppa_tdep): Set tm_print_insn.
	* i386-tdep.c (_initialize_i386_tdep): New function.
	* i960-tdep.c (mem, next_insn): New functions, were in
	i960-pinsn.c.
	(_initialize_i960_tdep): Set tm_print_insn.
	* m68k-tdep.c (_initialize_m68k_tdep): New function.
	* m88k-tdep.c (_initialize_m88k_tdep): New function.
	* mips-tdep.c (gdb_print_insn_mips): New function.
	(_initialize_mips_tdep): Set tm_print_insn.
	* pyr-tdep.c (pyr_print_insn): New function, was print_insn
	in pyr-pinsn.c.
	* rs6000-tdep.c (_initialize_rs6000_tdep): New function.
	* sh-tdep.c (print_insn): Remove.
	(gdb_print_insn_sh): New function.
	(_initialize_sh_tdep): Set tm_print_insn.
	* sparc-tdep.c (_initialize_sparc_tdep): New function.
	* w65-tdep.c (print_insn): Remove.
	(_initialize_w65_tdep): New function.
	* z8k-tdep.c (print_insn): Remove.
	(gdb_print_insn_z8k): New function.
	(_initialize_z8k_tdep): Set tm_print_insn.
	* printcmd.c (print_insn): New function, generic disassembler.
	* config/*/*.mt (TDEPFILES): Remove refs to *-pinsn.o.

	* defs.h (query_hook, error_hook): Fix prototypes.
1995-01-17 04:36:51 +00:00
Steve Chamberlain 16041d5304 Sun Jan 15 14:36:19 1995 Steve Chamberlain <sac@splat>
* breakpoint.h (disable_breakpoint, enable_breakpoint):
	New declarations.
	(enum bpdisp): Change name of 'delete' member to 'del'.
	(struct bpstat): Changed name to 'bpstats'.
	* breakpoint.c (disable_breakpoint, enable_breakpoint,
	breakpoint_chain): Made globally visible.
	(bpstat_stop_status): Use new name for bpstat.
	(break_command_1, watch_command_1, catch_command_1,
	breakpoint_auto_delete, denable_delete_breakpoint): Use 'del'
	instead of 'delete'.
	(set_breakpoint_sal): New function.
	* defs.h (registers_changed_hook): New declaration.
	* infcmd.c (run_stack_dummy): 'delete' is now 'del'.
	* inflow.c (new_tty): Treat WIN32 in same way as __GO32__
	* main.c (main): Don't scan options when in WIN32 and exit
	without entering main loop.
	* m2-exp.y (m2_elx): Member 'class' is now 'aclass'.
	* symtab.h (struct symbol, struct partial_symbol): Changed name of
	member 'class' to 'aclass'.
	(SYMBOL_CLASS, PSYMBOL_CLASS): Reflect change.
	* top.c (registers_changed_hook): New definition.
	* utils.c (quit, notice_quit, initialize_utils): Treate WIN32
	in same way as __GO32__.
	* value.h (c_typedef_print): Rename 'new' argument.
1995-01-15 23:17:43 +00:00
Stu Grossman 0972203902 * Makefile.in (install_only uninstall): Indent for clarity
* core.c (dis_asm_read_memory):  Add call to
	dis_asm_read_memory_hook to provide alternate way for disassembler
	to read memory.

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

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

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

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

	* Pop up a copyright window on startup.

	* top.c:  Make window startup be the default.
	* Add dis_asm_read_memory_hook.
1995-01-06 01:55:45 +00:00
Kung Hsu c023fbf429 * defs.h: move include tm.h up, so that the type LONGEST can
also based on the target requirement to determine. In this case
        target mips64.
1995-01-05 00:49:29 +00:00
Stu Grossman 86db943ceb * defs.h, gdbtk.c (gdbtk_fputs), main.c (gdb_fputs), top.c: Add stream arg
to fputs_unfiltered_hook.  Differentiate stdout from stderr when
	passing text into tcl land.
	* defs.h, top.c, utils.c (error):  Add error_hook.
	* gdbtk.c:  Improve mechanism for capturing output values.
	* (full_filename):  Remove.
	* (gdb_cmd call_wrapper gdbtk_init):  Protect all calls from tcl
	land with call_wrapper.  This prevents longjmps (usually via
	error()) from jumping out of tcl/tk and leaving things in an
	indeterminate state.
	* gdbtk.tcl:  New view option to disable line numbers.  Put catch
	around most uses of gdb_cmd.  Add update button to reg config
	window.  Stop doing immediate updates when selecting registers.
	Change register view values into checkbuttons.
1994-12-16 01:07:35 +00:00
Stu Grossman c51975113d * defs.h, gdbtk.c, main.c, top.c: Change sense and name of
no_windows variable.  Now called use_windows, and defaults to off
	(for compatibility).
1994-10-26 22:45:13 +00:00
Stu Grossman 479f0f18d4 * defs.h, infrun.c (wait_for_inferior), top.c: Call
target_wait_hook to allow GUI to handle blocking for inferior.  Call
	call_command_hook in execute_command to provide means for wrapping
	commands with GUI state change updates.
	* gdbtk.c (gdb_cmd):  Force GUI into idle mode when errors occur.
	* (gdb_stop):  New tcl command to stop the target process.
	* (x_event, gdbtk_wait):  Allow GUI to interrupt gdb out of target
	waits.
	* (gdbtk_call_command):  Wrapper around command processing to
	alert GUI of target state changes.
	* (gdbtk_init):  Get the fd of X server for doing async
	notification of X events (via x_event).  Setup new hooks.
	* gdbtk.tcl:  Add scrollbars to assembly and command windows.
	* Change window foreground & background colors.
	* Create margin tag for breakpoints in source and assembly windows.
	* Add new routines to be invoked when target state changes to/from
	idle.
	* Add start of expression window.
	* Change bindings of mouse button 1 in assembly and source window
	to just set or clear breakpoints when in the margin tag.
	* Change shape of register window to be more vertical to better
	reflect it's contents.
	* Add stop button.
	* Cleanup some code around command window bindings.

	* infrun.c (wait_for_inferior):  Make sure
	through_sigtramp_breakpoint is non-null before deleting.
1994-10-21 00:59:20 +00:00
Peter Schauer 78751d4fbb * defs.h (misc_command_type): Remove trailing comma from
enumerator list.
1994-09-26 10:02:43 +00:00
Stu Grossman 637b166117 * defs.h (QUIT): Call interactive_hook to allow GUI to interrupt.
Also, add decl for symtab_to_filename.
	* gdbtk.c:  Replace calls to full_filename with symtab_to_filename.
	* gdbtk.tcl:  New routine pc_to_line replaces in line code.  New
	routine decr replaces in line code.
	* (create_file_win):  Use catch to handle open failures more
	elegantly.  Also, create special window to display file open
	failure message.  Move opening of file prior to creation of text
	widget.
	* (create_asm_win):  Add PC as argument.  We now base disassembly
	on PC instead of function name, since function names can be
	ambiguous (usually seen with shared libs).  Also, use catch to
	simplify code where we don't care about failures.
	* source.c (symtab_to_filename):  New.  Returns the file
	associated with a symtab.
	* top.c:  Define interactive_hook.  Called during QUIT to animate
	the GUI.
1994-09-16 22:57:37 +00:00
Jeff Law e52bfe0cc4 * defs.h (enum misc_command_type, command_control_type): Enums
for describing the command and control types.
	(struct command_line): Add new fields to keep track of the command
	type and body associated with the command.
	* top.c: Include value.h.  Delete whitespace at the end of lines.
	(build_command_line, get_command_line): New functions.
	(execute_control_command, while_command, if_command): Likewise.
	(realloc_body_list, read_next_line): Likewise.
	(recurse_read_control_structure): Likewise.
	(execute_user_command): Call execute_control_command.
	(read_command_lines): Simplify by calling read_next_line, call
	read_control_structure for "if" and "while" commands.
	(free_command_lines): Free new fields in the command structure.
	(define_command): Reset control_level to zero.
	(init_main): Install command handlers for "if" and "while" commands.
1994-09-08 05:32:34 +00:00
David Edelsohn 97e7b66f5e (concat, basename, buildargv, freeargv, strerrno, strsigno,
errno_max, signo_max, strtoerrno, strtosigno):  Delete.
Include "libiberty.h" instead.
1994-08-11 11:09:54 +00:00
Stu Grossman 8164ec2eb5 * defs.h, top.c: Use `extern' in declarations of GUI hooks, and
define them in top.c.  Add comments to the hooks.
1994-08-10 23:16:40 +00:00
Stan Shebs 6f54efdc4b * defs.h: Change two-line declarations to one-line form.
(NORETURN): Define as "volatile" only for older GCCs.
	(ATTR_NORETURN): Define for newer GCCs.
	* procfs.c (proc_init_filed): Add ATTR_NORETURN to declaration.
1994-08-02 02:02:39 +00:00
Stu Grossman 754e5da26e * Makefile.in (INSTALLED_LIBS, CLIBS, DEPFILES): Add support for
--enable-xxx configure option by adding ENABLE_{CLIBS DEPFILES}
	where appropriate.

	* General hackery to support alternate user-interface.
	* breakpoint.c (mention, delete_breakpoint, enable_breakpoint,
	disable_breakpoint):  Call hooks for alternate user-interface.
	* defs.h:  Add declarations for alternate user-interface hooks.
	* main.c (main):  Add --nw (and --nowindows) options to disable
	the GUI.
	* (near call to command_loop):  Call command_loop_hook if set.
	* (fputs_unfiltered):  Call fputs_unfiltered_hook if set.
	* stack.c:  Call print_frame_info_listing_hook if set.
	* top.c (gdb_init):  Initialize targets.c and utils.c prior to
	other files to make sure that calls to error and warning will
	work.  Call init_ui_hook after everything else.
	* utils.c (query):  Call query_hook if set.
	* (gdb_flush):  Call flush_hook if set.
	* Change _initialize_utils to initialize_utils cuz we don't use
	automatic initialization of utils.c anymore.

	* Support for TK GUI.
	* Makefile.in:  Add rule for gdbtk.o.
	* configure.in:  Add support for --enable-gdbtk.
	* gdbtk.c:  New file.  Contains support routines for TK interface.
	* gdbtk.tcl:  New file.  Implements GUI policy.

	* remote.c:  Get rid of #ifdef DONT_USE_REMOTE.  It's no longer
	necessary.
1994-07-28 22:07:02 +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 9e8db4456e * breakpoint.c (watch_command): Use (CORE_ADDR)0, not NULL, for
target null pointer.
	* blockframe.c (find_frame_addr_in_frame_chain): Likewise.

	* printcmd.c (output_command): Annotate things we print here too.
	* Move declaration of print_value_flags from defs.h to value.h.
	* main.c (command_line_input): Call wrap_here as well as gdb_flush.
1994-04-21 21:19:58 +00:00
Jim Kingdon 96f7edbde8 * printcmd.c (print_command_1): Annotate the top-level expressions
that we print.
	(print_frame_args): Annotate each argument.
	* printcmd.c, defs.h (print_value_flags): New function.
	* cp-valprint.c (cp_print_value_fields): Annotate each field.
	* valprint.c (val_print_array_elements): Annotate each array element.
1994-04-21 04:28:08 +00:00
Jim Kingdon 6c803036a9 * main.c (main): Accept --annotate=N option and make --fullname
the same as --annotate=1.
	(command_line_input): Print annotatation before and after prompt.
	* blockframe.c (flush_cached_frames): Print annotation.
	* Rename frame_file_full_name to annotation_level and move it from
	symtab.h to defs.h.
	* source.c (identify_source_line): If annotation_level > 1,
	change output format.
	* breakpoint.c: Print annotation whenever a breakpoint changes.
	* main.c: New variable server_command.
	(command_line_input): Parse "server " and set server_command.
	(dont_repeat): Check server_command.
1994-04-20 19:23:30 +00:00
Stan Shebs fad466eb6d Fri Apr 15 11:53:46 1994 Stan Shebs (shebs@andros.cygnus.com)
* source.c (DIRNAME_SEPARATOR): New macro, replaces all references
	to : in search path processing.
	* defs.h (qsort): Rename argument in prototype.
	* symtab.h (SAYMBOL_VALUE): Rename value field, avoids bugs in
	some compilers.
	* breakpoint.c, exec.c, mdebugread.c, mipsread.c, xcoffexec.c
	(false): Eliminate usages.
1994-04-15 21:55:49 +00:00
Jim Kingdon fb0f423133 * defs.h, valprint.c: Make longest_to_int a function not a macro.
Only test against INT_MIN if a LONGEST is bigger than an int.
1994-02-18 17:47:43 +00:00
Kung Hsu 70126bf94e Modified Files:
ChangeLog configure.in defs.h mips-tdep.c

        * configure.in: add mips64-*-elf, mips64-*-ecoff, mips64el-*-elf,
        mips64el-*-ecoff and mips64-big-*.
        * defs.h: get rid of FORCE_LONG_LONG.
        * mips-tdep.c (mips_find_saved_regs): add sd and sdc1 instruction
        parsing. Change register size to be MIPS_REGSIZE.
1994-02-18 01:38:08 +00:00
Jim Kingdon 7343d7167f * defs.h (alloca): Declare as void *, not char *, on hpux.
Don't prototype it, just declare the return type.
1994-02-06 15:00:00 +00:00
Jim Kingdon 833e0d94cc Fix many sins which will come up in 32 bit x 64 bit GDB, and
various miscellaneous things discovered in the process:
	* printcmd.c, defs.h (print_address_numeric): New function.
	* c-valprint.c (c_val_print), ch-valprint.c (chill_val_print)
	breakpoint.c (describe_other_breakpoints, breakpoint_1, mention),
	cp-valprint.c (cplus_print_value), infcmd.c (jump_command),
	printcmd.c, stack.c, symfile.c, symmisc.c, valprint.c:
	Use it.
	* utils.c, defs.h (gdb_print_address): New function.
	* expprint (dump_expression), gdbtypes.h: Use it.
	* breakpoint.c (describe_other_breakpoints),
	symmisc.c (dump_symtab, print_symbol):
	Use filtered not unfiltered I/O.
	(remove_breakpoints): Remove BREAKPOINT_DEBUG code.  Might as well
	just run gdb under a debugger for this (and it had problems with
	printing addresses, how to print b->shadow, etc.).
	* buildsym.c (make_blockvector), core.c (memory_error),
	exec.c (print_section_info), maint.c (print_section_table),
	mdebugread.c (parse_procedure), solib.c, source.c, symfile.c,
	symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
	Add comments saying code is broken.  Marked with "FIXME-32x64".
	* dbxread.c (process_one_symbol), partial-stab.h (default),
	remote-vx.c (vx_run_files_info):
	Don't cast int being passed to local_hex_string.
	* symmisc.c (print_symbol): Don't cast long being passed to %lx.
	* symtab.h (general_symbol_info): Add comment about SYMBOL_VALUE
	only being a long.
	* symmisc.c (print_symbol): Print "offset" in message for LOC_ARG
	and LOC_LOCAL.
	* printcmd.c (print_address): Remove #if 0 code with ADDR_BITS_REMOVE.
	* source.c: Include <sys/types.h> regardless of USG.
1994-01-27 00:36:05 +00:00
Jim Kingdon f4f0d17487 * valops.c (call_function_by_hand, push_word), defs.h (push_word),
convex-xdep.c, m88k-nat.c, i386m3-nat.c, mips-tdep.c, mipsm3-nat.c,
	ns32km3-nat.c, remote-bug.c, m88k-tdep.c, remote-hms.c, remote-mips.c,
	config/gould/tm-np1.h, hppa-tdep.c (hppa_fix_call_dummy), remote-vx.c:
	Use REGISTER_SIZE, unsigned LONGEST, and
	{store,extract}_unsigned_integer, instead of sizeof
	(REGISTER_TYPE) and REGISTER_TYPE.
	* All tm.h files: Change REGISTER_TYPE to REGISTER_SIZE.
	* hppa-tdep.c (pa_print_fp_reg): Remove unused variable val.

	* Makefile.in (ALLDEPFILES): Remove i386ly-nat.c and m68kly-nat.c.
	Add lynx-nat.c.
1993-12-26 18:10:22 +00:00
Jim Kingdon 04f566a356 * defs.h: Move definitions of TARGET_*_BIT after include of tm.h.
The old way (using #undef in tm.h) was ugly and asking for
	trouble, because it makes it possible for some file to use the
	wrong definition.  Move definition of HOST_CHAR_BIT after definition
	of TARGET_CHAR_BIT.
	* config/alpha/tm-alpha.h, config/h8300/tm-h8300.h,
	config/h8500/tm-h8500.h, config/z8k/tm-z8k.h: Don't undef TARGET_*_BIT
	before defining them.
1993-12-25 18:44:22 +00:00