Commit Graph

49 Commits

Author SHA1 Message Date
Klee Dienes d88499536e 2002-02-07 Klee Dienes <klee@apple.com>
* fork-inferior.c (fork_inferior): Add '!' to the list of
        characters that need to be quoted when building a string for the
        shell.  Quote '!' specifically with a backslash, since CSH chokes
        when trying to evaluate "str!str".
2002-02-07 06:11:55 +00:00
Tom Tromey c2a727faa2 * NEWS: Update for --args.
* infcmd.c (construct_inferior_arguments): Moved from ...
	* fork-child.c: ... here.
2001-11-27 03:09:44 +00:00
Tom Tromey 552c04a742 Fix for PR gdb/209, PR gdb/156:
* gdbarch.c, gdbarch.h: Rebuilt.
	* gdbarch.sh: Added `construct_inferior_arguments'.
	* cli/cli-decode.h (cmd_list_element): Added pre_show_hook.
	Typo fix.
	* cli/cli-setshow.c (do_setshow_command): Call the pre_show_hook.
	* infcmd.c (_initialize_infcmd): Set sfunc on `set args' command.
	(inferior_argc, inferior_argv): New globals.
	(notice_args_set): New function.
	(set_inferior_args): Clear inferior_argc and inferior_argv.
	(set_inferior_args_vector): New function.
	(get_inferior_args): Handle inferior argument vector.
	(run_command): Use get_inferior_args().
	(notice_args_read): New function.
	(_initialize_infcmd): Don't call set_inferior_args.
	* command.h: Typo fix.
	(cmd_list_element): Added pre_show_hook.
	* main.c (captured_main): Added --args option.
	(print_gdb_help): Document --args.
	* inferior.h (construct_inferior_arguments): Declare.
	(set_inferior_args_vector): Likewise.
	* fork-child.c (construct_inferior_arguments): New function.
2001-11-22 00:23:13 +00:00
Fred Fish 990f9fe3aa Approved by kev@cygnus.com
ChangeLog entry:

	2001-11-01  Fred Fish  <fnf@redhat.com>

	* coff-solib.c (coff_solib_add): Add new readsyms arg.
	* irix5-nat.c (solib_add): Ditto.
	* osfsolib.c (solib_add): Ditto.
	* pa64solib.c (pa64_solib_add): Ditto.
	* pa64solib.c (add_to_solist): Ditto.
	* pa64solib.c (read_dld_descriptor): Ditto.
	* solib.c (solib_add): Ditto.
	* somsolib.c (som_solib_add): Ditto.
	* win32-nat.c (child_solib_add): Ditto.
	* xcoffsolib.c (solib_add): Ditto.

	* coff-solib.h (coff_solib_add): Add new readsyms arg to prototype.
	* pa64solib.c (add_to_solist): Ditto.
	* pa64solib.c (read_dld_descriptor): Ditto.
	* pa64solib.h (pa64_solib_add): Ditto.
	* solib.h (solib_add): Ditto.
	* somsolib.h (som_solib_add): Ditto.
	* config/i386/tm-cygwin.h (child_solib_add): Ditto.

	* coff-solib.c (coff_solib_add):  If readsyms is zero don't read
	symbols but do any other needed work for shared libs.
	* irix5-nat.c: Ditto.
	* osfsolib.c (solib_add): Ditto.
	* solib.c (solib_add): Ditto.
	* win32-nat.c (child_solib_add): Ditto.
	* xcoffsolib.c (solib_add): Ditto.

	* irix5-nat.c (sharedlibrary_command): Pass 1 as readsyms to
	solib_add to force reading of shared library symbols.
	* osfsolib.c (sharedlibrary_command;): Ditto.
	* pa64solib.c (pa64_solib_sharedlibrary_command): Ditto.
	* solib.c (sharedlibrary_command): Ditto.
	* somsolib.c (som_solib_sharedlibrary_command): Ditto.
	* xcoffsolib.c (sharedlibrary_command): Ditto.

	* coff-solib.c (coff_solib_create_inferior_hook): Call solib_add
	unconditionally with auto_solib_add.
	* irix5-nat.c (solib_create_inferior_hook): Ditto.
	* osfsolib.c (solib_create_inferior_hook): Ditto.
	* solib.c (solib_create_inferior_hook): Ditto.
	* solib-osf.c (osf_solib_create_inferior_hook): Ditto.
	* solib-svr4.c (enable_break): Ditto.
	* solib-sunos.c (sunos_solib_create_inferior_hook): Ditto.

	* corelow.c (solib_add_stub): Add auto_solib_add to args passed
	via SOLIB_ADD.
	* sol-thread.c (sol_thread_attach): Ditto.
	* config/rs6000/nm-rs6000.h (SOLIB_ADD): Ditto.

	* infcmd.c (attach_command): Remove auto_solib_add decl.
	Call SOLIB_ADD directly with auto_solib_add.
	* infrun.c (handle_inferior_event): Ditto.

	* coff-solib.h (SOLIB_ADD): Add readsyms arg.
	* pa64solib.h (SOLIB_ADD): Ditto.
	* solib.h (SOLIB_ADD): Ditto.
	* somsolib.h (SOLIB_ADD): Ditto.
	* config/i386/tm-cygwin.h (SOLIB_ADD): Ditto.

	* fork-child.c (clone_and_follow_inferior): Remove unused
	auto_solib_add decl.

	* pa64solib.c (pa64_solib_add): Call add_to_solist with readsyms.
	(read_dld_descriptor): Ditto.
	(pa64_solib_add): Call read_dld_descriptor with	readsyms.
	(pa64_solib_in_dynamic_linker): Ditto.

	* corelow.c (symfile.h): Need this for auto_solib_add declaration.
	* sol-thread.c (symfile.h): Ditto.

