Commit Graph

87 Commits

Author SHA1 Message Date
Roland McGrath
c74c0b732b 2004-09-01 Roland McGrath <roland@redhat.com>
* process.c (internal_wait): Take second arg giving index of flags
	argument.
	* defs.h: Update prototype.
	* syscall.c (internal_syscall): Update caller.
	Also use internal_wait for SYS_waitid.
	* process.c (sys_waitid): Define for [LINUX] as well.
	Don't tweak TCB_SUSPENDED--internal_wait does that.
	(waitid_types): Conditionalize use of nonstandard P_* macros.
2004-09-01 19:39:46 +00:00
Roland McGrath
6d1a65c759 2004-07-07 David S. Miller <davem@nuts.davemloft.net>
* linux/sparc/syscallent.h: Sync with reality.
	* linux/sparc/syscall.h (sys_sendfile64, sys_futex, sys_gettid,
	sys_sched_setaffinity, sys_sched_getaffinity, sys_setxattr,
	sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr,
	sys_fgetxattr, sys_listxattr, sys_llistxattr, sys_flistxattr,
	sys_removexattr, sys_lremovexattr, sys_fremovexattr,
	sys_remap_file_pages, sys_readahead, sys_tgkill, sys_statfs64,
	sys_fstatfs64, sys_clock_settime, sys_clock_gettime,
	sys_clock_getres, sys_clock_nanosleep, sys_timer_create,
	sys_timer_settime, sys_timer_gettime): New declarations.
	* linux/sparc64/dummy2.h, linux/sparc64/syscallent2.h,
	linux/sparc64/syscall.h, linux/sparc64/errnoent.h,
	linux/sparc64/errnoent1.h, linux/sparc64/errnoent2.h,
	linux/sparc64/ioctlent.h, linux/sparc64/ioctlent1.h,
	linux/sparc64/ioctlent2.h, linux/sparc64/signalent.h,
	linux/sparc64/signalent.h, linux/sparc64/signalent.h,
	linux/sparc64/signalent1.h, linux/sparc64/signalent2.h,
	linux/sparc64/syscall1.h, linux/sparc64/syscallent.h,
	linux/sparc64/syscallent1.h: New files.
	* defs.h (LINUXSPARC): Define also when SPARC64.
	(LINUX && SPARC64): Set SUPPORTED_PERSONALITIES to 3.
	Ignore SIGTRAP after execve by defining TCB_WAITEXECVE.
	Define possibly missing __NR_exit_group.  Declare getrval2.
	* configure.ac (sparc64): New architecture case.
	* config.h.in (SPARC64): New define.
	* file.c (stat_sparc64): New structure.
	(printstat_sparc64): New output routine for that.
	(printstat): Call it, if personality is 2.
	(printstat64): Likewise.
	* util.c: Conditionalize ptrace defines on LINUXSPARC
	not LINUX && SPARC.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(_hack_syscall5): Correct trap number when SPARC64.
	(PTRACE_WRITE{TEXT,DATA}): Add SPARC64 to ifdef guard.
	(getpc): Handle SPARC64 && LINUX.
	(printcall): Likewise.
	(arg fetching/setting): Use same code for SPARC64 LINUX
	as for SPARC.
	(setbpt): Handle SPARC64 && LINUX.
	(clearbpt): Likewise.
	* signal.c: Conditionalize ptrace defines on SPARC and
	SPARC64.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(m_siginfo): Use same definition on SPARC64 as SPARC.
	(sys_sigreturn): Handle LINUX && SPARC64.
	* syscall.c: Conditionalize ptrace defines on SPARC and
	SPARC64.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(getscno): Use same static state on SPARC64 as SPARC,
	and add SPARC64 handling.
	(get_error): Handle LINUX && SPARC64.
	(force_result): Likewise.
	(syscall_enter): Likewise.
	(trace_syscall): Handle sys_socketcall and sys_ipc on SPARC64
	just like SPARC.
	(getrval2): Handle LINUX && SPARC64.
	* process.c: Conditionalize ptrace defines on SPARC and
	SPARC64.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(change_syscall): Handle LINUX && SPARC64.
	(struct_user_offsets): Ifdef out those which do not exist
	on SPARC64.
	* net.c (sys_pipe): Handle LINUX && SPARC64.
	* ioctl.c: Fix initializer typo for nioctlents2, was
	nioctlents1 by accident.
