Please sign in to comment.
Add -k option to print stack trace after each syscall
Print the stack trace of the traced process after each system call when -k option is specified. It is implemented using libunwind to unwind the stack and to obtain the function name pointed by the IP. Based on the code that was originally taken from strace-plus of Philip J. Guo. * configure.ac: Add --with-libunwind option. Check libunwind support. * Makefile.am: Add libunwind support. * defs.h (struct tcb) [USE_LIBUNWIND]: Append libunwind specific fields. [USE_LIBUNWIND] (stack_trace_enabled, alloc_mmap_cache, delete_mmap_cache, print_stacktrace): New prototypes. * mem.c (print_mmap, sys_munmap, sys_mprotect): Add libunwind support. * process.c (sys_execve): Likewise. * strace.c (usage, alloctcb, droptcb, init): Likewise. * syscall.c (trace_syscall_exiting): Likewise. * unwind.c: New file. * strace.1: Document -k option.
- Loading branch information...
Showing with 465 additions and 1 deletion.
Oops, something went wrong.