Commit Graph

3387 Commits

Author SHA1 Message Date
Stan Shebs 9e9cf82258 * gdbtk.tcl (debug_interface): New global, use to aid debugging.
(insert_breakpoint_tag, delete_breakpoint_tag): Fix range.
	(file_popup_menu): Delete, never used.
	(listing_window_popup): Rename from listing_window_button_1,
	remove breakpoint toggling code.
	(toggle_breakpoint): New procedure.
	(create_file_win): Bind popup menu to button 2, toggle breakpoints
 	with button 1 in breakpoint area, add display of tagged areas if
 	debugging on.
1996-05-03 02:28:13 +00:00
Jeff Law e51481f967 * From Peter Schauer:
* breakpoint.h (enum bpdisp):  Add del_at_next_stop.
        * breakpoint.c (insert_breakpoints, watchpoint_check,
        bpstat_stop_status):  Avoid bad references to memory freed via
        delete_breakpoint on watchpoints going out of scope.
        Do not delete these watchpoints, disable them and change their
        disposition to del_at_next_stop instead.
        (breakpoint_auto_delete):  Delete all breakpoints whose disposition
        is del_at_next_stop.
        (breakpoint_init_inferior):  Use switch to avoid reference to
        already deleted breakpoint.
Fixes dangling pointer problems with watchpoints.
1996-05-02 18:43:28 +00:00
Fred Fish 062cb0d30d * Makefile.in (rs6000-nat.o): Dependant on xcoffsolib.h.
* config/rs6000/rs6000.mh (NATDEPFILES): Move xcoffread.o ...
	* config/rs6000/rs6000.mt (TDEPFILES): ... to here
	* xcoffsolib.c (xcoff_relocate_symtab_hook): Define and initialize.
	(solib_info): Call xcoff_relocate_symtab via the hook.
	(sharedlibrary_command): Ditto.
	* xcoffread.c: Remove all FAKING_RS6000 comments and defines.
	(xcoff_add_toc_to_loadinfo_hook): Define and initialize here.
	(xcoff_init_loadinfo_hook): Define and initialize here.
	(scan_xcoff_symtab): Call xcoff_add_toc_to_loadinfo via the hook.
	(xcoff_initial_scan): Call xcoff_init_loadinfo via the hook.
	* xcoffsolib.h (xcoff_relocate_symtab_hook): Declare extern func.
	* rs6000-tdep.c (_initialize_rs6000_tdep): Add initializations
	of xcoff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
	* rs6000-nat.c (_initialize_core_rs6000): Add initialization
	of xcoff_relocate_symtab_hook.
1996-05-02 01:32:41 +00:00
Michael Meissner fe8d28cfc1 Add bieginning of Solaris/PowerPC support 1996-04-30 17:23:41 +00:00
Dawn Perchik aad0977925 * c-valprint.c (c_val_print): Fix printing for arrays defined
with 0 length.
1996-04-29 23:25:27 +00:00
Stan Shebs fea17b5545 Support for bi-endian remote breakpoints.
* remote.c (big_break_insn, little_break_insn): New globals.
	(break_insn): Remove.
	(remote_insert_breakpoint, remote_remove_breakpoint): Use own
	code if REMOTE_BREAKPOINT defined, otherwise call memory
	breakpoint functions.
	* config/sh/tm-sh.h (REMOTE_BREAKPOINT): Remove.
	(BIG_REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT): Define.
1996-04-28 23:43:05 +00:00
Stan Shebs 5a2934b4be * mon960-rom.c (mon960_cmds): Remove forward decl.
(mon960_load): Use current_monitor instead of mon960_cmds.
	(mon960_regnames): Remove backslashes from line ends.
	(_initialize_mon960): Fix documentation string.
1996-04-28 22:14:17 +00:00
Fred Fish d2c17d4f50 * symfile.h (psymbol_allocation_list): Expand comments which
describe the psymbol allocation list and how each field is
	used.
1996-04-28 19:22:40 +00:00
Peter Schauer 39ce68291e * breakpoint.c (delete_breakpoint): Fix bpt->val, bpt->exp
storage leaks.
	(breakpoint_re_set_one):  Fix b->exp, b->val, b->cond storage leaks.

	* infcmd.c (run_command), solib.c (locate_base):  Check for
	target_has_execution in addition to inferior_pid, a core file
	from a threaded program is yielding a non-zero inferior_pid.

	* sparc-tdep.c (get_saved_register):  Handle window registers
	in a dummy frame correctly.
1996-04-28 10:49:54 +00:00
Fred Fish 6c0643e30f * Makefile.in (CLIBS): Move $(MMALLOC) past all other libs,
so that anything that wants an allocation function not yet pulled
	in, will get it from mmalloc rather than a system library.
	* Makefile.in (INSTALLED_LIBS): Reorder to match order of CLIBS,
	to avoid surprising results when used.