2004-07-12 07:44:08 +00:00
Roland McGrath
fdb097f637 2004-06-28 Andreas Schwab <schwab@suse.de>
* process.c (internal_exec): Move TCB_WAITEXECVE handling here.
	(sys_execve): Remove it here.
2004-07-12 07:38:55 +00:00
Roland McGrath
7b54a7ae61 2004-06-03 Roland McGrath <roland@redhat.com>
* strace.c (main) [LINUX]: Expand TCBTAB as necessary for threads
	attached.  Attach threads only under -f.  Set TCB_FOLLOWFORK in them.
	(expand_tcbtab): New function, broken out of ...
	* process.c (fork_tcb): ... here, call that.
	* defs.h: Declare expand_tcbtab.
2004-06-04 01:50:45 +00:00
Roland McGrath
f8cc83c9ef 2004-04-19 Roland McGrath <roland@redhat.com>
* process.c (printstatus): Add a space before | in output.
2004-06-04 01:24:07 +00:00
Roland McGrath
79fbda596a 2004-04-13 Roland McGrath <roland@redhat.com>
* process.c (printstatus): Mask out bits presented symbolically, and
	print "| 0xnnn" if the remaining bits are not all zero.
	Fixes Debian bug #240062.
	* process.c (print_affinitylist): Rewritten to handle indirect values.
	(sys_sched_setaffinity, sys_sched_getaffinity): Update callers.
	From Ulrich Drepper <drepper@redhat.com>.
	Fixes RH#118685.
