Add Linux ptrace() tutorial

This commit is contained in:
Justine Tunney 2022-03-24 08:00:21 -07:00
parent 98909b1391
commit 3b9e66ecba
14 changed files with 1290 additions and 23 deletions

View file

@ -98,7 +98,7 @@ void(vflogf)(unsigned level, const char *file, int line, FILE *f,
prog = basename(program_invocation_name);
bufmode = f->bufmode;
if (bufmode == _IOLBF) f->bufmode = _IOFBF;
if ((fprintf)(f, "%c%s%06ld:%s:%d:%.*s:%d] ", "FEWIVDNT"[level & 7], buf32,
if ((fprintf)(f, "%r%c%s%06ld:%s:%d:%.*s:%d] ", "FEWIVDNT"[level & 7], buf32,
rem1000000int64(div1000int64(dots)), file, line,
strchrnul(prog, '.') - prog, prog, getpid()) <= 0) {
vflogf_onfail(f);