summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
Commit message (Collapse)AuthorAgeFilesLines
* Properly check for errors from waitpid().jhb2011-02-151-4/+4
| | | | | Submitted by: gcooper MFC after: 1 week
* Make sys_signame upper case.jilles2011-02-041-1/+1
| | | | | | | | | | | | This matches the constants from <signal.h> with 'SIG' removed, which POSIX requires kill and trap to accept and 'kill -l' to write. 'kill -l', 'trap', 'trap -l' output is now upper case. In Turkish locales, signal names with an upper case 'I' are now accepted, while signal names with a lower case 'i' are no longer accepted, and the output of 'killall -l' now contains proper capital 'I' without dot instead of a dotted capital 'I'.
* Don't write the terminating NUL past end of buffer.jh2010-12-061-1/+1
| | | | | PR: bin/152345 Submitted by: Mateusz Guzik
* Set FD_CLOEXEC for the output file only when the file has been specifiedjh2010-11-131-6/+7
| | | | | | | | | with the -o option. Setting the flag for stderr (the default) could cause the traced process to redirect stderr to a random file. PR: bin/152151 Submitted by: ashish MFC after: 5 days
* Remove setpgid() call before executing child process.ed2010-10-201-1/+0
| | | | | | | | | Using a separate process group here is bad, since (for example) job control in the TTY layer prevents interaction with the TTY, causing the child process to hang. Mentioned on: current@ MFC after: 2 weeks
* s/sytem/system in comments, no functional changes.bcr2010-10-138-8/+8
| | | | Reviewed by: alfred@
* Fix breakage introduced in r211725 and improve functionality of truss onnwhitehorn2010-08-285-3/+31
| | | | 64-bit powerpc by adding 32-bit compatibility features.
* MFtbemd:imp2010-08-231-3/+3
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* Teach truss and xlint how to operate on 64-bit PowerPC systems.nwhitehorn2010-07-121-0/+323
|
* 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
OpenPOWER on IntegriCloud