Approved by eliz@is.elta.co.il
doc/ChangeLog entry:

	2001-11-01  Fred Fish  <fnf@redhat.com>

	* gdbint.texinfo (SOLIB_ADD): Document additional new
	"readsyms" arg.
2001-11-01 16:17:08 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
Kevin Buettner 7700434b5c Add comments noting that vfork might be defined to be fork. 2001-04-08 18:26:03 +00:00
Andrew Cagney af8021274c * fork-child.c (clone_and_follow_inferior): Delete #ifdef
HAVE_VFORK.
2001-03-26 16:44:32 +00:00
Andrew Cagney c65ecaf37b Fix -Werror -Wuninitialized warnings. 2001-03-23 22:48:44 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 74c1b268c6 Cleanup autoconfigury of vfork(). 2001-01-31 02:08:23 +00:00
Andrew Cagney 818fa2bf21 Add check for vfork() to configure.in. Cleanup uses. 2000-12-02 15:40:56 +00:00
David Anderson b7d6b182e1 spelling correction: depdendant->dependent 2000-09-01 23:39:11 +00:00
Kevin Buettner 073063d718 Protoize. 2000-08-23 16:37:23 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Andrew Cagney 03f2053f96 Replace ../include/wait.h with gdb_wait.h. 2000-02-09 08:52:47 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +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
Edith Epstein 34adffbd05 Fri Jan 29 16:44:01 1999 Edith Epstein <eepstein@sophia.cygnus.com>
* inferior.h: ran indent

	* fork-child.c: ran indent

	* infrun.c : ran indent
1999-01-29 21:47:09 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Stu Grossman fdfa331511 * Makefile.in, breakpoint.c, corelow.c, fork-child.c, inflow.c,
infrun.c, mac-nat.c, procfs.c, remote.c, sol-thread.c, thread.c,
	win32-nat.c, config/nm-lynx.h:  Rename thread.h to gdbthread.h to
	avoid conflict with Solaris /usr/include/thread.h.
