summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright spelling.imp2010-03-1014-15/+15
| | | | | PR: 139825 Submitted by: Ruslan Mahmatkhanov
* This fix makes it so the args are malloc'd beforerrs2010-02-031-1/+1
| | | | | | | | we use them (always a good idea ;-0) This was found and fixed by JC Obtained from: JC (c.jayachandran@gmail.com)
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-1/+0
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* The devices that supported EVFILT_NETDEV kqueue filters were removed inbrooks2009-12-311-1/+1
| | | | | | | | | | | | r195175. Remove all definitions, documentation, and usage. fifo_misc.c: Remove all kqueue tests as fifo_io.c performs all those that would have remained. Reviewed by: rwatson MFC after: 3 weeks X-MFC note: don't change vlan_link_state() function signature
* Allow proper tracing of posix_openpt(2).ed2009-12-231-0/+2
|
* Cast time_t values to intmax_t and use %jd with printf.jh2009-12-211-5/+5
| | | | | OK'ed by: delphij Approved by: trasz (mentor)
* Remove non-working special case for pipe(2) from amd64-fbsd32.c andjh2009-12-213-26/+8
| | | | | | | | | i386-fbsd.c. Add pipe(2) to syscall table to decode it's pointer argument properly and re-add special handling for pipe(2) return value to print_syscall_ret(). PR: bin/120870 Approved by: trasz (mentor)
* Avoid sharing the file descriptor of the output file with tracedjh2009-12-201-0/+6
| | | | | | | | | processes by setting the FD_CLOEXEC flag for the output file. PR: bin/140493 Submitted by: Erik Lax OK'ed by: delphij Approved by: trasz (mentor)
* Add fork(2), getegid(2), geteuid(2), getgid(2), getpid(2), getpgid(2),jh2009-12-201-0/+12
| | | | | | | | getpgrp(2), getppid(2), getsid(2) and getuid(2) to syscall table to decode their arguments correctly. OK'ed by: delphij Approved by: trasz (mentor)
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-132-0/+6
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-112-6/+0
| | | | Tested with: make universe
* 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
OpenPOWER on IntegriCloud