Commit Graph

2340 Commits

Author SHA1 Message Date
Ian Lance Taylor 6187dfac46 * mdebugread.c (parse_symbol): Don't call ecoff_swap_tir_in or
ecoff_swap_rndx_in directly; use the debug_swap pointer instead.
	(upgrade_type, handle_psymbol_enumerators): Likewise.
	(has_opaque_xref, cross_ref): Likewise.
	(elfmdebug_build_psymtabs): Call swap->read_debug_info to read
	debugging information, rather than doing it here.
	* mipsread.c (mipscoff_symfile_read): Call read_debug_info entry
	point in ecoff_debug_swap backend structure, rather than calling
	ecoff_slurp_symbolic_info directly.
1994-06-20 18:27:29 +00:00
Jim Kingdon fb71d42292 * breakpoint.c: Include annotate.h. Call annotate_field rather
than printing annotation directly.
1994-06-18 04:14:26 +00:00
Jim Kingdon afd3e3b15a * main.c: Include string.h. 1994-06-18 04:02:02 +00:00
Stan Shebs 9f8219f130 * fork-child.c (startup_inferior) [STARTUP_INFERIOR]: If defined,
call it instead of doing normal loop.
	* infcmd.c (attach_command): Don't call wait_for_inferior if
	running	Mach 3.
	* infrun.c (proceed) [PREPARE_TO_PROCEED]: If defined, call
	hook that can decide whether to step over the next breakpoint.
	* utils.c (wrap_here): Abort if wrap_buffer not allocated.
	(request_quit) [REQUEST_QUIT]: If defined, call it instead of
	doing normal quit.

	* Makefile.in (stop-gdb): New target.
	* stop-gdb.c: New file, utility to get attention of waiting GDBs
	in Mach 3.
1994-06-16 23:04:55 +00:00
Stan Shebs 6ec7e4d36a * configure.in: Improve sorting/formatting of hosts and targets.
(i[34]86-*-mach3*, i[34]86-*-osf1mk*, mips-*-mach3*,
	m88*-*-mach3*, ns32k-*-mach3*): Recognize.
	* Makefile.in (gdb-stop): New target.
	* gdb-stop.c: New file, utility to gets attention of waiting GDBs
	in Mach 3.
1994-06-16 22:02:24 +00:00
Stan Shebs 8c16485eb0 Keep v9 bits now. 1994-06-16 21:18:05 +00:00
Thomas Lord f36b58b10c Init current_directory. 1994-06-15 08:04:44 +00:00
Thomas Lord e91c181625 New features. Less bugs. 1994-06-15 00:28:50 +00:00
Kung Hsu f2d9c05802 Modified Files:
breakpoint.c ChangeLog

        * breakpoint.c: annotate changes lost at merge, put back in.
1994-06-14 23:22:44 +00:00
Stan Shebs e884f41802 Mon Jun 13 17:28:50 1994 Stan Shebs (shebs@andros.cygnus.com)
* config/i386/i386sco.mh, i386sco4.mh (XDEPFILES): Remove
	i387-tdep.o.
1994-06-14 00:47:06 +00:00
Kung Hsu 2b14c195f1 Modified Files:
.Sanitize ChangeLog

        * .Sanitize: change name from sparclite-*.c to sparcl-*.c.
