This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Break on syscall?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]