From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15874 invoked by alias); 19 May 2006 22:06:11 -0000 Received: (qmail 15865 invoked by uid 22791); 19 May 2006 22:06:10 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 19 May 2006 22:05:24 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FhD61-0004Fe-MK; Fri, 19 May 2006 18:05:21 -0400 Date: Fri, 19 May 2006 23:13:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: kernel-hacker@bennee.com, gdb@sources.redhat.com Subject: Re: Break on syscall? Message-ID: <20060519220521.GA16297@nevyn.them.org> Mail-Followup-To: Mark Kettenis , kernel-hacker@bennee.com, gdb@sources.redhat.com References: <1148033730.30951.15.camel@okra.transitives.com> <20060519124834.GA750@nevyn.them.org> <200605192116.k4JLGFkw025170@elgar.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605192116.k4JLGFkw025170@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00322.txt.bz2 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 > > > > 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