1994-06-13 19:31:01 +00:00
Peter Schauer 33c66e44ed * config/m68k/dpx2.mh (NATDEPFILES): Remove duplicate inclusion
of inftarg.o.
	* config/m68k/tm-dpx2.h (CANNOT_STORE_REGISTER):  Define to inhibit
	writing of floating registers, the dpx2 kernel disallows it.
	* irix5-nat.c (LM_ADDR):  The loaded address of the shared library
	is contained in o_praw.
	* irix5-nat.c (solib_map_sections):  Adjust sections by the
	difference between the loaded address and the prelinked address.
	* irix5-nat.c (solib_address):  Use LM_ADDR for the loaded start
	address.
	* mdebugread.c (parse_symbol):  Do not relocate stEnd/scText
	symbols, their value is absolute.
	* mdebugread.c (parse_partial_symbols):  Handle Irix 5.2 shared
	libraries fh->adr fields of zero. Relocate minimal symbol values
	upon readin. Relocate non-stabs symbols upon readin.
	* mdebugread.c (psymtab_to_symtab_1):  Use pst->textlow for the
	start address of the outermost block.
	* mdebugread.c (parse_lines, parse_procedure):  Pass in pst
	instead of section_offsets and use relocated pst->textlow for
	line number and procedure address relocations.

	From gmo@MicroUnity.com (Guillermo A. Loyola):
	* mdebugread.c (parse_symbol, parse_partial_symbols, cross_ref):
	Handle SGI Irix5 stIndirect symbol type.
1994-06-12 11:10:13 +00:00
Kung Hsu 110548816a Modified Files:
breakpoint.c ChangeLog

        * breakpoint.c: fix a syntax error native cc does not like.
1994-06-11 01:09:25 +00:00
Kung Hsu 1782eb41a7 Modified Files:
Makefile.in ChangeLog

        * Makefile.in: change sparclite-tdep.c to sparcl-tdep.c.
1994-06-10 23:55:12 +00:00
Kung Hsu 2c3fb46af9 Modified Files:
ChangeLog

        * sparclite/Makefile.in: fix INCLUDE_CFLAGS to have {srcdir}/../config.
1994-06-10 21:58:48 +00:00
Jeff Law e9a3cde889 * hppa-tdep.c (target_read_pc, target_write_pc): Accept (and
ignore) a PID argument.
	(hppa_pop_frame): Pass a PID to target_write_pc.
	* config/pa/tm-hppa.h (TARGET_READ_PC, TARGET_WRITE_PC): Accept
	and pass through a PID argument.
	(target_read_pc, target_write_pc): Update prototypes.
1994-06-10 16:43:52 +00:00
Kung Hsu 2c012f9efc Modified Files:
ChangeLog

        * remote-os9k.c (rombuf_command): fix a bug accepting rombug
        output.
        * stabsread.c (read_struct_fields): os9k nested structure does not
        have terminating ';', instead it just get to ',' and bit position
        and length.
1994-06-09 23:22:56 +00:00
Stu Grossman a4b4f52058 * nlmread.c (nlm_symtab_read): Clean up a bit.
* (nlm_symfile_read):  Record bounds of main() so that backtrace
	command will know where to stop.
	* objfiles.c (objfile_relocate):  Relocate entry point/func info
	for backtrace as well.
	* objfiles.h:  Define values for invalid PCs for entry point info.
	* symfile.c (init_entry_point_info):  Initialize invalid values
	with aforementioned macros.
	* config/alpha/tm-alphanw.h:  Turn on FRAME_CHAIN_VALID_ALTERNATE
	to cause backtrace to stop when it gets back to main().
	* config/i386/tm-i386nw.h:  Ditto.
1994-06-09 06:30:38 +00:00
Per Bothner e10cfcaa37 Fix value_print, which used to be ostensibly langauge-indepentdent,
but would print pointers and arrays in C syntax.  Instead, call
	a language-specific function.  See ChangeLog for details.
1994-06-05 01:43:40 +00:00
Jim Kingdon 172559ec33 * main.c: Move entire file except for #ifndef MAIN_OVERRIDE code
to new file top.c.  Make things extern instead of static and
	similar rearrangements to deal with this.
	* top.h: New file.
	* utils.c: Move fputs_unfiltered to main.c.  Remove
	FPUTS_UNFILTERED_OVERRIDE ifndef.
	* Makefile.in: Change so that gdb uses main.c, utils.c, and top.c,
	and libgdb uses utils.c and top.c.