1996-05-09 21:24:20 +00:00
Stu Grossman 8fc2b4170d * fork-child.c (fork_inferior), inferior.h: init_trace_fun now
returns a possibly modified pid.
	* inftarg.c (ptrace_him):  Now returns pid;
	* m3-nat.c (m3_trace_him):  Now returns pid;
	* infcmd.c (run_command):  Minor cleanup.
	* infrun.c (wait_for_inferior):  Add another check for one_stepped
	near where we read the pc to avoid erroneously setting
	random_signal for multi-threaded support.
	* procfs.c:  Add support for Solaris LWPs.  Remove def of
	LOSING_POLL.  Many cleanups...  Several workarounds for Solaris
	lossage.  System call entry and exit are now handled by
	dynamically registered handlers.
	* (syscallname):  Don't barf when handed an unknown syscall
	number.
	* (info_proc_syscalls):  Ditto.
	* sol-thread.c:  New file.  Implements Solaris thread support.
	* symfile.c (symbol_file_add):  Add call to target_new_objfile to
	notify target-dependent code about new symbol tables.
	* (clear_symtab_users):  Call target_new_objfile to notify it of
	the removal of all symbol tables.
	* target.c (push_target):  Make sure that to_close is non-zero
	before calling it.
	* target.h (target_new_objfile):  Provide default.
	* config/alpha/nm-osf2.h:  Define LOSING_POLL because this version
	of OSF can't hack using poll with /proc.
	* config/sparc/nm-sun4sol2.h (target_new_objfile):  Define to be
	sol-thread-new-objfile.
	* config/sparc/sun4sol2.mh:  Add sol-thread.o to NATDEFFILES, and
	add libthread_db.so.1 to NAT_CLIBS.
	* config/sparc/tm-sun4sol2.h:  Define PIDGET, TIDGET, and
	target_pid_to_str.
1996-05-06 21:27:37 +00:00
Stu Grossman 188c635fbb * Makefile.in (INTERNAL_CFLAGS): Add ENABLE_CFLAGS.
* fork-child.c (fork_inferior):  Add call to
	TARGET_CREATE_INFERIOR_HOOK to allow target specific code to get
	control just before the new process executes it's first instruction.
	* remote-mips.c (mips_initialize):  Cleanup a bit.  Don't try to
	receive a packet at first.  This speeds up initialization a lot.
	Use TARGET_MONITOR_PROMPT instead of "<IDT>".
	(common_breakpoint):  Use rresponse instead of rerrflg to inspect
	error code.
	* symfile.c (syms_from_objfile reread_symbols):  Call
	TARGET_SYMFILE_POSTREAD to allow target specific code to get
	control after reading new symbols.
	* target.h:  New macros TARGET_SYMFILE_POSTREAD, and
	TARGET_CREATE_INFERIOR_HOOK.  See above for descriptions.
	* config/mips/{irix5.mh nm-irix5.h}:  Delete nm-irix5.h.  Make
	NAT_FILE point directly at ../nm-sysv4.h.
	* config/mips/{mipsm3.mh nm-m3.h}:  Delete nm-m3.h.  Make
	NAT_FILE point directly at ../nm-m3.h.
	* config/mips/{mipsv4.mh nm-sysv4.h}:  Delete nm-sysv4.h.  Make
	NAT_FILE point directly at ../nm-sysv4.h.
	* config/mips/nm-mips.h:  Improve comment at top of file.
	* config/mips/tm-mips.h (TARGET_MONITOR_PROMPT):  Change
	definition into a proper string.
start-sanitize-gm
	* configure configure.in:  Add support for --enable-gm.
	(mips*-*-magic*):  Change target from magic to idt.
	* eval.c expprint.c expression.h parse.c remote-mips.c utils.c:
	Change GENERAL_MAGIC_HACKS to GENERAL_MAGIC.
	* magic.c magic.h:  Update files from GM.
	* config/mips/magic.mt:  Delete.  No longer necessary now that we
	use --enable mechanism.
	* config/mips/tm-idt.h:  Add GM stuff needed for remote GM box.
	* config/mips/tm-irix5.h:  Add GM stuff needed for native Irix box.
	* config/mips/tm-magic.h:  Move up to config/tm-magic.h.  Move all
	platform specific stuff into tm-irix.h and tm-idt.h.  Add defs for
	TARGET_SYMFILE_POSTREAD and TARGET_CREATE_INFERIOR_HOOK.
end-sanitize-gm
1995-11-04 19:02:42 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

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

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

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

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

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

