| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
By instruction, a dynamic program's loader and C library start are a
million moments nobody watches: the list of anim/tools from main to its
exit is 3 743.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An instruction's string carries its source line and, for a direct call,
how many parameters the callee takes (DWARF); telescope.frames gives each
frame's extent on the stack; with --alloc the debugger watches each live
allocation and the allocator's header before it, changes only, 256 KiB a
stop at most. C++ names are shown and found as the source has them (the
command links the C++ runtime for its demangler).
SQLite 3.50.4 through every backend, measured (README, bench/sqlite.sh).
It found two faults: a file compiled by its full path was recorded under
a path joined onto the compile directory, and ztrace run noticed a
target's exit up to 10 ms late.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a viewer to show what pwndbg's context shows, the debugger records it
while the memory is there: each register and the top of the stack followed
as pointers three deep (--telescope), every code address met named, eight
instructions from the pc disassembled by capstone (built from source for
x86, into the command only; pinned as in 03-codenomicom). zt.telescope
reads a chain back with the kind of memory each link points into, and
ztrace show prints the context, coloured on a terminal as pwndbg colours.
The thirty thousand strings of a small run showed that a string map in
each keyframe costs 700 bytes of tree a string: strings are now one table
for the recording, appended a batch and read whole at open. fib(12) by
instruction with everything on: 9 MB, 71 000 moments/s.
|
| |
|
|
|
|
|
|
|
| |
Debugger.usdt arms the USDT probes of every mapped module as breakpoints
whose hook records a probe event with its arguments and lets the program
run on, raising a probe's semaphore first; record and dbg take
usdt:PROVIDER:NAME (* for any), running the loader through when the probe
is a library's. glibc's own 78 probes are there for the asking:
memory_sbrk_more shows malloc growing the heap.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ztrace record and dbg take --ring, --preload and --alloc: the target gets
the ring ztrace run gives it, and the debugger drains it while the target
runs (polling for the stop, so a full ring cannot hold both) and before it
reports a stop. A program compiled by ztrace cc, with the agent preloaded,
stopped at breakpoints, is one recording in order; test-together checks it.
Recording such a program showed the debugger's file names and the pass's
strings both counted from 1: event.stringId (a hash, top bit set) is now
what every producer without a table of its own uses.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
threads; ztrace dbg
ptrace.zig follows the threads a target makes, attaches, tells a step from
a breakpoint, and writes memory in one call (through /proc/pid/mem where
the page is read-only). Debugger.zig is the layer above: cont, stepi, step
(a source line, through std.debug's DWARF), breakpoints with hooks, syscall
stops and hooks with the path or buffer captured, watched regions sent as
the words that changed, and every stop an event. Symbols.zig is modules,
ELF symbols and line tables; syscalls.zig their names and shapes.
ztrace dbg is a small REPL on it that records as it goes and looks back
into the recording; ztrace record stops by instruction, line, syscall or
breakpoint, prints syscalls as strace does, and ends cleanly when the
recording is full.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
|
|
One 64-byte Event for every backend; a shared-memory ring from target to
tracer with stop/resume; a Recorder that folds events into xitdb moments
(registers, memory in 64-byte chunks with known-byte masks, strings) and a
Trace that reads any moment back; a minimal ptrace Process; ztrace record,
run and dump. Per-area build files so the areas grow apart.
|