Break on syscall?
Daniel Jacobowitz
drow@false.org
Sun May 21 13:25:00 GMT 2006
On Fri, May 19, 2006 at 03:09:31PM -0700, PAUL GILLIAM wrote:
> > traditionally ptrace has no way to request a single step and stop if
> > entering a syscall, so you'd need an arch hook to detect it to handle
> > that case.
> From the ptrace(2) man page on Linux:
>
> PTRACE_SYSCALL, PTRACE_SINGLESTEP
That doesn't conflict with what I said. You can't issue PTRACE_SYSCALL
and PTRACE_SINGLESTEP at the same time.
> The 'ltrace' utility uses this to trace system calls. It uses a sleazy
> table (/etc/ltrace.cfg) to find out about their arguments... GDB should
> be able to do a much better job, although matching syscall numbers to
> their associated library routines would be a challenge (at least for me
> 8-)
GDB can do vastly better, but it's not a small project.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list