* command.c, cp-valprint.c, fork-child.c, i386-tdep.c,
i386b-nat.c, inflow.c, main.c, maint.c, objfiles.c, solib.c,
source.c, stack.c, symfile.c, top.c, utils.c: Include strings.h
and/or unistd.h to bring prototypes into scope.
1995-07-31 22:46:03 +00:00
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
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
Peter Schauer ba47c66add * README: Remove note about gcc warnings on alpha, these should be
gone now.
	* c-exp.y, ch-exp.y, core.c, corelow.c, eval.c, fork-child.c,
	m2-exp.y, minsyms.c, nlmread.c, parse.c, putenv.c, regex.c
	remote-utils.c, stabsread.c:  Include <string.h>.
	* regex.c:  Include "defs.h", change re_comp argument to const char *.
	* infptrace.c (fetch_register, store_inferior_registers):  Change
	regaddr to type CORE_ADDR.
	* config/alpha/alpha-nw.mt, config/alpha/alpha-osf1.mt (MT_CFLAGS):
	Remove, no longer necessary now that we use bfd_vma for a CORE_ADDR.
1994-02-08 09:01:03 +00:00
Jim Kingdon 08f74b9271 * fork-child.c, inferior.h (fork_inferior): New argument shell_file.
* procfs.c (procfs_create_inferior), inftarg.c (child_create_inferior),
	m3-nat.c (m3_create_inferior): Pass it.
	* procfs.c: Remove ptrace function.  It was declared in a way which
	conflicted with the prototype in unistd.h on Solaris.
1994-01-22 17:36:41 +00:00
Jim Kingdon 67ac975911 * target.h: Add enum target_waitkind, enum target_signal, and
struct target_waitstatus.  Change status argument to target_wait to
	be struct target_waitstatus * instead of int *.
	* target.h, infrun.c, all targets: Change type of signal arguments
	to resume(), proceed(), and target_resume() from int to enum
	target_signal.
	* All targets (*_wait, *_resume): Change accordingly.
	* infcmd.c (program_info, signal_command), throughout infrun.c,
	* fork-child.c, solib.c, hppa-tdep.c, osfsolib.c: Use this stuff.
	* convex-xdep.c, convex-tdep.c: Add FIXME's (getting the Convex
	signal code stuff right with the new signals would be non-trivial).
	* inferior.h (stop_signal): Make it enum target_signal not int.
	* target.c, target.h (target_signal_to_string, target_signal_to_name,
	target_signal_from_name): New functions.
	* inftarg.c, target.h (target_signal_to_host, target_signal_from_host,
	store_waitstatus): New functions.
	* procfs.c (procfs_notice_signals): Use them.
	* i960-tdep.c (i960_fault_to_signal): New function, to replace
	print_fault.
	* config/i960/tm-i960.h: Don't define PRINT_RANDOM_SIGNAL.
1994-01-04 21:53:53 +00:00
Jim Kingdon 4142aab89d * breakpoint.c (insert_breakpoints, delete_breakpoint): Call
target_terminal_ours_for_output before attempting output.

	* fork-child.c (fork_inferior): Fix comment so that it suggests
	"set shell" rather than having "set env SHELL" affect GDB's
	operation.
1993-11-02 23:55:19 +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 bc28a06cc1 * fork-child.c (fork_inferior): Set inferior_pid before calling
init_trace_fun.  Move the code which gets us through the shell
	to new function startup_inferior.
	* inferior.h: Declare startup_inferior.
	* procfs.c (procfs_init_inferior), inftarg.c (ptrace_him):
	Call startup_inferior.
	* m3-nat.c (m3_trace_him): Call intercept_exec_calls.
	* config/nm-m3.h: Don't define STARTUP_INFERIOR.
	* config/i386/tm-i386m3.h, config/ns32k/tm-ns32k.h,
	config/mips/tm-mipsm3.h: Don't define START_INFERIOR_TRAPS_EXPECTED.
