summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/syscall.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC r264881smh2014-05-261-1/+43
| | | | | | Add Linux socket call decoding to truss Sponsored by: Multiplay
* Extend the support for exempting processes from being killed when swap isjhb2013-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | exhausted. - Add a new protect(1) command that can be used to set or revoke protection from arbitrary processes. Similar to ktrace it can apply a change to all existing descendants of a process as well as future descendants. - Add a new procctl(2) system call that provides a generic interface for control operations on processes (as opposed to the debugger-specific operations provided by ptrace(2)). procctl(2) uses a combination of idtype_t and an id to identify the set of processes on which to operate similar to wait6(). - Add a PROC_SPROTECT control operation to manage the protection status of a set of processes. MADV_PROTECT still works for backwards compatability. - Add a p_flag2 to struct proc (and a corresponding ki_flag2 to kinfo_proc) the first bit of which is used to track if P_PROTECT should be inherited by new child processes. Reviewed by: kib, jilles (earlier version) Approved by: re (delphij) MFC after: 1 month
* - Decode the idtype argument passed to wait6() in kdump and truss.jhb2013-09-121-1/+1
| | | | | | | | | | - Don't treat an options argument of 0 to wait4() as an error in kdump. - Decode the wait options passed to wait4() and wait6() in truss and decode the returned rusage and exit status. Approved by: re (kib) MFC after: 1 week
* Properly print arguments to vfork(2) and rfork(2).markj2013-08-011-1/+1
| | | | | | PR: 180976 Submitted by: Yuri <yuri@tsoft.com> (original patch) MFC after: 1 week
* - Style(9) cleanup.zont2012-09-021-3/+3
| | | | Approved by: kib (mentor)
* Add -c option to summarize number of calls, errors, and system time.dds2009-05-121-1/+5
| | | | Reviewed by: alfred
* Try to make this code slightly less painful to read.des2008-07-311-1/+1
|
* Make use of ptrace(2) instead of procfs in truss(1), eliminatingdelphij2007-04-101-2/+1
| | | | | | | | yet another need of an available /proc/ mount. Tested with: make universe Submitted by: howardsu Reviewed by: alfred
* - Add decoding of kse_release, kevent, sigprocmask, unmount, socket, getrusage,pav2006-05-151-8/+16
| | | | | | | | | | | | | | | | | | | rename, __getcwd, shutdown, getrlimit, setrlimit, _umtx_lock, _umtx_unlock, pathconf, truncate, ftruncate, kill - Decode more arguments of open, mprot, *stat, and fcntl. - Convert all constant-macro and bitfield decoding to lookup tables; much cleaner than previous code. - Print the timestamp of process exit and signal reception when -d or -D are in use - Try six times with 1/2 second delay to debug the child PR: bin/52190 (updated) Submitted by: Dan Nelson <dnelson@allantgroup.com> Approved by: alfred
* Add a -s flag for the same functionality as strace. Introduce a Namebrian2006-01-021-2/+2
| | | | | | | | | | | | | | | | type which is a String type that has no -s limitations applied to it. Change most Strings in the code to Names and add a few extra syscalls, namely munmap, read, rename and symlink. This was enough to facilitate following file descriptor allocations in the code more easily and getting a hint at what's being read/written from/to files. More syscalls should really be added. While here, fix an off-by-one bug in the buffer truncation code and add a fflush so that truss's output reflects the syscall that the program is stuck in. Sponsored by: Sophos/Activestate MFC after: 2 weeks
* Support readlink(2) better. Readlink does not nul terminate thealfred2004-07-171-2/+2
| | | | | | | | result buffer, so we need to format it ourselves. The problem is that the length is stored as the return value from readlink, so we need to pass the return value from our syscall into print_arg. Motivated by: truss garbage on my screen from reading /etc/malloc.conf.
* Decode the "wence" arg to lseek and linux_lseek.alfred2004-07-101-1/+1
|
* Add support for decoding Timespec, Timeval, Itimerval, Pollfd,dwmalone2004-03-231-2/+12
| | | | | | | | | | | | | | | | | Fd_set and Sigaction structures. Use these for printing the arguments to sigaction(), nanosleep(), select(), poll(), gettimeofday(), clock_gettime(), recvfrom(), getitimer() and setitimer(). This is based on Dan's patch from the PR but I've hacked it for style and some other issues. While Dan has checked this patch, any goofs are probably my fault. (The PR also contains support for the dual return values of pipe(). These will follow once I've ported that support to platforms other than i386.) PR: 52190 Submitted by: Dan Nelson <dnelson@allantgroup.com>
* decode fcntl and mmap arguments.alfred2004-03-231-1/+1
|
* Port truss(1) to 64-bit architectures:marcel2003-11-091-1/+2
| | | | | | | | | | | | | | | | | | o Syscall return values do not fit in int on 64-bit architectures. Change the type of retval in <arch>_syscall_exit() to long and change the prototype of said function to return a long as well. o Change the prototype of print_syscall_ret() to take a long for the return address and change the format string accordingly. o Replace the code sequence tmp = malloc(X); sprintf(tmp, format, ...); with X by definition too small on 64-bit platforms by asprintf(&tmp, format, ...); With these changes the output makes sense again, although it does mess up the tabulation on ia64. Go widescreen... Not tested on: alpha, sparc64.
* Add options to print the argument and environment string parameters tomdodd2002-08-041-1/+1
| | | | | | | | | execve(). This could be done in a more general manner but it still wouldn't be very pretty. MFC after: 3 weeks
* Parameterize globals.mdodd2002-08-041-2/+2
| | | | | PR: bin/25587 (in part) MFC after: 3 weeks
* Partial WARNS=1 fizes with NO_WERROR set to prevent world breakage.markm2001-12-111-1/+1
| | | | Use __FBSDID().
* Teach truss(1) to display sockaddrs. It currently knows about AF_INET,des2001-10-211-1/+1
| | | | | | | | | AF_INET6 and AF_UNIX sockaddrs, and will recognize accept(), bind(), connect(), getpeername() and getsockname() as syscalls taking sockaddr arguments. Some enterprising soul might want to add (and test) support for the send() / recv() family of syscalls as well. MFC after: 1 week
* Change the output of truss to more closely resemble SysV's. (Yes, itsef2000-03-181-0/+1
| | | | | | really is much nicer looking.) Submitted by: "Matthew N. Dodd" <winter@jurai.net>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Teach truss to print symbolic signal names (e.g. SIGHUP instead of 0x01).des1999-08-101-2/+3
|
* Add some copyright and license terms, at Jordan's request. Note thatsef1997-12-201-1/+3
| | | | syscall.h just refers to another file for the copyright notice.
* First cut at printing out ioctl names intelligently. Note that this doesn'tsef1997-12-061-2/+3
| | | | | | | handle linux ioctls (yet?). This uses the mkioctl script from kdump, bless its little heart. Reviewed by: Mike Smith
* Truss program. Requires procfs.sef1997-12-061-0/+43
OpenPOWER on IntegriCloud