1996-04-28 03:47:49 +00:00
Jeff Law 6cc17fd543 Fix typo in ChangeLog entry. 1996-04-28 03:37:39 +00:00
Dawn Perchik 00d93b6d5e * stabsread.c: Changes and bug fixes for cfront support.
Fix bug for class data members.
	Fix parsing bug when no base classes exist.
	Fix memory bug - allocate space for cplusplus specific info.
	Add support for static data.
	Add prototypes for static functions.
	Enhance comments to show what each function expects to parse.
	Cleanup code.
	* stabsread.c(resolve_cont),dbxread.c(resolve_cont): Rename
	function to resolve_cfront_continuation.
1996-04-27 09:47:53 +00:00
Jeff Law 7dbb5eed30 * infrun.c (wait_for_inferior): Call registers_changed when
restarting the inferior to get over a nullified instructions.
Fixes PA testsuite regressions.
1996-04-27 05:56:07 +00:00
Dawn Perchik 73e75264a1 Forgot to checkin ChangeLog with last checkin for cfront support. 1996-04-24 19:42:24 +00:00
Jeff Law 894d8e6946 * infrun.c (wait_for_inferior): Move "have_waited" label
outside of #ifdef conditionals.  Don't trash the wait status
        if we get a signal and the current instruction is nullified.
Fixes long standing problem on the PA (spurious SIGTRAPs)..
1996-04-24 06:36:10 +00:00
Stan Shebs 178ed33898 * monitor.h: Clean up comment formatting.
(current_monitor): Remove decl.
	(LOADTYPES, LOADPROTOS, INIT_CMD, etc): Remove definitions.
	(push_monitor, SREC_SIZE): Remove.
	* monitor.c: Expand old macro into current_monitor derefs
	everywhere.
	* remote-os9k.c (current_monitor): Remove definition.
1996-04-22 23:46:02 +00:00
Fred Fish 517cb8d739 Consistently use address <fnf@cygnus.com> for entries. 1996-04-22 23:11:03 +00:00
Mark Alexander f9fedc48d1 * corefile.c (specify_exec_file_hook): Allow arbitrary number of
hooks.
	(call_extra_exec_file_hooks): New function.
	* h8300-tdep.c: Lint; add .h files to provide missing declarations,
	remove unused variables.
	(set_machine_hook): New function.
	(_initialize_h8300m): Initialize it.