1993-10-27 19:30:27 +00:00
Jim Kingdon 100f92e2de * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
which no longer occur.

	gcc -Wall lint:
	* findvar.c (symbol_read_needs_frame), corelow.c (ignore),
	inflow.c (gdb_has_a_terminal): Make sure to return a value.
	* regex.h: Declare re_set_syntax.
	* printcmd.c: Include valprint.h.
	* infcmd.c, exec.c, maint.c, core.c: Include language.h.
	* maint.c: Include expression.h.
	* infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
	* inftarg.c: Include command.h.
	* coredep.c: Include value.h.
	* c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
	* ch-typeprint.c: Include typeprint.h.
	* ch-valprint.c: Include c-lang.h.
	* nlmread.c: Include buildsym.h.
	* environ.c: Include gdbcore.h.  Only include defs.h once.
	(set_in_environ): Cast const char * to char * when passing to
	set_gnutarget.
	Remove unused variables:
	* printcmd.c (printf_command): args_to_vprintf.
	* coffread.c (coff_symfile_init): strsection.
	Move variables to within the #ifdefs where they are used:
	* symtab.c (gdb_mangle_name): opname.
	* inftarg.c (child_attach): pid and exec_file.
	* inftarg.c (child_detach): siggnal.
	* objfiles.c (allocate_objfile): mapto, md, and fd.
	* objfiles.c (free_objfile): mmfd.
	* infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
	* infrun.c (wait_for_inferior): Remove unused same_pid label.
	* inferior.h: Declare set_sigint_trap and clear_sigint_trap.
	* parser-defs.h: Declare write_exp_elt_block.
	* stabsread.h: Declare elfstab_offset_sections and
	coffstab_build_psymtabs.
1993-10-21 20:41:50 +00:00
Jim Kingdon 749e538bc8 * infrun.c: Add comment about signals.
* fork-child.c (fork_inferior): Remove CREATE_INFERIOR_HOOK again.
	Stu reinstated it (accidently I assume).
1993-10-17 01:56:01 +00:00
Stu Grossman de43d7d005 * breakpoint.c (breakpoint_thread_match break_command_1):
Thread-specific breakpoint support.
* breakpoint.h (struct breakpoint):  Add thread id field.
* fork-child.c (fork_inferior):  Move call to init_thread_list()
back a bit so that init_trace_fun can do thread functions.
* hppa-tdep.c (restore_pc_queue):  Add pid to call to target_wait.
* hppab-nat.c (child_resume):  Handle default pid.
* hppah-nat.c (child_resume):  Handle default pid.
* i386lynx-nat.c (child_wait):  New arg pid.
* inflow.c (kill_command):  Reset thread list.
* infptrace.c (child_resume):  Handle default pid.
* infrun.c:  Thread-specific breakpoint support.
* inftarg.c (child_wait):  Add pid arg.
* osfsolib.c (solib_create_inferior_hook):  Add pid to call to
target_resume.
* procfs.c:  Multi-thread support.
* remote-bug.c (bug_wait):  Add pid arg.
* remote-hms.c (hms_wait):  Add pid arg.
* remote-mips.c (mips_wait):  Add pid arg.
* remote-mon.c (monitor_wait):  Add pid arg.
* remote-nindy.c (nindy_wait):  Add pid arg.
* remote-sim.c (gdbsim_wait):  Add pid arg.
* remote-udi.c (udi_wait):  Add pid arg.
* remote-vx.c (vx_wait):  Add pid arg.
* remote-z8k.c (sim_wait):  Add pid arg.
* remote.c (remote_wait):  Add pid arg.
* solib.c (solib_create_inferior_hook):  Add pid to call to
target_resume.
* target.h (struct target_ops):  Add pid arg to to_wait and
to_notice_signals.
* thread.c (valid_thread_id):  New func to validate thread #s.
* (pid_to_thread_id):  New func to do the obvious.
* thread.h:  Prototypes for above.

