cosmopolitan/libc/runtime
Justine Tunney 14e192e5ba Introduce --strace flag for system call tracing
This is similar to the --ftrace (c function call trace) flag, except
it's less noisy since it only logs system calls to stderr. Having this
flag is valuable because (1) system call tracing tells us a lot about
the behavior of complex programs and (2) it's usually very hard to get
system call tracing on various operating systems, e.g. strace, ktrace,
dtruss, truss, nttrace, etc. Especially on Apple platforms where even
with the special boot trick, debuggers still aren't guaranteed to work.

    make -j8 o//examples
    o//examples/hello.com --strace

This is enabled by default in MODE=, MODE=opt, and MODE=dbg. In MODE=dbg
extra information will be printed.

    make -j8 MODE=dbg o/dbg/examples
    o/dbg/examples/hello.com --strace |& less

This change also changes:

- Rename IsText() → _istext()
- Rename IsUtf8() → _isutf8()
- Fix madvise() on Windows NT
- Fix empty string case of inet_ntop()
- vfork() wrapper now saves and restores errno
- Update xsigaction() to yoink syscall support
2022-03-18 18:07:28 -07:00
..
abort-nt.c Improve memory safety 2021-10-13 17:27:13 -07:00
abort.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
arch_prctl.c Change noinline to dontinline (#312) 2021-11-12 15:12:18 -08:00
arememoryintervalsok.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
brk.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
buffer.h Initial import 2020-06-15 07:18:57 -07:00
clearenv.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
clktck.c Change noinline to dontinline (#312) 2021-11-12 15:12:18 -08:00
clktck.h Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
clone.c Improve system call support 2021-08-25 21:36:17 -07:00
close_s.c Change license 2020-12-27 17:18:44 -08:00
closesymboltable.c Make numerous improvements 2021-09-28 01:52:34 -07:00
construct.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
cosmo.S Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
cxaatexit.internal.h Improve memory safety 2021-10-13 17:27:13 -07:00
directmap.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
dlfcn.h Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
dsohandle.S Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
e820.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
efimain.greg.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
exit.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
exit2.c Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
ezmap.c Make numerous improvements 2021-09-28 01:52:34 -07:00
ezmap.internal.h Improve documentation 2020-12-27 07:02:35 -08:00
fegetround.c Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
fenv.c Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
fenv.h Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
fesetround.c Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
findcombinary.c Improve ZIP filesystem and change its prefix 2021-08-22 01:11:53 -07:00
finddebugbinary.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
fltrounds.c Fix issues revealed by ECMAScript test262 2021-04-10 17:15:35 -07:00
fork-nt.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
fork.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
fpreset.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
free_s.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
ftrace-hook.S Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
ftraceinit.greg.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
ftracer.c Make improvements 2022-03-16 13:40:10 -07:00
gc.h Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
gc.internal.h Fix regression in _gclongjmp() 2021-08-19 09:34:24 -07:00
getcpucount.c Get more Python tests passing (#141) 2021-08-16 15:26:31 -07:00
getdosargv.c Make improvements 2022-03-16 13:40:10 -07:00
getdosenviron.c Make improvements 2022-03-16 13:40:10 -07:00
getinterpreterexecutablename.c Make improvements 2022-03-16 13:40:10 -07:00
getmaxfd.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
getpagesize.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
getresourcelimit.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
getsymbol.c Improve memory safety 2021-10-13 17:27:13 -07:00
getsymbolname.c Improve memory safety 2021-10-13 17:27:13 -07:00
grow.c Make numerous improvements 2021-09-28 01:52:34 -07:00
hook.greg.c Make fixes, improvements, and chibicc python bindings 2021-10-08 08:41:57 -07:00
init.S Add ASAN guards to some asm data structures 2022-03-18 13:02:57 -07:00
interceptflag.greg.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
internal.h Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
interruptiblecall.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
interruptiblecall.h Initial import 2020-06-15 07:18:57 -07:00
isheap.c Improve memory safety 2021-10-13 17:27:13 -07:00
issetugid.c Change license 2020-12-27 17:18:44 -08:00
jmpstack.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
ldso.c Get Fabrice Bellard's JavaScript engine to build 2021-04-09 01:06:57 -07:00
mapanon.c Improve memory safety 2021-10-13 17:27:13 -07:00
mapelfread.c Change license 2020-12-27 17:18:44 -08:00
memtrack.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
memtrack.internal.h Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
memtracknt.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
metalprintf.greg.c Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
metalprintf.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
mman.internal.h Support malloc() on bare metal 2021-02-24 00:53:24 -08:00
mmap.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
mmi.c Make mappings unlimited on NT 2021-09-04 13:20:47 -07:00
mmi.init.S Make mappings unlimited on NT 2021-09-04 13:20:47 -07:00
mremap.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
msync-nt.c Make numerous improvements 2021-09-28 01:52:34 -07:00
msync.c Make redbean StoreAsset() work better 2021-05-14 05:44:37 -07:00
munmap.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
openexecutable.S Fix Redbean when file is read-only (#365) 2022-03-14 17:13:28 -07:00
opensymboltable.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
pc.internal.h Improve signal handling and math 2021-02-25 18:33:33 -08:00
peekall.S Add MODE=optlinux build mode (#141) 2021-10-14 19:36:49 -07:00
printargs.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
printmemoryintervals.c Make improvements 2022-03-16 13:40:10 -07:00
progname.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
program_invocation_short_name.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
pthread.c Work towards improving signals and processes 2021-01-27 19:34:02 -08:00
runtime.h Make improvements 2022-03-16 13:40:10 -07:00
runtime.mk Apply fixes and speedups 2021-10-04 03:23:31 -07:00
setstack.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
stack.h Make improvements 2022-03-16 13:40:10 -07:00
stackchkfail.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
stackchkfaillocal.c Change license 2020-12-27 17:18:44 -08:00
stackuse.c Improve memory safety 2021-10-13 17:27:13 -07:00
straceinit.greg.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
symbolic.h wip on intellisense (again) 2021-02-02 11:14:45 -05:00
symbols.internal.h Improve memory safety 2021-10-13 17:27:13 -07:00
sysconf.c Improve Libc by making Python work even better 2021-08-18 22:16:23 -07:00
sysconf.h Fix a few more Python tests 2021-08-16 23:47:47 -07:00
untrackmemoryintervals.c Make mappings unlimited on NT 2021-09-04 13:20:47 -07:00
valist.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
valist.h Further refine documentation 2020-12-27 17:05:03 -08:00
vfork.S Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
weakfree.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
winmain.greg.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00