2004-04-14 02:45:55 +00:00
Roland McGrath
7decfb2298 2004-03-01 Roland McGrath <roland@redhat.com>
* configure.ac: Check for `struct user_desc' in <asm/ldt.h>.
	* process.c [HAVE_STRUCT_USER_DESC]: Use struct user_desc in place of
	struct modify_ldt_ldt_s.
	* mem.c [HAVE_STRUCT_USER_DESC]: Likewise.
2004-03-01 22:10:52 +00:00
Roland McGrath
b09e33a286 2004-03-01 Roland McGrath <roland@redhat.com>
* process.c (sys_execve): Clear instead of set TCB_WAITEXECVE on
	erring syscall.
2004-03-01 22:03:58 +00:00
Roland McGrath
fb1bc07376 2004-03-01 Roland McGrath <roland@redhat.com>
* process.c (struct_user_offsets) [LINUX && IA64]: Conditionalize
	PT_AR_CSD and PT_AR_SSD uses in case of older kernel headers.
	* configure.ac: Check for `struct pt_all_user_regs'
	and `struct ia64_fpreg' in <sys/ptrace.h>.
	* util.c, process.c, syscall.c: Work around conflicts between
	<sys/ptrace.h> and <linux/ptrace.h> for defining those types.
2004-03-01 21:29:24 +00:00
Roland McGrath
279d378b14 2004-03-01 Roland McGrath <roland@redhat.com>
* linux/dummy.h (sys_sched_getscheduler, sys_sched_setparam,
	sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler,
	sys_sched_get_priority_max, sys_sched_get_priority_min): Remove macros.
	* process.c [LINUX] (sys_sched_getscheduler, sys_sched_setparam,
	sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler,
	sys_sched_get_priority_min): New functions.
	From Ulrich Drepper <drepper@redhat.com>.
2004-03-01 20:27:37 +00:00
Roland McGrath
08267b8d67 2003-12-31 David Mosberger <davidm@hpl.hp.com>
* process.c (internal_exit): For ia64, also recognize IA-32 252
	as exit_group().
	(change_syscall): For IA64, also support changing IA-32 syscalls.
	* syscall.c (internal_syscall): For IA64, also recognize IA-32
        syscall 252 (exit_group) as an internal_exit() syscall.
	* util.c (SYS_fork): For IA64, define them to the IA-32 syscall
	number.
	(SYS_vfork): Likewise.
	(arg_setup): For IA64 version, also support IA-32 syscalls.
	(get_arg0): Likewise.
	(get_arg1): Likewise.
	(set_arg0): Likewise.
	(set_arg1): Likewise.
2004-02-20 22:56:43 +00:00
Roland McGrath
5ef24abf00 Revert jhughes commits. 2004-02-20 02:22:35 +00:00
John Hughes
ae25933773 port SSI clustering mods to OpenSSI on Linux 2004-01-29 11:17:50 +00:00
Roland McGrath
ca4e10c060 2003-12-31 David Mosberger <davidm@hpl.hp.com>
* process.c (struct_user_offsets) [IA64]: Fix up register name list.
2004-01-13 10:13:20 +00:00
Roland McGrath
83bd47a91e 2003-09-06 Dmitry V. Levin <ldv@altlinux.org>
* util.c (printuid): New function.
	* defs.h: Declare it.
	* file.c (sys_chown): Use it.
	* file.c (sys_fchown): Likewise.
	* process.c (sys_setreuid, sys_setregid, sys_setresuid,
	sys_setresgid): Likewise.
	* linux/syscallent.h: Better handle getgid32, geteuid32, getegid32,
	setreuid32, setregid32, getgroups32, setgroups32, fchown32,
	setresuid32, getresuid32, setresgid32, getresgid32, chown32,
	setuid32, setgid32, setfsuid32, setfsgid32.
	* process.c [LINUX]: Define GETGROUPS32_T.
	* process.c [LINUX] (sys_setgroups32, sys_getgroups32):
	New functions.
	* linux/syscall.h (sys_setgroups32, sys_getgroups32):
	Declare them.
2003-11-13 22:32:26 +00:00
Roland McGrath
fccfb94863 2003-10-01 Roland McGrath <roland@redhat.com>
* process.c (internal_clone): Don't suspend parent when call requested
	a specific PID that is not a traced child.
2003-10-01 21:59:44 +00:00
Roland McGrath
c0f8bbda62 2003-07-28 Daniel Jacobowitz <drow@mvista.com>
* defs.h (ALIGN64): Define for MIPS.
	* io.c (PREAD_OFFSET_ARG): Define.
	(sys_pread, sys_pwrite): Use it.
	* process.c (struct_user_offsets) [SH]: Check whether REG_XDREG0
	is defined.
	* linux/sh/syscallent.h (pread, pwrite): Take six arguments.
	(truncate64, ftruncate64): Pretty-print.
	* linux/mips/syscallent.h (pread, pwrite): Take six arguments.
	(truncate64, ftruncate64): Take four arguments.
2003-08-21 09:58:00 +00:00
Roland McGrath
9c555e71d2 2003-07-05 Richard Henderson <rth@twiddle.net>
* process.c (sys_clone): Order arguments for alpha the same as x86_64.
	* syscall.c (ERESTART_RESTARTBLOCK): New.
	(trace_syscall): Print it.
	* linux/alpha/syscallent.h (osf_syscall): Name properly.
	(osf_set_program_attributes): Fix typo.
	(osf_nfssvc): Likewise.
	(osf_sigsendset): Likewise.
	(getdents64, gettid, readahead, tkill, setxattr, lsetxattr, fsetxattr,
	getxattr, lgetxattr, fgetxattr, listxattr, llistxattr, flistxattr,
	removexattr, lremovexattr, fremovexattr, futex, sched_setaffinity,
	sched_getaffinity, tuxcall, io_setup, io_destroy, io_getevents,
	io_submit, io_cancel, exit_group, lookup_dcookie, epoll_create,
	epoll_ctl, epoll_wait, remap_file_pages, set_tid_address,
	restart_syscall, fadvise, timer_create, timer_settime, timer_gettime,
	timer_getoverrun, timer_delete, clock_settime, clock_gettime,
	clock_getres, clock_nanosleep, semtimedop): New.
2003-07-09 09:47:59 +00:00
Roland McGrath
f5a477788e 2003-06-26 Roland McGrath <roland@redhat.com>
* configure.ac: SHMEDIA -> SH64
	* defs.h: Likewise.
	* mem.c: Likewise.
	* process.c: Likewise.
	* sock.c: Likewise.
	* syscall.c: Likewise.
	* util.c: Likewise.
	* linux/shmedia/syscallent.h: Moved to ...
	* linux/sh64/syscallent.h: ... here.
2003-06-26 22:40:42 +00:00
Roland McGrath
88812d685d 2003-06-26 Roland McGrath <roland@redhat.com>
* process.c [LINUX] (sys_futex): Grok FUTEX_REQUEUE and print 5th arg.
	* linux/syscallent.h: sys_futex argument count is now 5, not 4.
	* linux/ia64/syscallent.h: Likewise.
	* linux/powerpc/syscallent.h: Likewise.
	* linux/s390/syscallent.h: Likewise.
	* linux/s390x/syscallent.h: Likewise.
	* linux/x86_64/syscallent.h: Likewise.
	From Jakub Jelinek <jakub@redhat.com>.
2003-06-26 22:27:23 +00:00
Roland McGrath
0f87c4972f 2003-06-03 Roland McGrath <roland@redhat.com>
Linux/ARM improvements from Russell King <rmk@arm.linux.org.uk>:
	* defs.h [LINUX] (TCB_WAITEXECVE): Define for [ARM] too.
	* process.c (struct_user_offsets) [LINUX] [ARM]: Add ARM registers.
	* signal.c [LINUX] (sys_sigreturn) [ARM]: New case.
	* syscall.c (get_scno, syscall_fixup) [LINUX] [ARM]: Case rewritten.
	(get_error) [LINUX] [ARM]: Update.
	(syscall_enter) [LINUX] [ARM]: New case.
	* util.c (printcall) [LINUX] [ARM]: New case.
2003-06-03 23:29:04 +00:00
Roland McGrath
e1e584b8fa 2003-06-02 Roland McGrath <roland@redhat.com>
* configure.ac, defs.h, mem.c, process.c, sock.c, syscall.c, util.c:
	Merged in SHmedia port from Stephen Thomas <stephen.thomas@superh.com>.
2003-06-02 19:18:58 +00:00
Roland McGrath
0962345a57 2003-05-22 Roland McGrath <roland@redhat.com>
* defs.h (struct tcb): New member `nzombies'.
	* strace.c (alloctcb): Initialize it.
	(droptcb): Increment our parent's zombie count.
	* process.c (internal_wait): Don't go into TCB_SUSPENDED if the
	process has zombies it can reap.  On the way out, if we reaped
	an untraced process, decrement the zombie count.