* coff-solib.c (coff_solib_add):  Use nameoffset field to locate
filename.
1993-10-16 06:42:02 +00:00
Jim Kingdon 5d76c8e662 * fork-child.c (fork_inferior), remote-eb.c (eb_create_inferior),
remote-mon.c (monitor_create_inferior), remote-nindy.c
	(nindy_create_inferior), remote-st.c (st2000_create_inferior),
	remote-vx.c (vx_create_inferior): Remove CREATE_INFERIOR_HOOK; it
	is replaced by init_trace_fun.
	* config/convex/xm-convex.h, convex-xdep.c: Add comments explaining
	how to do without CREATE_INFERIOR_HOOK for whoever fixes the Convex
	port.

	* Makefile.in: Add Mach files to ALLDEPFILES, etc.
	* m3-nat.c: Clean up more hair--message(), cprocs.
	* configure.in: Recognize Mach targets and hosts.
	* config/ns32k/tm-umax.h: Add some #ifndef's so tm-ns32km3.h can
	include this file.
	* Mach headers in config/*/tm-*.h: Fix includes to match correct
	locations of files.
1993-10-15 04:26:06 +00:00
Jim Kingdon c18b613acd * inflow.c: Remove unused includes of sys/param.h and sys/types.h.
* inflow.c, ser-unix.c, ser-go32.c, ser-tcp.c, serial.h,
	terminal.h, fork-child.c, main.c, utils.c: Move all the process
	group stuff back to inflow.c and terminal.h; that's a better place
	for it and fixes problems with trying to get/set the process group
	of a tty we're doing remote debugging on.
	* terminal.h: Skip the redefines and includes if HAVE_TERMIOS.
1993-10-09 00:00:56 +00:00
Jim Kingdon 01dfd41513 * fork-child.c (fork_inferior): Don't call target_terminal_init
and target_terminal_inferior until we are sure that the inferior
	has called gdb_setpgid.  This fixes PR 2900 (Schauer tracked it
	down and was able to reliably reproduce it by putting a sleep()
	before the gdb_setpgid()).
1993-09-30 20:41:17 +00:00
Stu Grossman 25286543da Sun Aug 1 22:58:18 1993 Stu Grossman (grossman at cygnus.com)
* Makefile.in (CLIBS):  Reorder to make Lynx ld happy.
	* (HFILES):  New file thread.h.
	* (OBS):  New file thread.c.
	* configure.in:  Host config for Lynx/386.
	* fork-child.c (fork_inferior):  Call init_thread_list().
	* infrun.c (resume):  Add pid to invocation of target_resume().
	* (wait_for_inferior): Pay attention to pid from target_wait().
	Multi-threading code now uses this to determine what to do.
	* inftarg.c (child_wait):  Conditionalize based on CHILD_WAIT macro.
	Use target_pid_to_str() macro throughout when printing pid.
	* inferior.h (child_resume):  Add pid to prototype.
	* hppab-nat.c hppah-nat.c infptrace.c (child_resume):  Pass in pid as
	argument, instead of using inferior_pid.
	* procfs.c (procfs_resume):  Pass in pid as argument.  Ignored for
	now.  Use target_pid_to_str() macro throughout for printing process id.
	* remote-adapt.c (adapt_resume):  Pass in pid as argument.
	* remote-eb.c (eb_resume):  Pass in pid as argument.
	* remote-es.c (es1800_resume):  Pass in pid as argument.
	* remote-hms.c (hms_resume):  Pass in pid as argument.
	* remote-mips.c (mips_resume):  Pass in pid as argument.
	* remote-mm.c (mm_resume):  Pass in pid as argument.
	* remote-monitor.c (monitor_resume):  Pass in pid as argument.
	* remote-nindy.c (nindy_resume):  Pass in pid as argument.
	* remote-sa.sparc.c (remote_resume):  Pass in pid as argument.
	* remote-sim.c (rem_resume):  Pass in pid as argument.
	* remote-sp64sim.c (simif_resume):  Pass in pid as argument.
	* remote-st.c (st2000_resume):  Pass in pid as argument.
	* remote-udi.c (udi_resume):  Pass in pid as argument.
	* remote-vx.c (vx_resume):  Pass in pid as argument.
	* remote-z8k.c (rem_resume):  Pass in pid as argument.
	* remote.c (remote_resume):  Pass in pid as argument.
	* solib.c (solid_create_inferior_hook):  Pass inferior_pid to
	target_resume().
	* target.c (normal_pid_to_str):  New routine to print out process
	ID normally.
	* target.h (struct target_ops):  Add pid to prototype at
	to_resume().  (target_resume):  Add pid argument.
	* (target_pid_to_str):  Default definition for normal type pids.
	* thread.c, thread.c:  New modules for multi thread/process control.
1993-08-02 06:25:36 +00:00
Jim Kingdon 38bbfd3795 * fork-child.c (fork_inferior): Only quote exec file if needed.
* mipsread.c (parse_symbol): Remove 21 Jul 93 change with
	stTypedef inside an stBlock.
1993-07-27 17:43:09 +00:00
Jim Kingdon c2e247c4ff * inftarg.c: Remove unused include of terminal.h.
* signals.h: Don't undefine signals anymore.
	* main.c: Use job_control from serial.h.
	* fork-child.c (fork_inferior): Use gdb_setpgid.
	* serial.h, ser-unix.c, ser-go32.c: Provide gdb_setpgid.
	* utils.c (quit): Use current_target->to_terminal_ours to figure
	out whether we care about lack of job control, rather than __GO32__.
	* utils.c: Include serial.h not terminal.h
	(quit): Use job_control not TIOCGPGRP.
	* terminal.h: Don't undefine TIOCGPGRP.
	* serial.h, ser-unix.c, ser-go32.c, ser-tcp.c: Add SERIAL_FLUSH_OUTPUT.
	* utils.c (quit): Use it.
	* serial.h: Add SERIAL_UN_FDOPEN.
	* utils.c (quit): Use it.
	* ser-unix.c: Add process group to ttystate.
	[HAVE_SGTTY]: Add tchars, ltchars, and lmode to ttystate.
	* inflow.c: Include serial.h not terminal.h.
	Use serial.h stuff to replace most of the maze of #ifdef's.
	* inflow.c, main.c, inferior.h: make gdb_has_a_terminal a function.
	* serial.h: Document SERIAL_SET_TTY_STATE as being immediate.
	* ser-unix.c: Use TIOCSETN not TIOCSETP so it is true.
	* serial.h, ser-unix.c, ser-go32.c, ser-tcp.c:
	Add SERIAL_PRINT_TTY_STATE, SERIAL_NOFLUSH_SET_TTY_STATE, and
	SERIAL_SET_PROCESS_GROUP.
	* inflow.c: Use them.
	* config/xm-svr4.h, config/rs6000/xm-rs6000.h, config/sparc/sun4os4.h:
	Define HAVE_TERMIOS.
	* Various: Remove all use of TIOC*_BROKEN.
1993-06-30 22:20:53 +00:00
Jim Kingdon 3768398df8 * fork-child.c (fork_inferior): Quote exec_file so it can contain
funky characters.
1993-06-22 04:27:00 +00:00
John Gilmore 3fbdd5366e Make the /proc support a target-struct in its own right.
* inferior.h (proc_wait, inferior_proc_init, proc_set_exec_trap):
No longer global functions.
(fork_inferior):  New global function from fork-child.c.
* inftarg.c (child_wait):  Remove USE_PROC_FS conditional.
(ptrace_me, ptrace_him):  New stub functions for fork_inferior().
(child_create_inferior):  Moved to fork-child.c as fork_inferior.
(child_create_inferior):  New tiny function that calls fork_inferior.
* fork-child.c:  New file, containing fork_inferior, which is
built from slight mods to inftarg.c's child_create_inferior.

* procfs.c (procfs_ops):  Add target vector.
(attach):  Rename as static do_attach.
(procfs_create_inferior):  New tiny function that calls fork_inferior.
(child_xfer_memory):  Rename to static procfs_xfer_memory.
(store_inferior_registers):  Rename to static procfs_store_registers.
(inferior_proc_init):  Rename to static procfs_init_inferior.
(procfs_attach, procfs_detach, procfs_prepare_to_store,
procfs_files_info, procfs_open, procfs_mourn_inferior,
procfs_can_run):  Slightly mangled copies of the corresponding
child_XXX routines from inftarg.c.
(proc_wait):  Renamed to static procfs_wait.
(child_resume):  Rename to static procfs_resume.
(fetch_inferior_registers):  Rename to static procfs_fetch_registers.
(initialize_proc_fs):  Rename to initialize_procfs.  Set up
procfs_ops, too.
* xm-irix4.h, xm-sysv4.h (CREATE_INFERIOR_HOOK):  No longer needed.
1992-09-26 09:06:30 +00:00