1994-06-03 17:25:08 +00:00
Jeff Law 36af5ec640 * hppa-tdep.c (skip_trampoline_code): Fix typo. 1994-06-03 05:21:30 +00:00
Per Bothner 35f8a58898 * ch-valprint.c (chill_val_print_array_elements): New function.
A Chill version of val_print_array_elements, it prints the
	array index labels, in additions ot the array element values.
	(chill_val_print):  Use the new function.
1994-06-03 01:19:21 +00:00
Stu Grossman 2e6784a89f * configure.in: Add nlm subdir to configdirs for alpha-*-netware
target.
	* defs.h (enum language):  Add language_asm.
	* findvar.c (read_register_bytes read_register_gen
	write_register_bytes read_register read_register_pid
	write_register write_register_pid supply_register):  Move multi-
	thread handling down into these routines.  Create XXX_pid routines
	that allow register references to specify the pid.
	* findvar.c infcmd.c (read_pc read_pc_pid write_pc write_pc_pid
	read_sp write_sp read_fp write_fp):  Move these routines from
	infcmd to findvar to centralize the whole mess.
	* i386-nlmstub.c:  Portability fixes.
	* infptrace.c (child_resume):  Conditionalize to allow other natives
	to override it.  Remove PIDGET gubbish, it's no longer necessary.
	* infrun.c (wait_for_inferior):  Put registers_changed() before
	target_wait() to speed up remote debugging.
	* Replace code that reads registers from other threads with much
	nicer looking new function calls (see changes to findvar.c).
	* Don't skip prologues if debugging assembly source.
	* lynx-nat.c (child_resume):  Lynx now needs it's own version of
	child_resume to handle multi-thread debugging properly.
	* remote.c:  Add O response to get console output from target.
	* (readchar): Add timeout parameter.  Handle SERIAL_EOF and
	SERIAL_ERROR here to simplify callers.
	* Change static var timeout to remote_timeout.
	* (fromhex):  Remove unnecessary return -1 at end of routine.
	* (remote_wait):  Turn this into a big switch statement.  Add
	support for O response.
	* (putpkt):  Remove unnecessary handling of SERIAL_EOF/ERROR.
	* (getpkt):  Split getpkt into two parts.  read_frame deals with
	all formatting issues, run-length encoding, and framing.  getpkt
	now handles error recovery, and frame detection.
	* ser-tcp.c (tcp_readchar):  Handle EINTR from read().
	* ser-unix.c (hardwire_raw):  Set CLOCAL so that we ignore modem
	control.  (hardwire_readchar):  Handle EINTR from read().
	* symfile.c (deduce_language_from_filename):  Add support for .s
	files.
	* config/nm-lynx.h:  Define CHILD_WAIT so that lynx-nat.c can
	override infptrace's child_wait.
	* config/rs6000/rs6000lynx.mh:  Use xm-rs6000ly.h & nm-rs6000ly.h
	instead of XXXlynx.h.
	* config/rs6000/rs6000lynx.mt:  Use tm-rs6000ly.h instead of
	tm-rs6000lynx.h.
	* nlm/gdbserve.c:  Portability fixes.
1994-06-02 16:58:48 +00:00
Jim Kingdon d3507982fb * inftarg.c (child_wait): Call proc_wait, not wait.
(child_mourn_inferior): Call proc_remove_foreign.
	* main.c (gdb_init): Call init_proc.
	* main.c: Provide dummy versions of init_proc, proc_wait, and
	proc_remove_foreign for the gdb case (the libgdb case provides its
	own versions of these functions).
	* Makefile.in (libgdb-files): Add libproc.a.
1994-06-01 19:28:24 +00:00
Stan Shebs 6d40175db0 Wed Jun 1 11:08:52 1994 Stan Shebs (shebs@andros.cygnus.com)
Hardware watchpoints for Linux, from Rick Sladkey
	(jrs@world.std.com).
	* infrun.c (wait_for_inferior) [HAVE_CONTINUABLE_WATCHPOINT]: Add
	new hardware breakpoint recovery method.
	* i386v-nat.c (i386_insert_watchpoint,
	i386_insert_nonaligned_watchpoint, i386_remove_watchpoint,
	i386_stopped_by_watchpoint) [TARGET_CAN_USE_HARWARE_WATCHPOINT]:
	New functions to support the 386 hardware debugging registers.
	* config/i386/nm-linux.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT,
	HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT,
	target_insert_watchpoint, target_remove_watchpoint): Define these
	macros to use the hardware debugging functions in i386v-nat.c.