2003-05-23 02:27:13 +00:00
Roland McGrath
984154d246 2003-05-22 Roland McGrath <roland@redhat.com>
* process.c (sys_clone): Mask CSIGNAL out of flags and print that
	separately using signame.
	* process.c (internal_clone) [TCB_CLONE_THREAD]: Use ARG_FLAGS instead
	of literal 0 for index.  Consult the right flags without clobbering
	anything when we reparent the new child to the caller's parent thread.
2003-05-23 01:08:42 +00:00
Roland McGrath
fe5fdb23de 2003-05-22 Roland McGrath <roland@redhat.com>
* process.c [LINUX] [S390 || S390X] (ARG_CTID, ARG_TLS): Fix swapped
	indices.  Reported by Jakub Jelinek <jakub@redhat.com>.
2003-05-23 00:29:05 +00:00
Roland McGrath
a2f3496d74 2003-05-22 Roland McGrath <roland@redhat.com>
* process.c (print_affinitylist): Fix loop condition.
	Reported by Ian Wienand <ianw@gelato.unsw.edu.au>.
2003-05-23 00:14:04 +00:00
Roland McGrath
ac971c2727 2003-02-26 Stuart Menefy <stuart.menefy@st.com>
Various fixes for SuperH [SH]:
	* mem.c(sys_old_mmap): mmap() parameters passed in registers
	* net.c(sys_pipe), syscall.c(getrval2): pipe() results returned
	in registers
	* process.c (change_syscall): Fixed register which holds system
	call number
	* util.c (arg0_offset, arg1_offset): provide definition
	* Makefile.am: Added new files in linux/sh
	* linux/sh/{syscallent,errnoent,ioctlent,signalent}.h: New files
