Commit Graph

40 Commits

Author SHA1 Message Date
Denys Vlasenko
711b17c44b Another manpage tweak
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 15:40:13 +02:00
Denys Vlasenko
b5370530d5 Manpage update
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 15:35:16 +02:00
e8ff4c6f86 Do not suppress signal delivery messages with -qq
Current implementation of -qq does not allow suppressing exit status
messages without suppressing signal delivery messages, which is not
good.  There is a traditional "-e signal=none" syntax that can be used
to suppress all signal delivery messages.
This partially reverts commit v4.7-222-g01997cf.

* strace.c (trace): Do not suppress signal delivery messages with -qq.
* strace.1: Update documentation about -qq option.
2013-05-28 21:49:16 +00:00
Daniel P. Berrange
01997cf32d Allow -q to be repeated for very quiet output
Even with the -q flag specified, tracing output is still mixed
with messages about signals and process exit status, which is
often irrelevant.  Allow the -q option to be repeated to force
the suppression of signals / exit status info too.

* defs.h: Change 'qflag' from 'bool' to 'unsigned int'.
* strace.1: Document ability to repeat '-q' option.
* strace.c: Allow '-q' to be repeated to quieten process
exit status and signal messages.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-05-13 14:11:31 +00:00
Denys Vlasenko
7239dbcf2d Use dynamically-sized selected[] array for -P PATH
While at it, added a small optimization of not remembering
the path twice if it happens to be the same.

   text	   data	    bss	    dec	    hex	filename
 245111	    680	  10860	 256651	  3ea8b	strace_old
 245075	    680	   9804	 255559	  3e647	strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 15:46:34 +01:00
Denys Vlasenko
22efaf0028 Make -b take SYSCALL param, document it in --help and in manpage.
To not waste an option letter for just one trick,
extend -b to take a parameter:
"on which syscalls do you want to detach?".
Currently supports only execve.

While at it, fixed (by removing non-Linux and stale info)
and extended manpage text about -f.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-27 12:15:19 +01:00
Namhyung Kim
9679296d56 Add -e trace=memory option
Add a new 'memory' category for tracing memory mapping related syscalls.

Affected syscalls are: break, brk, get_mempolicy, madvise, mbind,
migrate_pages, mincore, mlock, mlockall, mmap, move_pages, mprotect,
mremap, msync, munlock, munlockall, munmap, remap_file_pages, and
set_mempolicy.

* defs.h (TRACE_MEMORY): New macro.
* syscall.c (lookup_class): Handle trace=memory option.
* strace.1: Document it.
* linux/alpha/syscallent.h: Add TM flag to memory mapping related syscalls.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/tile/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
2012-10-26 22:45:08 +00:00
Denys Vlasenko
94f00e62b4 manpage: remove false info about -p being limited to 32 processes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-26 13:31:11 +02:00
Denys Vlasenko
c5ccfa450b Tweak help text and manpage (added -In to manpage)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-26 13:10:50 +02:00
Denys Vlasenko
a6d91ded3f Tidy up includes and copyright notices, fix indentation
The files not mentioned in changelog below had only
copyright notices fixes and indentation fixes.

* defs.h: Include <stdint.h> and <inttypes.h>.
* file.c: Do not include <inttypes.h>.
Move struct kernel_dirent declaration below top include block.
* block.c: Do not include <stdint.h> and <inttypes.h>.
* quota.c: Likewise.
* desc.c: Likewise.
* signal.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-16 12:02:22 +01:00
Denys Vlasenko
7c2b1a6dd0 manpage: remove bugs which are fixed
"A traced process ignores SIGSTOP" - fixed, expected to be in linux-3.4.x.
"A traced process which tries to block SIGTRAP will be sent a SIGSTOP
in an attempt to force continuation of tracing." - not needed
and no longer done.
"On Linux, exciting as it would be, tracing the init process is forbidden"
- not true anymore.
"When a traced process receives a SIGTRAP signal not
associated with tracing, strace will not report that signal correctly."
- not true anymore.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 17:32:56 +01:00
Denys Vlasenko
6bc050cc54 Make manpage mention that -p "pidof PROG" works
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-13 11:48:22 +01:00
dd762c302d Remove and update documentation
This change is a verbatim part of Dmitry's changes to remove support
for non-Linux architectures.