1994-06-01 18:26:16 +00:00
Jim Kingdon 667fb5c3a7 * Makefile.in: Replace libgdb.a with libgdb-files. Make "all"
build it.
1994-05-26 23:46:00 +00:00
Jim Kingdon 429f1c9f46 * target.c, target.h: New variables target_activity_function and
target_activity_fd.
	* inflow.c, inferior.h: New functions set_sigio_trap and
	clear_sigio_trap.
	* inftarg.c (child_wait), procfs.c (wait_fd): Call them.
1994-05-20 03:43:39 +00:00
David Edelsohn 47424e7931 * remote-sim.h (sim_verbose): Delete.
Document callbacks needed.
	(sim_*): Change result to void where there isn't one.
	(sim_open): Clarify argument and error response.
	(sim_close): Declare.
	(sim_load): Change bfd_handle argument to file name.  Clarify result.
	(sim_create_inferior): Renamed from sim_set_args.
	(sim_set_pc): Delete.
	(sim_info): Delete printf_fn argument.
	* remote-sim.c (gdbsim_kill): Add comment describing purpose.
	(gdbsim_load): Try sim_load first.
	(gdbsim_create_inferior): Call sim_create_inferior.
	(gdbsim_open): Handle args == NULL.  Update call to sim_open.
	(gdbsim_close): Call sim_close.
	(gdbsim_files_info): Update call to sim_info.
	(gdbsim_ops): Realign comments.
1994-05-18 20:42:06 +00:00
David Edelsohn bc67bf9606 (decode_format): Allow TARGET_PTR_BIT to be non-constant. 1994-05-18 20:04:23 +00:00
Stan Shebs 298f0428b4 Tue May 17 16:45:20 1994 Stan Shebs (shebs@andros.cygnus.com)
* xcoffread.c (read_xcoff_symtab): For C_FILE symbols, only use
	the auxent if the symbol's name is ".file".  From David Edelsohn
	<c1dje@watson.ibm.com>.
1994-05-18 03:13:09 +00:00
Jim Kingdon 20b3c1aae5 * breakpoint.c (breakpoint_1): Fix typo.
* annotate.c (annotate_field_end): Fix typo.

	* Makefile.in: Move annotate.o from COMMON_OBS to OBS.

	* Makefile.in (TSSTART): Remove; no longer used.
1994-05-18 00:59:15 +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
Jeff Law f55179cbcd * hppa-tdep.c (read_unwind_info): Make sure elf_unwind_size and
elf_unwind_entries are always initialized.
1994-05-12 18:02:27 +00:00
Jeff Law 88b91d4a1b * hppa-tdep.c (skip_trampoline_code): Handle argument relocation
stubs which return directly to the caller rather than to the stub
        itself.
1994-05-12 16:50:43 +00:00
Stan Shebs 8db1a92291 Wed May 11 20:11:51 1994 Stan Shebs (shebs@andros.cygnus.com)
* c-exp.y (yyerror): Display a more informative error message.
	* ch-exp.y (yyerror): Ditto, don't use global yychar.
	* m2-exp.y (yyerror): Ditto.