2003-03-31 01:03:33 +00:00
Roland McGrath
6f67a98442 2003-03-18 Roland McGrath <roland@redhat.com>
* process.c [LINUX] (sys_clone): Don't dereference parent_tid argument.
2003-03-21 07:33:15 +00:00
Roland McGrath
361aac5193 2003-03-17 Roland McGrath <roland@redhat.com>
* linux/x86_64/syscallent.h: clone takes 5 args.
	* process.c [LINUX] (sys_clone) [X86_64]: Fix argument order.
2003-03-18 07:43:42 +00:00
Roland McGrath
c03981d0ea 2003-03-14 Roland McGrath <roland@redhat.com>
* linux/ia64/syscallent.h: clone takes 5 arguments.
	* process.c [LINUX && IA64] (ARG_*): Update for 2.5 clone calls.
2003-03-14 10:32:36 +00:00
Roland McGrath
178d3b46cb tweak last change 2003-03-12 10:01:22 +00:00
Roland McGrath
43f2c84d50 tweak last change 2003-03-12 09:58:14 +00:00
Roland McGrath
9677b3a280 2003-03-12 Roland McGrath <roland@redhat.com>
* linux/ia64/syscallent.h: Fix arg counts for clone and clone2.
	Use sys_clone for clone2.
	* linux/syscall.h: Don't declare sys_clone2.
	* process.c (sys_clone): Rewritten to handle both flavors,
	print all extra args depending on flag bits.
	(sys_clone2): Function removed.
2003-03-12 09:54:36 +00:00
Roland McGrath
8dfa04a174 2003-03-04 Ulrich Drepper <drepper@redhat.com>
* process.c [LINUX] (sys_futex): Omit final if op is not FUTEX_WAIT.
2003-03-05 04:07:55 +00:00
Roland McGrath
d245092e7f 2003-02-24 Roland McGrath <roland@redhat.com>
* process.c (sys_getresgid): Fix typos in argument access.
2003-02-24 10:18:07 +00:00
Roland McGrath
9bd6b4234b 2003-02-23 Roland McGrath <roland@redhat.com>
* process.c (sys_getresuid): Fix typos in argument access.
	Reported by Anton Blanchard <anton@samba.org>.
2003-02-24 07:13:51 +00:00
Roland McGrath
f3a0e1bb56 2003-02-19 Roland McGrath <roland@redhat.com>
FreeBSD rfork support changes from Russ Cox <rsc@plan9.bell-labs.com>:
	* syscall.c (internal_syscall): Handle SYS_rfork with internal_fork.
	* process.c (internal_fork) [SYS_rfork]: Bail if RFPROC flag not set.
2003-02-20 02:45:22 +00:00
Roland McGrath
5bd7cf8545 2003-01-23 Roland McGrath <roland@redhat.com>
* process.c: Reorder includes to put sys/reg.h before linux/ptrace.h,
	since they can conflict.
