summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
Commit message (Collapse)AuthorAgeFilesLines
* Correct off-by-one issue in truss(1) which happens when system call numberdelphij2009-05-289-9/+9
| | | | | | | | is nsyscalls. PR: bin/134916 Submitted by: Steven Hartland <steven hartland multiplay co uk> MFC after: 2 weeks
* Reduce diff against my local version: replace malloc+memset() cases to calloc().delphij2009-05-1510-22/+12
|
* Fix print_syscall_ret parameter order.dds2009-05-131-1/+1
|
* Fix compilation error introduced in r192025.dds2009-05-131-1/+2
|
* Add -c option to summarize number of calls, errors, and system time.dds2009-05-1213-145/+247
| | | | Reviewed by: alfred
* Don't exit until all truss children were exit.delphij2009-04-131-4/+10
|
* Correct a bug where pr_data should have been assigned.delphij2009-04-131-4/+4
|
* Add preliminary support for truss on MIPS. It compiles, but has notimp2009-02-153-0/+354
| | | | | | | | been extensively tested. And the ELF64 stuff likely is not quite right... # There's a lot of cut-n-paste code here that could easily be # refactored, at least for FreeBSD syscalls.
* Attaching to the init process returns EINVAL,trhodes2009-01-231-2/+2
| | | | | | | | so give an example that is more likely to work. Stolen from the ktrace(1) manual page. PR: 128222 Submitted by: Mateusz Guzik <mjguzik@gmail.com>
* Try to make this code slightly less painful to read.des2008-07-312-690/+673
|
* Retire some stale alpha references.jhb2008-05-162-7/+0
|
* Teach truss about 32-bit FreeBSD and Linux binaries on amd64. Somejhb2008-05-167-43/+108
| | | | | | | additional work is needed to handle ABI-specific syscall argument parsing, but this gets the basic tracing working. MFC after: 1 week
* Revert CLEANDEPFILES commit per ru@'s request; it does not really solvedes2008-02-051-2/+1
| | | | the problem. The correct fix will follow.
* Normally, when a header file is removed from the build (as i4b headersdes2008-02-031-2/+3
| | | | | | | | | | | | | | | | | | | | were recently), a simple 'make cleandepend; make depend' is sufficient to keep the tree buildable after a cvs update when doing incremental builds. However, kdump and truss use a script which searches for header files that define ioctls, and generates C code that includes them. This script will usually not need updating when a header file is removed, so the normal dependency mechanism will not realize that it needs to be re-run. One is therefore left with code that references dead files but will only be removed by a full 'make clean', which defeats the purpose of incremental builds. To work around this, modify the cleandepend target in bsd.dep.mk to also remove any files listed in a new variable named CLEANDEPFILES, and modify kdump's and truss's Makefiles accordingly. MFC after: 2 weeks
* The break() system call takes a pointer argument, not an integer. Thisjasone2008-01-031-1/+1
| | | | change fixes output for break() on LP64 systems.
* Print integer-typed arguments as integers. This makes sure thatmarcel2007-07-281-3/+3
| | | | | | | on 64-bit platforms the result is more reliable. For example, -1 was previously printed as 0xffffffff. Approved by: re (kensmith)
* Fix handling of Quad-type arguments. Previously, syscallsmarcel2007-07-284-12/+23
| | | | | | | | | | | | | | | | | containing 64-bit arguments would have explicit padding. On 64-bit platforms there was no padding, so the dummy argument was not covering anything. On 32-bit platforms with weak alignment (i.e. i386) the 64-bit argument did not need to be aligned, so there too an aditional argument was introduced. On 32-bit platforms with strong alignment (i.e. PowerPC) the dummy argument in fact cover the padding. By elimininating the dummy argument, 64-bit platforms now have 1 argument less. This also applies to 32-bit platforms with weak alignment. On PowerPC this doesn't matter, because the padding is still there. We just don't "name" it. Deal with those 3 cases. Approved by: re (kensmith)
* Syscalls have at most 6 argument, not 5. See mmap(2) for example.marcel2007-07-281-1/+1
| | | | | | | Previously the offset argument to mmap(2) would be bogus as we weren't reading it in. Approved by: re (kensmith)
* MFp4: Bugfixes for truss(1):delphij2007-06-2610-91/+75
| | | | | | | | | | | - Fix logic handling execve(). We will not be able to obtain information otherwise. - truss coredump [1]. - truss does not work against itself [2]. PR: bin/58970 [1], bin/45193 [2] Submitted by: Howard Su Approved by: re (kensmith)
* Don't want a stray systrace_args.c in objdir.ru2007-05-222-2/+6
|
* Remove duplicate ' 2' manpage section number.keramida2007-05-211-1/+1
| | | | | Submitted by: Rui Paulo MFC after: 3 days
* Make use of ptrace(2) instead of procfs in truss(1), eliminatingdelphij2007-04-1016-585/+452
| | | | | | | | yet another need of an available /proc/ mount. Tested with: make universe Submitted by: howardsu Reviewed by: alfred
* Add missing markup bits.ru2006-12-111-3/+2
|
* Markup fixes.ru2006-09-291-2/+2
|
* Remove alpha-specific stuff.ru2006-08-231-360/+0
|
* Make sure that the sc pointer gets initialized. No functional changedelphij2006-07-262-2/+2
| | | | should happen with this change.
* - Fix warning when compiling with -DDEBUGpav2006-05-151-1/+1
| | | | Approved by: alfred
* - Add decoding of kse_release, kevent, sigprocmask, unmount, socket, getrusage,pav2006-05-157-153/+578
| | | | | | | | | | | | | | | | | | | 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
* - Fix crash when hitting unknown syscall. Copied from i386-fbsd.cpav2006-05-155-5/+10
| | | | Approved by: alfred
* Add powerpc support for truss.grehan2006-01-053-0/+358
| | | | | Initial work by: Orlando Bassotto < orlando at break net > Modified by: grehan
* Add a -s flag for the same functionality as strace. Introduce a Namebrian2006-01-0213-54/+91
| | | | | | | | | | | | | | | | 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
* The kernel accepts sockaddrs with len set to zero for sockaddr_inalfred2005-10-151-9/+20
| | | | types, so refactor the code here to grab them when length is zero.
* Fix all the spelling mistakes I could find in the man pages for wordskeramida2005-07-311-1/+1
| | | | | | | | that have at least 3 characters. MFC after: 1 week Thanks to: Music band ``Chingon'' for keeping me company while searching for these.
* Decode chroot(2) args.alfred2005-06-141-0/+2
| | | | Approved by: re
* decode utimes, lutimes, futimes, chflags, lchflags.alfred2005-05-261-0/+10
|
* decode mkdir args.alfred2005-05-261-0/+2
|
* When doing the initial open of the proc via procfs, complain if we arealfred2005-03-273-8/+14
| | | | | | unable to open the /proc/pid/mem file. Otherwise doing a truss on a nonexistant pid makes us return success even though no such process exists.
* I've been working on this somewhat so I'm moving thealfred2005-03-272-313/+329
| | | | parts I'm touching to be as style(9) compliant as I can.
* Change fix a bug where the length of data written by snprintf wasalfred2005-03-031-1/+1
| | | | | | | being mishandled by using accumulation (into an uninitialized variable) instead of direct assignment. Reviewed by: scottl
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Improve markup and language.dd2004-09-071-1/+3
|
* Fix Quad handling on 64-bit architectures. On 64-bit machines, a Quadmarcel2004-09-051-22/+17
| | | | | | | | | | | | also occupies a single slot. There's no need for any special handling of Quads. While here, remove the silly make_quad() function. We have the 2 longs on 32-bit machines already lined up in the argument array, so we can fetch the Quad with a simple cast. Before: lseek(1,0x123456789,0xd0d0d0d0d0d0d0d0) = 4886718345 (0x123456789) After: lseek(1,0x123456789,SEEK_SET) = 4886718345 (0x123456789)
* Update doc dates.alfred2004-09-031-1/+1
| | | | Pointed out by: ru
* xref and give a hint as to what procctl can be used for.alfred2004-09-031-1/+7
|
* don't seg if the syscall is invalid for i386fbsd.alfred2004-08-083-2/+6
|
* Use the length modifier 'll' instead of 'q' to print long longs.stefanf2004-07-281-1/+1
|
* Support readlink(2) better. Readlink does not nul terminate thealfred2004-07-1710-20/+32
| | | | | | | | 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.
* When reporting reciept of a signal, print the signal's name.alfred2004-07-173-7/+26
|
* Decode the "wence" arg to lseek and linux_lseek.alfred2004-07-102-2/+16
|
* Fix unterminated RCSID.bms2004-06-131-1/+1
| | | | Submitted by: Liam J. Foy
OpenPOWER on IntegriCloud