This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Break on syscall?
On Fri, May 19, 2006 at 11:16:15PM +0200, Mark Kettenis wrote:
> > Date: Fri, 19 May 2006 08:48:35 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> >
> > On Fri, May 19, 2006 at 11:15:30AM +0100, Alex Bennee wrote:
> > > Is it possible to get gdb to break on entering/exiting a syscall (rather
> > > than breaking on entering libc or some such)?
> >
> > This is not supported.
>
> But I think it would be nice if we would support something like "catch
> syscall", just like we support "catch fork".
Yes, probably. I think I even started work on this once. It's just a
bit trickier. Not only do you want to be able to decode arguments, but
there are other problems... for example, I think procfs allows it, but
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.
A nice project for some rainy month :-)
--
Daniel Jacobowitz
CodeSourcery