2003-01-24 04:31:18 +00:00
Roland McGrath
b4968becdc 2003-01-20 Roland McGrath <roland@redhat.com>
* process.c [LINUX] (sys_clone) [S390 || S390X]: Argument order is
	reversed from other architectures.
	* process.c (sys_execve) [LINUX]: Make setting TCB_WAITEXECVE flag
	conditional on [TCB_WAITEXECVE] instead of list of processors.
2003-01-20 09:04:33 +00:00
Roland McGrath
eb28535990 2003-01-14 Roland McGrath <roland@redhat.com>
* configure.ac: Match powerpc* (includes powerpc64), and don't match
	ppc (never comes out of config.sub).
	* process.c (sys_ptrace): Use #lx format for address argument.
	[POWERPC]: Use sizeof(unsigned long) in place of 4 for multipliers.
	* process.c [POWERPC]: Likewise.
	* signal.c (sys_sigreturn) [POWERPC]: Likewise.
	* syscall.c (get_scno) [POWERPC]: Likewise.
	* util.c [POWERPC]: Likewise.
	(printnum): Use long for NUM.
	From Anton Blanchard <anton@samba.org>.
2003-01-14 09:59:00 +00:00
Roland McGrath
bf621d40c5 2003-01-14 Roland McGrath <roland@redhat.com>
* process.c: Use <linux/ptrace.h> regardless of <sys/reg.h>.
	(sys_ptrace): Use printxval.
	(ptrace_cmds): Make PTRACE_GETREGS et al conditional on #ifdef PTRACE_*
	instead of only #ifdef SUNOS4.  Add PTRACE_[GS]ETFPXREGS.
2003-01-14 09:46:21 +00:00
Roland McGrath
43b286f8cb 2003-01-10 Roland McGrath <roland@redhat.com>
* process.c (change_syscall) [POWERPC]: Add missing return.
	* util.c [POWERPC] (arg0_offset): Set to 4*PT_R3, not 4*PT_ORIG_R3.
2003-01-10 11:14:41 +00:00
Roland McGrath
e85bbfe9ab 2003-01-08 Roland McGrath <roland@redhat.com>
Support for new Linux 2.5 thread features.
	* defs.h [LINUX]: Define __NR_exit_group if not defined.
	(struct tcb): New members nclone_threads, nclone_detached,
	and nclone_waiting.
	(TCB_CLONE_DETACHED, TCB_CLONE_THREAD, TCB_GROUP_EXITING): New macros.
	(waiting_parent): Macro removed.
	(pid2tcb): Declare it.
	* process.c (internal_clone) [TCB_CLONE_THREAD]: Reparent the new
	child to our parent if we are a CLONE_THREAD child ourselves.
	Maintain TCB_CLONE_THREAD and TCB_CLONE_DETACHED flags and counts.
	(internal_wait) [TCB_CLONE_THREAD]: Factor out detached children when
	determining if we have any.  If TCB_CLONE_THREAD is set, check
	parent's children instead of our own, and bump nclone_waiting count.
	(internal_exit) [__NR_exit_group]: Set the TCB_GROUP_EXITING flag if
	the syscall was exit_group.
	* syscall.c (internal_syscall): Use internal_exit for exit_group.
	* strace.c (pid2tcb): No longer static.
	(alloctcb) [TCB_CLONE_THREAD]: Initialize new fields.
	(droptcb) [TCB_CLONE_THREAD]: Maintain new fields.
	If we have thread children, set TCB_EXITING and don't clear the TCB.
	(resume) [TCB_CLONE_THREAD]: Decrement parent's nclone_waiting.
	(detach) [TCB_CLONE_THREAD]: When calling resume, check all thread
	children of our parent that might be waiting for us too.
	[TCB_GROUP_EXITING] (handle_group_exit): New function.
	(trace) [TCB_GROUP_EXITING]: Use that in place of detach or droptcb.
	Revamp -f support for Linux.
	* util.c [LINUX] (setbpt, clearbpt): New implementations that tweak
	the system call to be clone with CLONE_PTRACE set.  Various new static
	helper functions.
	* process.c (internal_clone): Define also #ifdef SYS_clone2.
	Initialize TCPCHILD->parent field.
	[CLONE_PTRACE]: Don't do PTRACE_ATTACH here, because it's preattached.
	Check in case the new child is in the tcb already.
	(internal_fork) [LINUX]: Just call internal_clone.
	* strace.c (trace) [LINUX]: Under -f/-F, grok an unknown pid
	reporting to wait, put it in the TCB with TCB_ATTACHED|TCB_SUSPENDED.
