#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
241162 |
|
03-Oct-2012 |
zont |
MFC r239501: - Use pid_t type instead of just int.
MFC r239611: - Put arguments for print_syscall_ret() function in proper order. Bug was introduced in r192025.
MFC r239898: - Remove unused variables. - Fix warnings about comparing signed and unsigned ints.
MFC r240005: - Style(9) cleanup.
MFC r240364: - Remove unused variables. - Remove redundant return after err(3) call.
MFC r240393: - 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.
MFC r240562: - Make truss thread-aware.
Approved by: kib (mentor)
|
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
222103 |
|
19-May-2011 |
bcr |
Fix typos in comments, no functional changes.
Found by: codespell Reviewed by: alfred MFC after: 1 week
|
#
213799 |
|
13-Oct-2010 |
bcr |
s/sytem/system in comments, no functional changes.
Reviewed by: alfred@
|
#
204977 |
|
10-Mar-2010 |
imp |
Fix copyright spelling.
PR: 139825 Submitted by: Ruslan Mahmatkhanov
|
#
200780 |
|
21-Dec-2009 |
jh |
Remove non-working special case for pipe(2) from amd64-fbsd32.c and 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)
|
#
192943 |
|
27-May-2009 |
delphij |
Correct off-by-one issue in truss(1) which happens when system call number is nsyscalls.
PR: bin/134916 Submitted by: Steven Hartland <steven hartland multiplay co uk> MFC after: 2 weeks
|
#
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
|
#
171646 |
|
28-Jul-2007 |
marcel |
Fix handling of Quad-type arguments. Previously, syscalls 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)
|
#
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
|
#
160701 |
|
26-Jul-2006 |
delphij |
Make sure that the sc pointer gets initialized. No functional change should happen with this change.
|
#
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
|
#
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
|
#
133349 |
|
08-Aug-2004 |
alfred |
don't seg if the syscall is invalid for i386fbsd.
|
#
132308 |
|
17-Jul-2004 |
alfred |
Support readlink(2) better. Readlink does not nul terminate the 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.
|
#
124217 |
|
07-Jan-2004 |
dwmalone |
Move declarations of Procfd to a header file.
|
#
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.
|
#
111176 |
|
20-Feb-2003 |
ru |
Fixed comment.
|
#
106713 |
|
09-Nov-2002 |
dwmalone |
Various cleanups of truss: 1) Missing include. 2) Constness. 3) ANSIfication. 4) Avoid some shadowing. 5) Add/clarify some error messages. 6) Some int functions were using return without a value. 7) Mark some parameters as unused. 8) Cast a value we know is non-negative to a size_t before comparing.
|
#
101423 |
|
06-Aug-2002 |
mdodd |
- Use time.h not sys/time.h. - Fix printf format errors.
Submitted by: bde
|
#
101374 |
|
05-Aug-2002 |
mdodd |
Diff reduction.
|
#
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
|
#
101286 |
|
03-Aug-2002 |
mdodd |
Terminate the output line when a non-returning syscall is printed.
|
#
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/
|
#
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).
|
#
58224 |
|
18-Mar-2000 |
sef |
Change the output of truss to more closely resemble SysV's. (Yes, it really is much nicer looking.)
Submitted by: "Matthew N. Dodd" <winter@jurai.net>
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
37453 |
|
06-Jul-1998 |
bde |
Fixed printf format errors.
|
#
32367 |
|
09-Jan-1998 |
sef |
Revert the changes yet again, after some email from Bruce. Sorry.
|
#
32355 |
|
08-Jan-1998 |
sef |
Proper way to do the previous mis-commit. Still not quite right, because some header files (e.g., <err.h>) include <machine/something.h>, and this will not pick up the right header files, so it may be removed eventually anyway. But some people who are not willing to build the right way apparantly want this, so this is for them.
|
#
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.
|
#
31567 |
|
06-Dec-1997 |
sef |
Truss program. Requires procfs.
|