darling/Developer
Ariel Abreu 7fc8b6d04c
Many improvements for xtrace
The biggest improvement is the ability to log xtrace's output to a separate file for each thread. Jumbled output has been a big reason why xtrace is hard to use with multi-threaded programs, but this provides a nice optional solution to that problem. It doesn't come without its drawbacks, however: because xtrace has to open descriptors for the logfiles, it can affect program behavior, especially if the program sees the descriptors and decides to do something with them (like close them, which some programs do).

xtrace no longer buffers output on the stack (which could lead to stack overflows or truncated output). Actually, it doesn't buffer output at all anymore, which might be an issue (it means more potentially jumbled output when using the normal output method). If turns out to be a signifcant issue, we can re-add buffering in xtrace_log using a per-thread buffer rather than an on-stack one.

The kevent family of syscalls is now properly described! This means that those calls will now print much more useful output.

Also, to work around a stack overflow issue when running within signal handlers, xtrace now overrides the default sigstack with its own larger one. It's not apparent why xtrace is using so much stack space, but it seems like 16KiB is enough for now (rather than the default of 8KiB).

Executing the xtrace command with no arguments now produces a help message describing the various environment variables that can be used to modify xtrace's behavior.

Also, the simple printf family of functions in libsystem_kernel now support various argument sizes.

Finally, there's no reason to call the wrapper for `semaphore_signal_trap` in `bsdthread_terminate` (causing unnecessary xtrace output), so call our implementation directly instead.
2021-11-14 00:52:12 -05:00
..
Platforms/MacOSX.platform Many improvements for xtrace 2021-11-14 00:52:12 -05:00
Toolchains/XcodeDefault.xctoolchain Abstract Architecture Detection/Assignment 2020-09-27 18:54:06 -07:00
usr/bin Create developer directory 2018-06-03 16:56:56 -04:00
.gitignore Developer dir improvements (#411) 2018-08-19 20:14:21 -04:00
symlinks.sh Developer dir improvements (#411) 2018-08-19 20:14:21 -04:00
TODO.md Developer dir improvements 2018-07-29 13:20:02 -04:00