#
272461 |
|
02-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
247975 |
|
07-Mar-2013 |
cognet |
Add arm bits to truss.
|
#
247338 |
|
26-Feb-2013 |
delphij |
Revert r247300 for now. I'll post a new changeset for review.
|
#
247300 |
|
26-Feb-2013 |
delphij |
Expose timespec and timeval macros when __BSD_VISIBLE is defined. This allows userland application to use the following macros:
timespecclear, timespecisset, timespeccmp, timespecadd, timespecsub;
timevalclear, timevalisset, timevalcmp.
MFC after: 1 month
|
#
245957 |
|
27-Jan-2013 |
mjg |
truss: use 'e' flag for fopen instead of fcntl(.., FD_CLOEXEC)
|
#
245956 |
|
27-Jan-2013 |
mjg |
truss: if file requested with -o flag could not be opened print the reason
MFC after: 3 days
|
#
240562 |
|
16-Sep-2012 |
zont |
- Make truss thread-aware.
Approved by: kib (mentor) MFC after: 2 weeks
|
#
240393 |
|
12-Sep-2012 |
zont |
- Fix detaching under some circumstances.
When truss is detaching from very active process it is possible to hang on waitpid(2) in restore_proc() forever, because ptrace(PT_SYSCALL) must be called before detaching, to allow the debugging process to continue execution. Also when truss called with '-c' argument, it does not print anything after detach, because it immediately exits from restore_proc().
To fix these two problems make detaching deferred, but then it is impossible to detach from a process which does not do any system call. To fix this issue use sigaction(2) instead of signal(3) to disable SA_RESTART flag for waitpid(2) that makes it non-restartable. Remove global variable child_pid, because now detaching is handled in context where child's pid is known.
Reported by: mjg Tested by: mjg, swills Approved by: kib (mentor) MFC after: 2 weeks
|
#
240005 |
|
02-Sep-2012 |
zont |
- Style(9) cleanup.
Approved by: kib (mentor)
|
#
228396 |
|
10-Dec-2011 |
ed |
Add more static keywords to truss(1) source code.
There are some tables in the source code that are only used by the individual source files themselves. Therefore there is no need to export them.
|
#
222103 |
|
19-May-2011 |
bcr |
Fix typos in comments, no functional changes.
Found by: codespell Reviewed by: alfred MFC after: 1 week
|
#
219347 |
|
06-Mar-2011 |
jilles |
Simplify various code that allowed for sys_signame being lower case.
This was changed in r218285.
|
#
218285 |
|
04-Feb-2011 |
jilles |
Make sys_signame upper case.
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'.
|
#
215235 |
|
13-Nov-2010 |
jh |
Set FD_CLOEXEC for the output file only when the file has been specified 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
|
#
211935 |
|
28-Aug-2010 |
nwhitehorn |
Fix breakage introduced in r211725 and improve functionality of truss on 64-bit powerpc by adding 32-bit compatibility features.
|
#
204977 |
|
10-Mar-2010 |
imp |
Fix copyright spelling.
PR: 139825 Submitted by: Ruslan Mahmatkhanov
|
#
200752 |
|
20-Dec-2009 |
jh |
Avoid sharing the file descriptor of the output file with traced 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)
|
#
200462 |
|
13-Dec-2009 |
delphij |
Revert most part of 200420 as requested, as more review and polish is needed.
|
#
200420 |
|
11-Dec-2009 |
delphij |
Remove unneeded header includes from usr.bin/ except contributed code.
Tested with: make universe
|
#
192153 |
|
15-May-2009 |
delphij |
Reduce diff against my local version: replace malloc+memset() cases to calloc().
|
#
192025 |
|
12-May-2009 |
dds |
Add -c option to summarize number of calls, errors, and system time.
Reviewed by: alfred
|
#
191005 |
|
13-Apr-2009 |
delphij |
Don't exit until all truss children were exit.
|
#
188628 |
|
14-Feb-2009 |
imp |
Add preliminary support for truss on MIPS. It compiles, but has not 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.
|
#
179059 |
|
16-May-2008 |
jhb |
Retire some stale alpha references.
|
#
179051 |
|
16-May-2008 |
jhb |
Teach truss about 32-bit FreeBSD and Linux binaries on amd64. Some additional work is needed to handle ABI-specific syscall argument parsing, but this gets the basic tracing working.
MFC after: 1 week
|
#
171645 |
|
28-Jul-2007 |
marcel |
Syscalls have at most 6 argument, not 5. See mmap(2) for example. Previously the offset argument to mmap(2) would be bogus as we weren't reading it in.
Approved by: re (kensmith)
|
#
171055 |
|
26-Jun-2007 |
delphij |
MFp4: Bugfixes for truss(1):
- 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)
|
#
168569 |
|
10-Apr-2007 |
delphij |
Make use of ptrace(2) instead of procfs in truss(1), eliminating yet another need of an available /proc/ mount.
Tested with: make universe Submitted by: howardsu Reviewed by: alfred
|
#
158630 |
|
15-May-2006 |
pav |
- Add decoding of kse_release, kevent, sigprocmask, unmount, socket, getrusage, 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
|
#
154047 |
|
05-Jan-2006 |
grehan |
Add powerpc support for truss.
Initial work by: Orlando Bassotto < orlando at break net > Modified by: grehan
|
#
153963 |
|
02-Jan-2006 |
brian |
Add a -s flag for the same functionality as strace. Introduce a Name 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
|
#
144178 |
|
27-Mar-2005 |
alfred |
When doing the initial open of the proc via procfs, complain if we are 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.
|
#
144177 |
|
27-Mar-2005 |
alfred |
I've been working on this somewhat so I'm moving the parts I'm touching to be as style(9) compliant as I can.
|
#
132306 |
|
17-Jul-2004 |
alfred |
When reporting reciept of a signal, print the signal's name.
|
#
130394 |
|
12-Jun-2004 |
dwmalone |
A first stab at truss support for amd64, basically cogged from i386. It seems to work in my limited tests.
|
#
123916 |
|
27-Dec-2003 |
cracauer |
Fix signal behaviour.
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:
|
#
122348 |
|
09-Nov-2003 |
marcel |
Port truss(1) to 64-bit architectures: 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.
|
#
119852 |
|
07-Sep-2003 |
charnier |
Add FBSDID. Do not \n terminate warnx() argument. fprint() -> warnx().
|
#
106716 |
|
09-Nov-2002 |
marcel |
Port to ia64. It builds, but usability is very limited.
|
#
104581 |
|
06-Oct-2002 |
mike |
Don't depend on <signal.h> to include <sys/time.h>, instead include <sys/time.h> directly. This is mostly bogus since CLOCK_REALTIME should be defined in <time.h>, which these files already include.
|
#
101423 |
|
06-Aug-2002 |
mdodd |
- Use time.h not sys/time.h. - Fix printf format errors.
Submitted by: bde
|
#
101373 |
|
05-Aug-2002 |
mdodd |
Use timespec not timeval.
|
#
101320 |
|
04-Aug-2002 |
jake |
Ported to sparc64.
|
#
101309 |
|
04-Aug-2002 |
bde |
Include <sys/time.h> for the declaration of struct timeval. Do not depend on namespace pollution in <signal.h>. (truss shouldn't be using timevals anyway, since it was implemented long after timevals were obsoleted by timespecs.)
|
#
101289 |
|
04-Aug-2002 |
mdodd |
Add options to print the argument and environment string parameters to execve().
This could be done in a more general manner but it still wouldn't be very pretty.
MFC after: 3 weeks
|
#
101288 |
|
04-Aug-2002 |
mdodd |
Add a "FreeBSD ELF32" entry to ex_types[].
|
#
101285 |
|
03-Aug-2002 |
mdodd |
Add options to print absolute and relative timestamps.
PR: bin/25587 (in part) MFC after: 3 weeks
|
#
101283 |
|
03-Aug-2002 |
mdodd |
Allow tracking fork()ed children.
PR: bin/25587 (in part) MFC after: 3 weeks
|
#
101282 |
|
03-Aug-2002 |
mdodd |
Parameterize globals.
PR: bin/25587 (in part) MFC after: 3 weeks
|
#
100357 |
|
19-Jul-2002 |
markm |
s/inline/__inline/
|
#
96756 |
|
16-May-2002 |
peter |
OOPS! rev 1.16 accidently changed the default outfile from stderr to stdout. Unfortunately, DES mfc'ed this change in 1.15.2.1 (this part probably should not have been) so it is broken there too. truss is documented to use stderr, and other implementations use stderr.
Submitted by: Arne Dag Fidjestøl <adf@idi.ntnu.no>
|
#
90401 |
|
08-Feb-2002 |
des |
Fix the code that selects the default binary type if the actual type can't be determined.
PR: bin/34698 Submitted by: (in part) Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> MFC after: 1 weeks
|
#
87703 |
|
11-Dec-2001 |
markm |
Partial WARNS=1 fizes with NO_WERROR set to prevent world breakage. Use __FBSDID().
|
#
85317 |
|
22-Oct-2001 |
des |
Back out part of previous commit: remove #include <sys/proc.h>.
|
#
85301 |
|
22-Oct-2001 |
des |
#include <sys/proc.h> where needed (for the stop event definitions) and reorder includes everywhere to conform to style(9).
|
#
81608 |
|
13-Aug-2001 |
peter |
Initialize outfile in main()
|
#
55707 |
|
10-Jan-2000 |
sef |
Handle the case where we truss an SUGID program -- in particular, we need to wake up any processes waiting via PIOCWAIT on process exit, and truss needs to be more aware that a process may actually disappear while it's waiting.
Reviewed by: Paul Saab <ps@yahoo-inc.com>
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
41970 |
|
21-Dec-1998 |
msmith |
Flush the output file before exiting; short-lived programs don't even fill the stdio buffer.
|
#
39908 |
|
02-Oct-1998 |
sef |
Alpha support for truss. I tested this on both bento and beast (thanks, Jordan, for pointing me at beast!). There should be no change for the i386 version.
|
#
38897 |
|
07-Sep-1998 |
sef |
Use a default execution type if none of the listed ones match. This uses the first type listed in the array as the default type. This isn't perfect, but I thought it would be better than nothing.
|
#
38520 |
|
24-Aug-1998 |
cracauer |
When exiting on SIGINT, exit with signal status
|
#
37453 |
|
06-Jul-1998 |
bde |
Fixed printf format errors.
|
#
32306 |
|
07-Jan-1998 |
jmg |
include sys so it builds on 2.2.x also, fix misspelling of -1 (as EOF for getopt)
|
#
32275 |
|
05-Jan-1998 |
charnier |
Sort Xrefs. Use err(3). Remove uneeded #include. Correct usage: one of {-p pid, command} is required. Open output file when command line is fully analyzed: incorrect `truss -o f' command does not create an empty file anymore.
|
#
31899 |
|
20-Dec-1997 |
sef |
Add some copyright and license terms, at Jordan's request. Note that syscall.h just refers to another file for the copyright notice.
|
#
31691 |
|
13-Dec-1997 |
sef |
Change the ioctls for procfs around a bit; in particular, whever possible, change from
ioctl(fd, PIOC<foo>, &i);
to
ioctl(fd, PIOC<foo>, i);
This is going from the _IOW to _IO ioctl macro. The kernel, procctl, and truss must be in synch for it all to work (not doing so will get errors about inappropriate ioctl's, fortunately). Hopefully I didn't forget anything :).
|
#
31582 |
|
06-Dec-1997 |
sef |
Complain about empty command lines.
|
#
31580 |
|
06-Dec-1997 |
peter |
recognize "FreeBSD ELF" as an executable type close() takes a fd, not a char * :-)
|
#
31579 |
|
06-Dec-1997 |
peter |
#include <unistd.h> to get it to compile
Submitted by: Andreas Klemm <andreas@klemm.gtn.com>
|
#
31567 |
|
06-Dec-1997 |
sef |
Truss program. Requires procfs.
|