PR 8849.
1996-04-22 22:31:10 +00:00
Ian Lance Taylor 102f473b78 * remote-mips.c (encoding): Don't specify size, to avoid bug in
SunOS native compiler.
1996-04-19 19:05:00 +00:00
Stan Shebs 69159fad82 * monitor.c: Use int rather than LONGEST for values, since
the formatting strings are not prepared to accept long longs.
PR 9432
1996-04-19 01:55:57 +00:00
David Edelsohn e1b4f28735 * arm-tdep.c (initialize_arm_tdep): Make apcs32 a `zinteger'. 1996-04-18 03:18:20 +00:00
Stu Grossman 8eff3c7fe6 * corelow.c (add_to_thread_list): Make sure reg_sect is non-null
before de-referencing it.  Prevents deref of NULL pointer if core
	file lacks .reg section.
	* defs.h:  Rename floatformat_{to from}_long_double to
	floatformat_{to from}_doublest.  Get rid of FLOATFORMAT_{TO
	FROM}... macros.
	* findvar.c (extract_floating store_floating):  Change all refs to
	FLOATFORMAT_{FROM TO}... to floatformat_{from to}_doublest.
	* utils.c:  Change floatformat_{to from}_long_double to
	floatformat_{to from}_doublest cuz the new routines will use
	whatever size (double or long double) is appropriate.
	* config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
	REGISTER_CONVERT_TO_RAW):  Change FLOATFORMAT... macros to
	floatformat... routine calls.
1996-04-17 00:48:09 +00:00
Per Bothner 15b03b5783 * stabsread.c (read_type): Move handling of '@' from type
number handling to handling of types proper (as emitted by gcc!).
	For typedefs, allocate the typedef type before reading its
	definition, to properly handling recursive types.
This fixes PR 9434.
1996-04-15 23:45:51 +00:00
Jeff Law c5ee9d00bf * ch-exp.c (calculate_array_length): Fix prototype.
So gdb will build with non-ansi compilers.
1996-04-15 17:17:19 +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
Peter Schauer 9898b3b7c7 * eval.c (evaluate_subexp_standard): Report error when attempting to
evaluate subscripts for types which cannot be subscripted.

	* valarith.c (value_x_binop, value_x_unop):  Add noside parameter.
	Return a zero value with the return type of the member function
	if noside is EVAL_AVOID_SIDE_EFFECTS instead of calling the member
	function.
	* values.h (value_x_binop, value_x_unop):  Update prototypes
	accordingly.
	* eval.c (evaluate_subexp_standard):  Update all callers of
	value_x_binop, value_x_unop accordingly.

	* valarith.c (value_neg, value_complement):  Perform ANSI C/C++
	integral promotion on operands.
1996-04-13 10:01:49 +00:00
Fred Fish 38d715a4c8 * README: Update for 4.16 release.
* configure.in (AC_CHECK_FUNCS): Also check for sbrk.
	* configure: Regenerate with autoconf.
	* config.in: Regenerate with autoheader.
	* main.c (main): Only use sbrk() when HAVE_SBRK is defined.
	* top.c (command_loop): Ditto.
1996-04-13 04:38:55 +00:00
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
Stan Shebs 4eaf7c0a94 * remote.c (remotewritesize): New GDB variable, controls size
of memory packets sent to the target.
1996-04-12 01:58:39 +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
Wilfried Moser f046f4c87a * ch-valprint.c (chill_val_print): Remove call to calculate_array_length.
(calculate_array_length): Move function from here ...

        * ch-exp.c (calculate_array_length): ... to here.
        (parse_primval): If we have a symbol with an array type
        and the length is 0, call calculate_array_length.
1996-04-10 10:01:30 +00:00
Wilfried Moser a539f6d8b9 * eval.c (evaluate_subexp_standard): In case of TYPE_CODE_SET:
Add some checks for powerset compatibility.

        * valops.c (value_slice): Use lowbound instead of lowerbound for
        call to slice_range_type to get correct bounds.
1996-04-09 08:28:50 +00:00
Fred Fish 5579919f7d * Makefile.in (scm-exp.o, scm-lang.o, scm-valprint.o): Add targets and
dependencies.
	* scm-lang.c (gdb_string.h): Include.
	* objfiles.c (add_to_objfile_sections): Cast second arg of obstack_grow
	call to correct type (char *).
	* cp-valprint.c (cp_print_static_field): Ditto.
	* somsolib.c (som_solib_create_inferior_hook): Add a declaration
	for external find_unwind_entry function (from hppa-tdep.c).
	* remote-pa.c (remote_write_bytes, remote_read_bytes): Change
	type of second arg to "char *" to be type compatible with
	dcache.
	(remote_wait): Cast second arg to strtol to correct type.
	* hppa-tdep.c (compare_unwind_entries): Change argument types to
	"const void *" to be type compatible with qsort, and then
	assign to local args prior to use.
1996-04-09 06:09:33 +00:00
Jeff Law 75eb523103 * infptrace.c (kill_inferior): Remove call to "kill"; update
comments.
The "kill" call was declared bogus years ago and is causing problems
on hpux10 (PR 9410).
1996-04-08 21:34:12 +00:00
Geoffrey Noer 7782ee45c4 Modified remote-e7000.c so that :23 isn't appended to the target port
if __WIN32__ is defined.  This is necessary to make e7000 support work
for WinGDB.
1996-04-08 21:08:38 +00:00
Fred Fish ce0787ef68 From: Miles Bader <miles@gnu.ai.mit.edu>
* gnu-nat.c, gnu-nat.h, msg.defs, exc_request.defs, i386gnu-nat.c,
	msg_reply.defs, notify.defs, process_reply.defs, reply_mig_hack.awk,
	config/nm-gnu.h, config/i386/{i386gnu.mh, i386gnu.mt, nm-gnu.h,
	m-i386gnu.h, xm-i386gnu.h}: New files for GNU hurd.
1996-04-08 05:50:30 +00:00
Fred Fish 125c17af91 * configure.in (case host): Add i386sco5 host.
* configure: Regenerate.

	From: Robert Lipe <robertl@dgii.com>
	Add support for SCO OpenServer 5 (a.k.a. 3.2v5*)  This
	target is an SVR3.2 with COFF, ELF, and shared libes, but
	no /proc.
	* config/i386/i386sco5.mh:  New file.
	* config/i386/nm-i386sco5.h:  New file.
1996-04-07 21:04:21 +00:00
Fred Fish a6b65627d4 * bcache.c (bcache): When size of chunk to cache is exactly equal to
BCACHE_MAXLENGTH, stash chunk as unique copy.
1996-04-06 17:40:03 +00:00
Fred Fish eae8aa302e * symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.
(add_psymbol_to_list): Add an arg for passing CORE_ADDR values and
	use it, rather than calling add_psymbol_addr_to_list.
	(add_psymbol_addr_to_list): Delete.
	(add_psymbol_to_list): Make psymbol static to avoid random data in
	gaps due to alignment of structure members.
	* symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST,
 	ADD_PSYMBOL_ADDR_TO_LIST): Remove.  Real world tests show no
	performance improvements by inlining via complicated macros and
	they just make gdb larger and harder to maintain.
	* dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST
	and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to
	add_psymbol_to_list with appropriate long or CORE_ADDR args.
	(add_partial_symbol): Ditto.
	* partial-stab.h: Ditto.
	* os9kread.c (read_os9k_psymtab): Ditto
	* mdebugread.c (parse_partial_symbols): Ditto.
	(handle_psymbol_enumerators): Ditto.
	(demangle.h): Include.
	* hpread.c (hpread_build_psymtabs): Ditto.
	(hpread_build_psymtabs): Ditto.
	(demangle.h): Include
1996-04-06 10:19:19 +00:00
Stan Shebs fda6fadc0d * gdbtk.c (running_now): New global variable.
(gdb_cmd): Test it before executing any command.
	(gdbtk_call_command): Set it when inferior is running.
	* gdbtk.tcl (gdbtk_tcl_busy, gdbtk_tcl_idle): Enable and
	disable interaction with command window's text appropriately.
1996-04-05 21:52:38 +00:00
Michael Meissner 51bea8cf37 Add sanitize-gdbtk markers 1996-04-05 18:27:45 +00:00
Michael Meissner 8b3f9ed645 Undef SIOCSPGRP if on Linux 1996-04-05 18:27:08 +00:00
Fred Fish 72ae15f6b0 * configure.in: Check for setpgid function.
* config.in: Regenerate with autoheader.
	* configure: Regenerate with autoconf.
	* inflow.c (_initialize_inflow): Only try to use _SC_JOB_CONTROL
	if it is actually defined.
	(gdb_setpgid): Use HAVE_SETPGID.
	* ch-exp.c: Change include of <string.h> to "gdb_string.h".
	* c-exp.y: Ditto.
	* f-exp.y: Ditto.
	* m2-exp.y: Ditto.
	* c-exp.y: Include <ctype.h>.
	* serial.c: Ditto.
	* config/m68k/nm-news.h: Add typedef for pid_t which is
	apparently missing from <sys/types.h>.  Enclose entire
	file in NM_NEWS_H ifndef and define when included.
	* config/mips/nm-news-mips.h: Ditto.
	* config/m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL,
	REGISTER_CONVERT_TO_RAW): Change name of temporary variable.
1996-04-05 04:22:08 +00:00
Stan Shebs 72c9954b87 * arm-xdep.c: Move native-specific code to here from arm-tdep.c.
* arm-tdep.c (arm_apcs_32): New global.
	(arm_addr_bits_remove, arm_saved_pc_after_call,
 	arm_push_dummy_frame, arm_pop_frame): New functions.
	(arm_skip_prologue): Updated version from Richard Earnshaw.
	(_initialize_arm_tdep): Add set/show "apcs32".
	* config/arm/tm-arm.h (ADDR_BITS_REMOVE): Call
	arm_addr_bits_remove.
	(SAVED_PC_AFTER_CALL): Call arm_saved_pc_after_call.
	(frame_find_saved_regs): Declare properly.
	(PUSH_DUMMY_FRAME): Call arm_push_dummy_frame.
	(POP_FRAME): Call arm_pop_frame, use ADDR_BITS_REMOVE instead of
	explicit mask.
	* config/arm/nm-arm.h: New file.
	* config/arm/xm-arm.h (KERNEL_U_ADDR, FETCH_INFERIOR_REGISTERS):
	Move definitions to nm-arm.h.
	* config/arm/arm.mh (NAT_FILE): Define.
PR 8941
1996-04-05 04:14:11 +00:00
Stan Shebs 67c1413d7f * symfile.c (generic_load): Initialize data_count properly. 1996-04-05 03:07:54 +00:00
Fred Fish 3e3ee48f73 * symmisc.c (print_objfile_statistics): Print memory used by
psymbol cache obstack.
1996-04-05 01:39:40 +00:00
Stan Shebs 72158e714e * symfile.c (report_transfer_performance): New function.
(generic_load): Call it to report transfer rate.
	* remote-e7000.c (e7000_load): Ditto.
PR 9353
1996-04-04 23:57:02 +00:00
Stan Shebs 761e98aa6e * mpw-make.sed: Change references to config.h to be in objdir,
edit out rules to rebuild config.h.
1996-04-02 00:35:28 +00:00
Fred Fish 251b8ab932 * hppa-tdep.c (hppa_pop_frame): Call clear_proceed_status before
proceeding.
1996-04-01 17:21:32 +00:00