From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12443 invoked by alias); 20 May 2006 00:18:54 -0000 Received: (qmail 12435 invoked by uid 22791); 20 May 2006 00:18:53 -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; Sat, 20 May 2006 00:18:46 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FhFB0-000515-De; Fri, 19 May 2006 20:18:38 -0400 Date: Sun, 21 May 2006 13:25:00 -0000 From: Daniel Jacobowitz To: PAUL GILLIAM Cc: Mark Kettenis , kernel-hacker@bennee.com, gdb@sources.redhat.com Subject: Re: Break on syscall? Message-ID: <20060520001838.GA19268@nevyn.them.org> Mail-Followup-To: PAUL GILLIAM , 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> <20060519220521.GA16297@nevyn.them.org> <1148076571.315.16.camel@dufur.beaverton.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1148076571.315.16.camel@dufur.beaverton.ibm.com> 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/msg00325.txt.bz2 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