1994-05-12 03:21:48 +00:00
Stan Shebs 91ecc8efa9 Trivial change to prepare for a real one 1994-05-10 19:01:48 +00:00
Ian Lance Taylor 0286d386b2 * maint.c (print_section_table): Rename SEC_SHARED_LIBRARY to
SEC_COFF_SHARED_LIBRARY to match corresponding change in bfd.
1994-05-10 18:43:51 +00:00
Steve Chamberlain 5ff7b32867 * config/i386/go32.mh: Define CC. 1994-05-06 20:28:55 +00:00
Stan Shebs b292fca800 Fri May 6 11:56:54 1994 Stan Shebs (shebs@andros.cygnus.com)
* gdbserver/Makefile.in: Remove irrelevant definitions and
	comments inherited from the gdb Makefile.
	(BFD_DIR, BFD, BFD_SRC, BFD_CFLAGS): Add from gdb Makefile.
	(VERSION): Update to 4.12.3.
	(gdbserver): Remove any existing executable first.
	(distclean, realclean): Remove nm.h.
	* gdbserver/low-lynx.c: Add Sparc Lynx support.
	* gdbserver/low-sparc.c, gdbserver/low-sun3.c (sys/wait.h):
	Don't use absolute pathname.
1994-05-06 19:52:23 +00:00
Jim Kingdon ee5fca1f12 * infrun.c (proceed, normal_stop, wait_for_inferior), breakpoint.c
(print_it_normal): Add annotations for the inferior starting and
	stopping, and for all the various messages related to how it
	stopped.

	* printcmd.c (do_one_display): Annotate.
	* stack.c (print_frame_info): Annotate printing of stack frames.
1994-05-05 04:35:09 +00:00
Stu Grossman 731dca9461 * remote.c (get_offsets): Handle case where stub doesn't support
qOffsets message.
1994-05-05 01:18:26 +00:00
Per Bothner 36a2283dad Add partial support for g++ code compiled with -fvtable-thunks.
* c-valprint.c (c_val_print):  Add vtblprint support
	when using thunks.
	* cp-valprint.c (cp_is_vtbl_member):  A vtable can be an array of
	pointers (if using thunks) as well as array of structs (otherwise).
	* cp-valprint.c (vtbl_ptr_name_old, vtbl_ptr_name):  Move to global
	level, and make the latter non-static (so define_symbol can use it).
	* stabsread.c (define_symbol):  If the type being defined is a
	pointer type named "__vtbl_ptr_type", set the TYPE_NAME to that name.
	* symtab.h (VTBL_PREFIX_P):  Allow "_VT" as well as "_vt".
	* values.c (value_virtual_fn_field):  Handle thunks.
	* values.c (value_headof):  Minor efficiency hack.
	* values.c (value_headof):   Incomplete thunk support.  FIXME.
1994-05-05 00:19:33 +00:00
Jim Kingdon d24c05991f * valprint.c (print_longest): Clarify comment about use_local.
* printcmd.c, defs.h (print_address_numeric), callers in
	symmisc.c, symfile.c, stack.c, source.c, remote.c, infcmd.c,
	cp-valprint.c, core.c, ch-valprint.c, c-valprint.c, breakpoint.c,
	exec.c: New argument use_local.
	* source.c (identify_source_line): Use filtered output.  Use
	print_address_numeric.
1994-05-04 15:24:41 +00:00
Jim Kingdon e16b9023f0 * core.c (memory_error), symtab.c (cplusplus_hint, decode_line_1),
language.c (type_error, range_error): Use filtered output.
	* utils.c (error_begin): Update comment to tell people to use
	filtered output.
1994-05-04 14:20:32 +00:00
Jim Kingdon 997c6a1d84 * Makefile.in (HFILES_WITH_SRCDIR): List bfd.h.
(HFILES_NO_SRCDIR): List gdbcore.h not gdbcore_h, so as not to get
	bfd.h.
1994-05-04 14:04:34 +00:00
Jim Kingdon 3f5e2fb58f * procfs.c (procfs_wait): Reinstate code which deduces the signal
from the fault, #ifndef FAULTED_USE_SIGINFO.
	* config/sparc/tm-sun4sol2.h: Define FAULTED_USE_SIGINFO.
1994-05-03 15:13:26 +00:00
Jim Kingdon 47ebe8fd88 * breakpoint.c (breakpoint_1): Annotate each field of the headers.
Explicitly annotate each record.
1994-04-30 01:30:28 +00:00