cosmopolitan/libc/mem
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
..
cxx Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
hook Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
aligned_alloc.c Improve memory safety 2021-10-13 17:27:13 -07:00
alloca.h Initial import 2020-06-15 07:18:57 -07:00
arena.c Change noinline to dontinline (#312) 2021-11-12 15:12:18 -08:00
arena.h Make fixes, improvements, and chibicc python bindings 2021-10-08 08:41:57 -07:00
asprintf.c Make Cosmopolitan ANSI C89 compatible 2021-02-03 17:48:59 -08:00
balloc.c Improve memory safety 2021-10-13 17:27:13 -07:00
bfree.c Change license 2020-12-27 17:18:44 -08:00
bulk_free.S Make fixes, improvements, and chibicc python bindings 2021-10-08 08:41:57 -07:00
calloc.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
defer.greg.c Improve memory safety 2021-10-13 17:27:13 -07:00
fmt.h Make Cosmopolitan ANSI C89 compatible 2021-02-03 17:48:59 -08:00
free.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
gc.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
get_current_dir_name.c Improve ZIP filesystem and change its prefix 2021-08-22 01:11:53 -07:00
internal.h Improve memory safety 2021-10-13 17:27:13 -07:00
malloc.S Improve memory safety 2021-10-13 17:27:13 -07:00
malloc_trim.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
malloc_usable_size.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
mem.h Improve memory safety 2021-10-13 17:27:13 -07:00
mem.mk Fix link order in cosmopolitan.a 2021-01-16 12:05:41 -08:00
memalign.S Improve memory safety 2021-10-13 17:27:13 -07:00
posix_memalign.c Improve memory safety 2021-10-13 17:27:13 -07:00
putenv.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
pvalloc.c Improve memory safety 2021-10-13 17:27:13 -07:00
realloc.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
realloc_in_place.S Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
reallocarray.c Make major improvements to redbean and libraries 2021-04-18 12:34:15 -07:00
setenv.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
strdup.c Change license 2020-12-27 17:18:44 -08:00
strndup.c Change license 2020-12-27 17:18:44 -08:00
unhexstr.c Improve memory safety 2021-10-13 17:27:13 -07:00
valloc.c Improve memory safety 2021-10-13 17:27:13 -07:00
vasprintf.c Improve performance of printf functions 2021-04-24 13:58:50 -07:00
wcsdup.c Change license 2020-12-27 17:18:44 -08:00