2003-01-09 06:53:31 +00:00
Roland McGrath
909875ba26 2002-12-21 Roland McGrath <roland@redhat.com>
* linux/syscallent.h: Add some new 2.5 syscall names.
	Now clone takes 5 args.
	* process.c [LINUX] (clone_flags): Update with 2.5 flag bits.
	[LINUX] (sys_clone): Print new args.
	* mem.c (print_ldt_entry): Make global.
2002-12-22 03:34:36 +00:00
Roland McGrath
b69f81b8e5 2002-12-21 Roland McGrath <roland@redhat.com>
* syscall.c (force_result): New function.
	* process.c (internal_wait): Handle ECHILD exit from wait call with
	WNOHANG flag set; force the return value to 0 in the inferior when it
	has live children we are tracing.
2002-12-21 23:25:18 +00:00
Roland McGrath
ee9d435275 2002-12-17 Roland McGrath <roland@redhat.com>
* strace.c (tcbtab): Make this a pointer to pointers, not an array.
	(tcbtabsize): New variable.
	(main): Initialize them using dynamic allocation.
	(alloctcb, main): Use tcbtabsize in place of MAX_PROCS; indirect.
	(pid2tcb, cleanup): Likewise.
	[USE_PROCFS] (pollv): Make this a pointer, not an array; make static.
	(rebuild_pollv): Dynamically allocate the vector.
	* defs.h (tcbtab): Update decls.
	(MAX_PROCS): Macro removed, no more static limit on this.
	* process.c (fork_tcb): New function.
	(internal_clone, internal_fork): Use it instead of checking nprocs.
2002-12-18 04:16:10 +00:00
Roland McGrath
7ec1d3584b 2002-12-16 Roland McGrath <roland@redhat.com>
* process.c [LINUX] (wait4_options): Fix __WCLONE value.  Add
	__WNOTHREAD and __WALL.
2002-12-17 04:50:44 +00:00
Roland McGrath
3bb9c3d358 2002-12-15 Roland McGrath <roland@redhat.com>
* process.c (setarg) [POWERPC]: Support it.
2002-12-16 20:40:48 +00:00
Roland McGrath
5a223477e3 2002-12-15 Roland McGrath <roland@redhat.com>
* syscall.c (syscall_enter) [LINUX && POWERPC]: Define PT_ORIG_R3 if
	not defined, since <asm/ptrace.h> defines it only #ifdef __KERNEL__.
	* process.c: Likewise.
	* configure.in: Check for linux/xattr.h and linux/futex.h headers.
	* linux/syscall.h: Add sys_* decls for new syscalls getpmsg, putpmsg,
	readahead, sendfile64, setxattr, fsetxattr, getxattr, fgetxattr, int
	listxattr, flistxattr, removexattr, fremovexattr, sched_setaffinity,
	sched_getaffinity, futex.
	* linux/syscallent.h: Update the table.
	* io.c: Add sys_sendfile64.
	* file.c: Add sys_readahead, sys_*xattr.
	* process.c: Add sys_futex, sys_*affinity.
2002-12-15 23:58:26 +00:00
Michal Ludvig
10a88d09eb 2002-10-07 Michal Ludvig <mludvig@suse.cz>
Merged s390x port by Heiko Carstens <Heiko.Carstens@de.ibm.com>
        and bugfixes to s390 by D.J. Barrow.
2002-10-07 14:31:00 +00:00