* PORTING: Deleted.
* INSTALL: Modified.
* README: Modified.
* strace.1: Modified: bugs should be reported to mailing list, not Debian.
* strace.spec: do not install PORTING file.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 15:29:21 +01:00
Denys Vlasenko
5afdf12572 Manual removal of non-Linux source, documentation, etc.
Remove non-Linux source directories: freebsd/, svr4/, sunos4/, svr4/.
Remove README-freebsd, README-sunos4, README-svr4, m4/procfs.m4.

linux/sparc/{errnoent1,ioctlent1,signalent1}.h used to point to svr4/ files -
replace their contents with copies of used (and now deleted) files.
Make linux/sparc64/{errnoent1,ioctlent1,signalent1}.h include these files
instead of svr4/* ones.

Makefile.am: remove references to deleted files.
configure.ac: Remove a few tests which make no sense on Linux.
Man page: remove non-Linux quirks information.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:30:32 +01:00
9b3eb84a85 strace.1: fix a typo
* strace.1: Fix a typo in example description.
This fixes Debian bug #653309.
2012-02-22 00:29:44 +00:00
Grant Edwards
8a08277d13 Add ability to print file descriptor paths and filter by those paths
* pathtrace.c: New file, implements matching syscall arguments to
user-specified file paths.
* Makefile.am (strace_SOURCES): Add pathtrace.c.
* defs.h (TCB_FILTERED, filtered): New defines.
(getfdpath, pathtrace_select, pathtrace_match, show_fd_path,
tracing_paths): New declarations.
* strace.c (show_fd_path, tracing_paths): New global variables.
(usage, main): Implement handling of -y and -P options.
* strace.1: Add descriptions of -y and -P options.
* syscall.c (trace_syscall_entering): Add path matching logic to the
print/noprint decision and set the TCB_FILTERED bit appropriately.
(trace_syscall_exiting): Use filtered() macro that checks the
TCB_FILTERED bit to determine print/noprint status.
* util.c (printfd): Use getfdpath().
2011-04-08 20:47:56 +00:00
1c3031b1f0 strace.1: fix misleading italics
* strace.1: Use bold instead of italics for "-e trace=" keywords.
This fixes Debian bug #589323.
2011-01-14 17:17:20 +00:00
Andreas Schwab
b87d30c785 Document -C/-D
* strace.c (usage): Document -C.
* strace.1: Document -D.
2010-06-24 17:14:01 +02:00
a7835e631a * strace.1: Fix quoting of hyphens and formatting of strace options. 2010-04-07 10:19:26 +00:00
e3a7ef5a2a Implement -C option to combine regular and -c output
* defs.h (cflag_t): New enum.
* strace.1: Document -C option.
* strace.c (cflag): Update type.
(main): Handle -C option.
(trace): Update use of cflag.
* count.c (count_syscall): Move clearing of TCB_INSYSCALL to ...
* syscall.c (trace_syscall): ... here.  Update use of cflag.
Based on patch by Adrien Kunysz.
2010-04-07 10:19:26 +00:00
Roland McGrath
a09353acc6 2008-12-09 Roland McGrath <roland@redhat.com>
* strace.1 (DIAGNOSTICS): New section, describe exit behavior.
2008-12-10 06:09:29 +00:00
Denys Vlasenko
28e81da91c manpage: document new feature of propagating exit code/signal death status. 2008-12-09 14:15:56 +00:00
Jan Kratochvil
14256a7d26 2008-09-12 Tomas Pospisek <tpo@sourcepole.ch>
Jan Kratochvil  <jan.kratochvil@redhat.com>

	* strace.1 (DESCRIPTION): New description of unfinished system calls
	and system calls restarting.
2008-09-12 08:44:30 +00:00
Roland McGrath
98a3ecfa99 2008-08-28 Roland McGrath <roland@redhat.com>
* strace.1 (BUGS): New section, mention SIGTRAP interference.
2008-08-28 23:41:57 +00:00
Roland McGrath
41c48227a8 2008-07-03 Jan Kratochvil <jan.kratochvil@redhat.com>
Trace even VFORK on -f on all the platforms.
	* strace.1 <-f>: Describe Linux catches new children immediately.
	<-F>: Make the option obsolete.  Move the SunOS VFORK comment to the
	`-f' option description.
	* defs.h (followvfork): Declaration removed.
	* strace.c (followvfork): Variable removed.
	(main) <-F>: Merge with the `-f' option.
	(trace): Make !FOLLOWVFORK unconditional.
	* process.c (internal_fork): Make !FOLLOWVFORK unconditional.
2008-07-18 00:25:10 +00:00
Roland McGrath
cb9def6975 2006-04-25 Roland McGrath <roland@redhat.com>
* strace.c (main): Fail when -c is given with -ff.
	* strace.1: Note their incompatibility.
	Fixes RH#187847.
2006-04-25 07:48:03 +00:00
Roland McGrath
7f7f436b77 2005-08-08 Dmitry V. Levin <ldv@altlinux.org>
* strace.1: Update "SEE ALSO" links to reference to valid
	manpages.
	Patch from Michail Litvak <mci@owl.openwall.com>.
	Fixes RH#165375.
2005-12-02 03:59:35 +00:00
Roland McGrath
2fe7b13b2f 2005-06-08 Dmitry V. Levin <ldv@altlinux.org>
Introduce "-e trace=desc".
	* defs.h (TRACE_DESC): New flag.
	* syscall.c: Define TD macro before include of syscallent files
	and undefine it afterwards.
	(lookup_class): Recognize "desc" keyword.
	* strace.1: Document "-e trace=desc".
	* freebsd/i386/syscallent.h: Mark those syscalls which take a
	file descriptor as an argument or return a file descriptor with
	TD flag.
	* linux/alpha/syscallent.h: Likewise.
	* linux/hppa/syscallent.h: Likewise.
	* linux/ia64/syscallent.h: Likewise.
	* linux/mips/syscallent.h: Likewise.
	* linux/powerpc/syscallent.h: Likewise.
	* linux/s390/syscallent.h: Likewise.
	* linux/s390x/syscallent.h: Likewise.
	* linux/sh/syscallent.h: Likewise.
	* linux/sh64/syscallent.h: Likewise.
	* linux/sparc/syscallent.h: Likewise.
	* linux/sparc64/syscallent2.h: Likewise.
	* linux/sparc64/syscallent.h: Likewise.
	* linux/syscallent.h: Likewise.
	* linux/x86_64/syscallent.h: Likewise.
	* sunos4/syscallent.h: Likewise.
	* svr4/syscallent.h: Likewise.
	Fixes RH#159400.
2005-07-05 03:25:35 +00:00
Roland McGrath
4de04aa70f 2004-08-31 Roland McGrath <roland@redhat.com>
* strace.1: Say that -c shows system CPU time, not real time.
	Fixes Debian bug #254438.
2004-08-31 07:47:47 +00:00
Roland McGrath
3766a56ee7 2004-01-13 Roland McGrath <roland@redhat.com>
* strace.1: Remove comment about vfork on Linux.
	Fixes Debian bug #223390.
2004-01-13 09:59:55 +00:00
Roland McGrath
0411b40c2f 2003-10-21 Roland McGrath <roland@redhat.com>
* strace.1: Fixed a few spelling errors.
2003-10-22 06:16:32 +00:00
Roland McGrath
4417fda9ba 2003-01-21 Roland McGrath <roland@redhat.com>
* strace.c (main): Grok new option `-E var=val' or `-E var' to put
	var=val in environ or to remove var, respectively.
	(usage): Mention it.
	* strace.1, NEWS: Document it.
2003-01-24 04:31:20 +00:00
Roland McGrath
4a9b49a96f 2003-01-14 Roland McGrath <roland@redhat.com>
* strace.1: Update bug reporting info.
2003-01-14 23:40:55 +00:00
Wichert Akkerman
4dc8a2aec6 Bunch of stuff 1999-12-23 14:20:14 +00:00
Wichert Akkerman
8dc9a1a3c5 Update versionnumber to 4.0 1999-07-09 14:08:14 +00:00
Wichert Akkerman
8829a55dc2 Various fixes, see ChangeLog for details 1999-06-11 13:18:40 +00:00
Wichert Akkerman
f9d3dcbea2 Update maintainer name in manpage 1999-05-15 00:29:13 +00:00
Nate Sammons
b4aa1139eb Fix a couple of typos in the man page. 1999-03-31 05:59:04 +00:00
Nate Sammons
ccd8f21626 Add capability for Linux to change a vfork call into plain fork, which
can be followed.  (Requires a kernel patch for now.)  Also document it.
1999-03-29 22:57:54 +00:00
Wichert Akkerman
76baf7c9f6 Initial revision 1999-02-19 00:21:36 +00:00