| Commit message (Collapse) | Author | Age |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a disassembly that points at the stack word it touched. The stack's
own instructions have touches (push, call and enter write at rsp-8; pop
and ret read at rsp; leave at rbp), and a rep string instruction its
whole range. An address a global or static object holds is named
(head+0, libc.so.6!main_arena+96). The saved rbp has its role at the
push that makes it; every local in a shared word is given; the stack
protector's copy is found by seeing its store; ztrace show labels each
stack word. Six bytes a moment and 3% slower on the list by instruction.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The system glibc stays dynamically linked and is symbolized from the
debug file in the debuginfod client's cache or under /usr/lib/debug,
used only when its own build id equals the mapped library's; nothing is
downloaded. Static functions get names (the loader's resolver is
_dl_runtime_resolve_xsavec; main_arena is found by symbol), libc's
frames their file and line as the build saw them, and locals, blocks and
parameter counts follow. A recording says of each module its build id
and where its names came from; ztrace show prints it. Read only when an
address in the module needs a name: 44 ms and 25 MB at the first one.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
run through
For a disassembly that follows a call into libc. A stub is open@plt and a
slot open@got, from the relocations (libc's own, IFUNC and nameless, by
the function they resolve to); telescope.got says what a slot holds and
whether it is still lazy. A library function's entry is named even when
its mapping was not known yet, by the alias the program imports. The
chain holds through the stub's jump, the callee's first instruction, the
syscall and the loader's resolver: ld.so's unwind section lacks the entry
that ends it, which lost every frame there. A syscall is tied to its
instruction's moment, and each frame's call is recorded with the row
before it. Stepped by instruction, a call into the vDSO is one moment and
its return the next: its clock loop, single-stepped, made three million
moments of three reads.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
backtrace and frames follow .debug_frame or .eh_frame where there is
one (PLT entries expanded into exact rows) and the frame pointer where
there is none: the caller is no longer lost in a prologue, in a function
that keeps no frame, in a PLT entry or inside libc's syscall wrappers.
Against gdb: the same chains on fib and on SQLite, where the old walk
lost __sbrk and unixSync.
A recording holds, once a function, its unwind rows and its locals on
the stack (DW_OP_fbreg, with the block each lives in), and the process's
first stack pointer. telescope.slots says of each word what it is: a
saved register and which, a return address, a local by name, argc, argv,
envp, auxv. Four bytes a moment on the list by instruction, and no
slower.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
|
| |
|
|
|
|
|
| |
It was the address in the file, which in a program that is not relocated
is the address again: list!402c89 for 402c89. Now list+2c89.
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.
|
|
|
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]>
|