Re: [fusil] [PATCH] Add -i option for displaying the instruction pointer |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/fusil Archives
]
Hi,
Le Monday 26 January 2009 21:11:58 Mark Seaborn, vous avez écrit :
> Here's a patch to add the -i option that the regular strace supports.
Oh, cool, a new contribution to python-ptrace ;-)
> A minor problem is that it doesn't work on the exit_group() syscall.
I choosed to read the instruction pointer in PtraceSyscall instead of
strace.py directly.
> if self.options.show_pid:
> - text = "[%s] %s" % (syscall.process.pid, text)
> + text = "[pid %s] %s" % (syscall.process.pid, text)
> error(text)
Why did you add "pid " prefix? I prefer to keep a short prefix. So it now
looks like (show ip and pid):
[16166][0xffffe410] close(1) = 0
[16166][0xffffe410] munmap(0xb7ccb000, 4096) = 0
[16166][0xffffe410] exit_group(0)
or (show only pid)
[16172] close(1) = 0
[16172] munmap(0xb7cc9000, 4096) = 0
[16172] exit_group(0)
or (show only ip)
[0xffffe410] close(1) = 0
[0xffffe410] munmap(0xb7bf2000, 4096) = 0
[0xffffe410] exit_group(0)
Thanks for your contribution. I added your name to the AUTHORS.
--
Victor Stinner aka haypo
http://www.haypocalc.com/blog/