]> granicus.if.org Git - strace/commit
Delay get_regs invocation
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Apr 2017 04:04:37 +0000 (04:04 +0000)
commitcb46fea4d5dbf3b4cf92cb8f6ce1e691cf28b171
tree07c00c4d4e79b58159de09ed36c5a18597436a1b
parent8e3361d39c7dbfa3af7bfb4904a80557d2a739b1
Delay get_regs invocation

strace used to call get_regs on every stop of a tracee, including cases
when the result is going to be discarded.  Prepare to change this lavish
practice by delaying get_regs invocation until its result is actually
needed.

* defs.h (get_regs): Remove.
* strace.c (trace): Do not call get_regs.
* syscall.c (get_regs): Add static qualifier.
(trace_syscall_exiting, print_pc, get_scno): Call get_regs.
defs.h
strace.c
syscall.c