Commit Graph

53 Commits

Author SHA1 Message Date
sommerfeld d4ddc11a83 Two tweaks:
- For cleaner subprocess traces, malloc something before
spawning, so the syscalls malloc does while initializing don't gunk up
the trace.
	- Increase pipe buffer sizes.
2000-05-27 00:45:37 +00:00
itohy 0af9894f2f [ktruss] Use fork(2), not vfork(2).
The child process of do_ktrace() does return and the stack is
changed by another function call (execvp()).
By using vfork() (my previous change), the execution of the parent
process resumes on the modified stack.  Oops.
We could use vfork() carefully, but for now use fork().

Problem reported and investigated by Ethan Solomita <ethan@geocast.com>.
Thanks.
2000-04-13 01:27:53 +00:00
jdolecek 0cdfde1cbc DTRT vs setemul() (for ktruss, similar to kdump.c) 2000-04-10 09:32:03 +00:00
jdolecek 103633896f remove prototype for setemul(), it's in kdump/setemul.h now 2000-04-10 09:30:26 +00:00
jdolecek 646b216e52 add description for -e argument (for ktruss) 2000-04-10 08:11:01 +00:00
jdolecek 84c8f8889f update to setemul() changes 2000-04-10 07:59:22 +00:00
itohy 2f4c0d5e74 Make ktrace(1) not affect interactions between processes.
Following examples show the cases.

    % ktrace -f - false >/dev/null && echo wrong
    wrong
    % ktrace -f - -i /usr/sbin/update >/dev/null
    (does not return to command line)

That is, back out last change and restore the roles of parent/child for
ktrace(1).  The ktruss(1) stuff still remains.
Yes, ktruss(1) has the problems.  Better implementation is expected.
1999-10-29 09:11:49 +00:00
darrenr c1f203f8b5 Change behaviour from running the command as the parent and ktrace/ktruss as
the child to be ktruss/ktrace is the parent.  This fixes a problem with ktruss
where the prompt would be returned in the middle of output.
1999-07-30 14:03:55 +00:00
enami 4191a1e6d4 - remove duplicated setting for LDSTATIC in ktruss/Makefile.
- fix command name in SYNOPSIS section of man page.
- link ktrace man page to ktruss man page.
- add executable and man page for ktruss in distrib sets.
1999-07-28 01:56:03 +00:00
itohy 99624b0b6d Fix fowllowing problems:
1. If fork()ing, the program is executed twice.
2. If the ktruss(1) output is bufferd, the final output is not flushed
   (because it is executing).

    % ktrace -f - rm >/dev/null
    usage: rm [-dfiPRrW] file ...
    usage: rm [-dfiPRrW] file ...
    % ktruss date | cat
    Fri Jul 23 12:09:45 JST 1999
    Fri Jul 23 12:09:46 JST 1999
    %
1999-07-23 03:10:49 +00:00
darrenr b7eb8dab03 include comments for ktruss 1999-07-12 03:24:58 +00:00
garbled 9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
kleink 3ed4fcf61e In userland, pull in <errno.h> instead of <sys/errno.h> for the declaration
of errno.
1999-01-11 22:39:59 +00:00
nathanw 3cc8349a71 Make "ktrace -f" work again. Slightly klugy because of the
#ifdef's for KTRUSS.
1998-07-14 01:39:59 +00:00
christos 9ec832e055 Appease gcc on arm32 1998-06-27 21:37:50 +00:00
christos 7bc28d2954 fktrace support / ktruss additions. 1998-06-27 21:24:22 +00:00
nathanw 3dbc029932 Sync to reality; add missing tracepoint options. 1998-06-27 04:21:54 +00:00
nathanw 21ae5a9db0 Make "ktrace -c" work as documented.
Update usage message to match reality.

Closes PR bin/5358.
1998-06-27 04:20:59 +00:00
cgd 8aaf609a0a allow LDSTATIC definition to be overridden by bsd.own.mk/mk.conf 1998-03-02 19:42:25 +00:00
lukem d6dfc8e2db fix up .Nm usage 1997-10-19 03:40:03 +00:00
lukem 50acd78e45 don't define WARNS=1 here 1997-10-19 03:39:50 +00:00
mikel 89d7a04e6c set WARNS?=1, cleanup 1997-07-23 05:44:09 +00:00
mikel 463fe05164 add explicit return types and prototypes for local functions
use __COPYRIGHT and __RCSID macros, fix other gcc -Wall warnings
1997-07-23 05:42:55 +00:00
mikel ecebe74498 provide explicit return type for getpoints(), use __RCSID macro 1997-07-23 05:40:20 +00:00
mikel de46de4c67 nuke duplicate RCSid, prototype getpoints() 1997-07-23 05:37:59 +00:00
mikel 54bb32d1c5 nuke duplicate RCSid 1997-07-23 05:36:34 +00:00
cjs c2f4b90a72 PR 3666 from Thorsten Frueauf <frueauf@ira.uka.de>
Fix formatting.
1997-05-25 03:52:45 +00:00
mikel 7eb775bf99 fix typo; from Saitoh Masanobu in PR misc/3195. 1997-02-07 03:27:22 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
jtc 9cffeee5b2 Sync with 4.4lite2 1995-08-31 22:50:22 +00:00
christos 7e8c6bf13c Add support for displaying and switching between
different OS system call emulations
1995-07-19 15:11:19 +00:00
mycroft e60255f2bc Update to use timer{add,sub}(). 1995-03-21 14:16:23 +00:00
glass 7e8a9d0d4c some knf 1995-01-03 07:06:42 +00:00
glass 58695b5fdb reapplied patch that made ktrace behave well when kernel subsystem wasn't
installed.
some KNFing.
fixes PR 663 as reported by muir@idiom.com
1995-01-03 07:04:18 +00:00
deraadt f45b220870 Link these statically to make shared library debugging easier 1994-12-06 14:54:50 +00:00
mycroft 2fd4512058 Add RCS ids. 1994-10-06 15:44:32 +00:00
mycroft a2d6c76c41 Clean up deleted files. 1994-05-11 07:14:31 +00:00
cgd db906e7d79 clean up import 1994-05-11 07:14:29 +00:00
cgd 1142494822 updated ktrace 1994-05-11 07:10:43 +00:00
pk 54991d7c27 Adapt to changed <sys/ptrace.h> 1994-02-02 19:52:46 +00:00
deraadt 3416ce4d72 make bpf's BIO* ioctl's print nicely. from <Havard.Eidnes@runit.sintef.no> 1994-01-09 17:42:17 +00:00
mycroft 2f6c95dad5 Fix typo. 1994-01-07 14:46:15 +00:00
deraadt fc3bd9d7b3 change -I/sys to it's correct form. reported by <G.Michaelson@cc.uq.oz.au> 1994-01-07 12:35:30 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft c3e42d1c64 Add RCS indentifiers. 1993-08-01 07:22:47 +00:00
mycroft 690cae8181 Add RCS indentifiers. 1993-07-31 15:17:49 +00:00
mycroft 0387281928 Reverse a diff I included accidentally. 1993-06-22 17:42:25 +00:00
mycroft 74a4ef2554 Don't use absolute path for /sys; we -I/sys anyway. 1993-06-22 00:49:01 +00:00
cgd 78c0b207e0 give it an rcsid rather than an sccsid 1993-05-20 10:37:33 +00:00
cgd 95a80ce24f fix to allow multiple inclusion of sys/errno.h. whoever did this to begin
with was sick...
1993-04-26 01:36:53 +00:00