summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
Commit message (Collapse)AuthorAgeFilesLines
* 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
* A first stab at truss support for amd64, basically cogged from i386.dwmalone2004-06-123-0/+352
| | | | It seems to work in my limited tests.
* COMPAT_SUNOS is gone.phk2004-06-111-5/+3
|
* Add support for decoding Timespec, Timeval, Itimerval, Pollfd,dwmalone2004-03-232-3/+179
| | | | | | | | | | | | | | | | | 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>
* Use pread to implement pread, rather than taking a detour throug stdio.dwmalone2004-03-231-16/+2
| | | | | PR: 52190 Submitted by: Dan Nelson <dnelson@allantgroup.com>
* decode mprotect args while i'm here.alfred2004-03-231-0/+2
|
* decode fcntl and mmap arguments.alfred2004-03-233-2/+66
|
* Move declarations of Procfd to a header file.dwmalone2004-01-079-8/+2
|
* Fix a printf format warning.dwmalone2004-01-071-1/+1
|
* Fix signal behaviour.cracauer2003-12-281-2/+7
| | | | | | | | | | | | | | | | | | | | | In my last change I made sure that the signal as reported from a truss exit is the same as if truss wasn't between parent and trussed program. I was smart enough to not have it coredump on SIGQUIT but it didn't ocur to me SIGSEGV might cause a coredump, too :-) So get rid of SIGQUIT extra hack and limit coredumpsize to zero instead. Tested: still works, correct signal reported. No more codedumps from SIGSEGV in the trussed proces. This file compiles cleanly on AMD64 (sledge). PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
OpenPOWER on IntegriCloud